mac80211: Successfully set master mode and get/set ESSID in master mode
A message that is not in the archive (sent off-list or not yet received): 20090617004435.3801930f@symphony
Johannes Berg
NAKQuoted 9 lines · James Le Cuirot
This allows wext-based drivers to successfully put the adapter into master mode and get/set the ESSID while in master mode. I'm not sure why this code was not already present but the "Invalid argument" error I was getting has now gone and getting/setting the ESSID afterwards now works. Hopefully this helps and I haven't misunderstood something. This patch is against the wireless-testing branch. Admittedly, I haven't actually tested it against this branch but I've made identical changes to 2.6.30 and that's working fine. For the record, I'm using a p54usb adapter.
NACK.
http://wireless.kernel.org/RTFM-AP
johannes
Quoted 43 lines
Signed-off-by James Le Cuirot <[email protected]>---
net/mac80211/wext.c +4
-2@@ -131,7 +131,8 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev,size_t len = data->length;int ret; -if (sdata->vif.type ==NL80211_IFTYPE_ADHOC ) +if (sdata->vif.type ==NL80211_IFTYPE_ADHOC || + sdata->vif.type ==NL80211_IFTYPE_AP )return cfg80211_ibss_wext_siwessid (dev, info, data, ssid);/* iwconfig uses nul termination in SSID.. */ @@ -167,7 +168,8 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev, sdata =IEEE80211_DEV_TO_SUB_IF (dev); -if (sdata->vif.type ==NL80211_IFTYPE_ADHOC ) +if (sdata->vif.type ==NL80211_IFTYPE_ADHOC || + sdata->vif.type ==NL80211_IFTYPE_AP )return cfg80211_ibss_wext_giwessid (dev, info, data, ssid);if (sdata->vif.type ==NL80211_IFTYPE_STATION ) {net/wireless/wext-compat.c +3
-0@@ -82,6 +82,9 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,return -EOPNOTSUPP ;switch (*mode) { +case IW_MODE_MASTER : + type =NL80211_IFTYPE_AP ; +break ;case IW_MODE_INFRA : type =NL80211_IFTYPE_STATION ;break ;