Commit 2b260351 authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: add function to retrieve current bssid

We will need this from the cfg80211 disassociate call.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 07542d08
...@@ -1272,3 +1272,15 @@ int orinoco_hw_disassociate(struct orinoco_private *priv, ...@@ -1272,3 +1272,15 @@ int orinoco_hw_disassociate(struct orinoco_private *priv,
&buf); &buf);
return err; return err;
} }
int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
u8 *addr)
{
hermes_t *hw = &priv->hw;
int err;
err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID,
ETH_ALEN, NULL, addr);
return err;
}
...@@ -53,5 +53,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv, ...@@ -53,5 +53,7 @@ int orinoco_hw_trigger_scan(struct orinoco_private *priv,
const struct cfg80211_ssid *ssid); const struct cfg80211_ssid *ssid);
int orinoco_hw_disassociate(struct orinoco_private *priv, int orinoco_hw_disassociate(struct orinoco_private *priv,
u8 *addr, u16 reason_code); u8 *addr, u16 reason_code);
int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
u8 *addr);
#endif /* _ORINOCO_HW_H_ */ #endif /* _ORINOCO_HW_H_ */
...@@ -156,7 +156,6 @@ static int orinoco_ioctl_getwap(struct net_device *dev, ...@@ -156,7 +156,6 @@ static int orinoco_ioctl_getwap(struct net_device *dev,
{ {
struct orinoco_private *priv = ndev_priv(dev); struct orinoco_private *priv = ndev_priv(dev);
hermes_t *hw = &priv->hw;
int err = 0; int err = 0;
unsigned long flags; unsigned long flags;
...@@ -164,8 +163,7 @@ static int orinoco_ioctl_getwap(struct net_device *dev, ...@@ -164,8 +163,7 @@ static int orinoco_ioctl_getwap(struct net_device *dev,
return -EBUSY; return -EBUSY;
ap_addr->sa_family = ARPHRD_ETHER; ap_addr->sa_family = ARPHRD_ETHER;
err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, err = orinoco_hw_get_current_bssid(priv, ap_addr->sa_data);
ETH_ALEN, NULL, ap_addr->sa_data);
orinoco_unlock(priv, &flags); orinoco_unlock(priv, &flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment