Commit 5c5f9664 authored by Abhijeet Kolekar's avatar Abhijeet Kolekar Committed by John W. Linville

mac80211 : fix for iwconfig in ad-hoc mode

The patch checks interface status, if it is in IBSS_JOINED mode
show cell id it is associated with.
Signed-off-by: default avatarAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e6340361
...@@ -496,7 +496,8 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, ...@@ -496,7 +496,8 @@ static int ieee80211_ioctl_giwap(struct net_device *dev,
sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (sdata->vif.type == IEEE80211_IF_TYPE_STA || if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { if (sdata->u.sta.state == IEEE80211_ASSOCIATED ||
sdata->u.sta.state == IEEE80211_IBSS_JOINED) {
ap_addr->sa_family = ARPHRD_ETHER; ap_addr->sa_family = ARPHRD_ETHER;
memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
return 0; return 0;
......
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