public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mac80211: Successfully set master mode and get/set ESSID in master mode
       [not found] <20090617004435.3801930f@symphony>
@ 2009-06-16 23:46 ` Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2009-06-16 23:46 UTC (permalink / raw)
  To: James Le Cuirot; +Cc: John W.Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2408 bytes --]

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@aura-online.co.uk>
> 
> ---
> 
> 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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-16 23:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090617004435.3801930f@symphony>
2009-06-16 23:46 ` [PATCH] mac80211: Successfully set master mode and get/set ESSID in master mode Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox