Search Linux Wireless

Re: [PATCH] mac80211: Successfully set master mode and get/set ESSID in master mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-06-17 at 00:44 +0100, James Le Cuirot wrote:
> 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

> Signed-off-by: James Le Cuirot <chewi@xxxxxxxxxxxxxxxxx>
> 
> ---
> 
> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index 1da81f4..e8d5cee 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -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) {
> diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
> index d030c53..5c1f215 100644
> --- a/net/wireless/wext-compat.c
> +++ b/net/wireless/wext-compat.c
> @@ -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;
> 

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux