public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: James Le Cuirot <chewi@aura-online.co.uk>
Cc: "John W.Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Successfully set master mode and get/set ESSID in master mode
Date: Wed, 17 Jun 2009 01:46:57 +0200	[thread overview]
Message-ID: <1245196017.21287.75.camel@johannes.local> (raw)
In-Reply-To: <20090617004435.3801930f@symphony>

[-- 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 --]

           reply	other threads:[~2009-06-16 23:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20090617004435.3801930f@symphony>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245196017.21287.75.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=chewi@aura-online.co.uk \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox