From: Larry Finger <Larry.Finger@lwfinger.net>
To: Ali Bahar <ali@internetdog.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down.
Date: Tue, 12 Jul 2011 10:21:31 -0500 [thread overview]
Message-ID: <4E1C667B.2040009@lwfinger.net> (raw)
In-Reply-To: <1310483456-10543-2-git-send-email-ali@internetDog.org>
On 07/12/2011 10:10 AM, Ali Bahar wrote:
> The original Realtek code assumed that ioctl Sets get done after the
> interface is Up. This included the set to Essid and to the AP MAC#;
> and it fit Realtek's installation procedure. But there is no such
> necessity for the adapter, and no stated requirement found
> elsewhere. Also, wireless drivers typically permit this.
>
> A typical error message used to be:
> Error for wireless request "Set ESSID" (8B1A) :
> SET failed on device wlan0 ; Operation not permitted.
>
> Signed-off-by: Ali Bahar<ali@internetDog.org>
> ---
> Larry,
>
> this matches _your_ patch, of course. So it is a good candidate for an initial
> submission -- to ensure that I don't fall foul of the process.
>
> Ali
>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Greg,
This patch might be pushed to stable, but I'm not 100% sure. If r8712u is
controlled by NetworkManager, it behaves correctly. It fails only when used as
an AP, and perhaps with some versions of manual network control.
Larry
> ---
> drivers/staging/rtl8712/drv_types.h | 5 +++++
> drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 25 +++++++++++++++++++++----
> 2 files changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h
> index 3bb66dc..fd50f78 100644
> --- a/drivers/staging/rtl8712/drv_types.h
> +++ b/drivers/staging/rtl8712/drv_types.h
> @@ -118,6 +118,11 @@ struct dvobj_priv {
> struct usb_device *pusbdev;
> };
>
> +/**
> + * struct _adapter - the main adapter structure for this device.
> + *
> + * bup: True indicates that the interface is Up.
> + */
> struct _adapter {
> struct dvobj_priv dvobjpriv;
> struct mlme_priv mlmepriv;
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index 40e6b5c..59bdab1 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -975,6 +975,13 @@ static int r871x_wx_set_priv(struct net_device *dev,
> * s2. set_802_11_authentication_mode()
> * s3. set_802_11_encryption_mode()
> * s4. set_802_11_bssid()
> + *
> + * This function intends to handle the Set AP command, which specifies the
> + * MAC# of a preferred Access Point.
> + * Currently, the request comes via Wireless Extensions' SIOCSIWAP ioctl.
> + *
> + * For this operation to succeed, there is no need for the interface to be Up.
> + *
> */
> static int r8711_wx_set_wap(struct net_device *dev,
> struct iw_request_info *info,
> @@ -992,8 +999,6 @@ static int r8711_wx_set_wap(struct net_device *dev,
> struct wlan_network *pnetwork = NULL;
> enum NDIS_802_11_AUTHENTICATION_MODE authmode;
>
> - if (padapter->bup == false)
> - return -1;
> if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
> return -1;
> if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
> @@ -1074,6 +1079,14 @@ static int r871x_wx_set_mlme(struct net_device *dev,
> return ret;
> }
>
> +/**
> + *
> + * This function intends to handle the Set Scan command.
> + * Currently, the request comes via Wireless Extensions' SIOCSIWSCAN ioctl.
> + *
> + * For this operation to succeed, the interface is brought Up beforehand.
> + *
> + */
> static int r8711_wx_set_scan(struct net_device *dev,
> struct iw_request_info *a,
> union iwreq_data *wrqu, char *extra)
> @@ -1169,6 +1182,12 @@ static int r8711_wx_get_scan(struct net_device *dev,
> * s2. set_802_11_authenticaion_mode()
> * s3. set_802_11_encryption_mode()
> * s4. set_802_11_ssid()
> + *
> + * This function intends to handle the Set ESSID command.
> + * Currently, the request comes via the Wireless Extensions' SIOCSIWESSID ioctl.
> + *
> + * For this operation to succeed, there is no need for the interface to be Up.
> + *
> */
> static int r8711_wx_set_essid(struct net_device *dev,
> struct iw_request_info *a,
> @@ -1184,8 +1203,6 @@ static int r8711_wx_set_essid(struct net_device *dev,
> struct list_head *phead;
> u32 len;
>
> - if (padapter->bup == false)
> - return -1;
> if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
> return -1;
> if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
next prev parent reply other threads:[~2011-07-12 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 15:10 [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Ali Bahar
2011-07-12 15:10 ` [PATCH 1/2] staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down Ali Bahar
2011-07-12 15:21 ` Larry Finger [this message]
2011-07-12 15:10 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Ali Bahar
2011-07-12 15:22 ` Larry Finger
-- strict thread matches above, loose matches on Subject: below --
2011-07-11 10:07 [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Ali Bahar
2011-07-11 10:07 ` [PATCH 1/2] staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down Ali Bahar
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=4E1C667B.2040009@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=ali@internetdog.org \
--cc=gregkh@suse.de \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).