All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
@ 2011-07-11 10:07 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
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ali Bahar @ 2011-07-11 10:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, WLAN FAE, Ali Bahar

These are updates to how the 'bup' flag is handled. The first allows Sets
before the interface is brought Up, and the second is housekeeping of the
flag's value when the interface is taken Down.

Ali Bahar (2):
  staging: r8712u: Sets to SSID, and to AP MAC#, can now be done    
    when the interface is Down.
  staging: r8712u: Interface-state not fully tracked.

 drivers/staging/rtl8712/drv_types.h           |    5 +++++
 drivers/staging/rtl8712/os_intfs.c            |   14 ++++++++++++++
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   25 +++++++++++++++++++++----
 3 files changed, 40 insertions(+), 4 deletions(-)

-- 
1.7.6


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down.
  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 ` Ali Bahar
  2011-07-11 10:07 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Ali Bahar
  2011-07-11 15:57 ` [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Larry Finger
  2 siblings, 0 replies; 8+ messages in thread
From: Ali Bahar @ 2011-07-11 10:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, WLAN FAE, Ali Bahar

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

---
 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))
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] staging: r8712u: Interface-state not fully tracked.
  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
@ 2011-07-11 10:07 ` Ali Bahar
  2011-07-11 15:57 ` [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Larry Finger
  2 siblings, 0 replies; 8+ messages in thread
From: Ali Bahar @ 2011-07-11 10:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, WLAN FAE, Ali Bahar

padapter->bup is True when the interface has been
brought Up. But it was not being reset when the
interface is taken Down.
This has not caused a known problem, as other
state variables may be compensating for it. Never
the less, it is now properly tracked.

Signed-off-by: Ali Bahar <ali@internetDog.org>
---
 drivers/staging/rtl8712/os_intfs.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 3f38e8e..6697941 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -375,6 +375,12 @@ static void enable_video_mode(struct _adapter *padapter, int cbw40_value)
 	r8712_fw_cmd(padapter, intcmd);
 }
 
+/**
+ *
+ * This function intends to handle the activation of an interface
+ * i.e. when it is brought Up/Active from a Down state.
+ *
+ */
 static int netdev_open(struct net_device *pnetdev)
 {
 	struct _adapter *padapter = (struct _adapter *)_netdev_priv(pnetdev);
@@ -434,6 +440,12 @@ netdev_open_error:
 	return -1;
 }
 
+/**
+ *
+ * This function intends to handle the shutdown of an interface
+ * i.e. when it is brought Down from an Up/Active state.
+ *
+ */
 static int netdev_close(struct net_device *pnetdev)
 {
 	struct _adapter *padapter = (struct _adapter *) _netdev_priv(pnetdev);
@@ -458,6 +470,8 @@ static int netdev_close(struct net_device *pnetdev)
 	r8712_free_network_queue(padapter);
 	/*Stop driver mlme relation timer*/
 	stop_drv_timers(padapter);
+	/* The interface is no longer Up: */
+	padapter->bup = false;
 	return 0;
 }
 
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
  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
  2011-07-11 10:07 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Ali Bahar
@ 2011-07-11 15:57 ` Larry Finger
  2011-07-12  2:00   ` Ali Bahar
  2 siblings, 1 reply; 8+ messages in thread
From: Larry Finger @ 2011-07-11 15:57 UTC (permalink / raw)
  To: Ali Bahar; +Cc: linux-wireless, WLAN FAE

On 07/11/2011 05:07 AM, Ali Bahar wrote:
> These are updates to how the 'bup' flag is handled. The first allows Sets
> before the interface is brought Up, and the second is housekeeping of the
> flag's value when the interface is taken Down.
>
> Ali Bahar (2):
>    staging: r8712u: Sets to SSID, and to AP MAC#, can now be done
>      when the interface is Down.
>    staging: r8712u: Interface-state not fully tracked.
>
>   drivers/staging/rtl8712/drv_types.h           |    5 +++++
>   drivers/staging/rtl8712/os_intfs.c            |   14 ++++++++++++++
>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   25 +++++++++++++++++++++----
>   3 files changed, 40 insertions(+), 4 deletions(-)
>

Ali,

The patches look good, except for one problem. As this driver is in staging, the 
patches need to be sent to Greg Kroah-Hartman <gregkh@suse.de>, not through 
linux-wireless.

One other point - for those patches that are properly sent through wireless, 
John Linville should be the one to receive those. He is the maintainer for that 
section, just as GregKH is the maintainer for staging.

Larry


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
  2011-07-11 15:57 ` [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Larry Finger
@ 2011-07-12  2:00   ` Ali Bahar
  2011-07-12  2:55     ` Larry Finger
  0 siblings, 1 reply; 8+ messages in thread
From: Ali Bahar @ 2011-07-12  2:00 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, WLAN FAE

On Mon, Jul 11, 2011 at 10:57:20AM -0500, Larry Finger wrote:
> On 07/11/2011 05:07 AM, Ali Bahar wrote:
> >These are updates to how the 'bup' flag is handled. The first allows Sets
> >before the interface is brought Up, and the second is housekeeping of the
> >flag's value when the interface is taken Down.
> >
> >Ali Bahar (2):
> >   staging: r8712u: Sets to SSID, and to AP MAC#, can now be done
> >     when the interface is Down.
> >   staging: r8712u: Interface-state not fully tracked.
> >
> >  drivers/staging/rtl8712/drv_types.h           |    5 +++++
> >  drivers/staging/rtl8712/os_intfs.c            |   14 ++++++++++++++
> >  drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   25 +++++++++++++++++++++----
> >  3 files changed, 40 insertions(+), 4 deletions(-)
> >
> 
> Ali,
> 
> The patches look good, except for one problem. As this driver is in
> staging, the patches need to be sent to Greg Kroah-Hartman
> <gregkh@suse.de>, not through linux-wireless.

Hmm, I must admit that I'd raised this question with myself (ie
Staging's recipients), and had dug into it a bit, but neglected it at
the last minute. Sorry.

See below, anyway.

 
> One other point - for those patches that are properly sent through
> wireless, John Linville should be the one to receive those. He is
> the maintainer for that section, just as GregKH is the maintainer
> for staging.

Yes, but my understanding was that _you_ are my upstream, since you
are this driver's maintainer. (MAINTAINERS does not mention you for
exactly the r8712u, but does so for related devices.) So it was going
to be To: Larry, CC: wireless ML. Observing other threads suggested
that you may then Ack and send it to Linville -- which, now that you
have reminded me, would have been Greg KH.

OK, so I will re-send these to Greg. Do you not get even a CC?!! You
mention none, above, and had offered/expected to review them (in a 3
July email.)

(NB I ruled out a CC to linuxdriverproject.org, of course.)


thanks,
ali

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
  2011-07-12  2:00   ` Ali Bahar
@ 2011-07-12  2:55     ` Larry Finger
  2011-07-12  3:21       ` Ali Bahar
  0 siblings, 1 reply; 8+ messages in thread
From: Larry Finger @ 2011-07-12  2:55 UTC (permalink / raw)
  To: ali; +Cc: linux-wireless, WLAN FAE

On 07/11/2011 09:00 PM, Ali Bahar wrote:
> On Mon, Jul 11, 2011 at 10:57:20AM -0500, Larry Finger wrote:
>> On 07/11/2011 05:07 AM, Ali Bahar wrote:
>>> These are updates to how the 'bup' flag is handled. The first allows Sets
>>> before the interface is brought Up, and the second is housekeeping of the
>>> flag's value when the interface is taken Down.
>>>
>>> Ali Bahar (2):
>>>    staging: r8712u: Sets to SSID, and to AP MAC#, can now be done
>>>      when the interface is Down.
>>>    staging: r8712u: Interface-state not fully tracked.
>>>
>>>   drivers/staging/rtl8712/drv_types.h           |    5 +++++
>>>   drivers/staging/rtl8712/os_intfs.c            |   14 ++++++++++++++
>>>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   25 +++++++++++++++++++++----
>>>   3 files changed, 40 insertions(+), 4 deletions(-)
>>>
>>
>> Ali,
>>
>> The patches look good, except for one problem. As this driver is in
>> staging, the patches need to be sent to Greg Kroah-Hartman
>> <gregkh@suse.de>, not through linux-wireless.
>
> Hmm, I must admit that I'd raised this question with myself (ie
> Staging's recipients), and had dug into it a bit, but neglected it at
> the last minute. Sorry.
>
> See below, anyway.
>
>
>> One other point - for those patches that are properly sent through
>> wireless, John Linville should be the one to receive those. He is
>> the maintainer for that section, just as GregKH is the maintainer
>> for staging.
>
> Yes, but my understanding was that _you_ are my upstream, since you
> are this driver's maintainer. (MAINTAINERS does not mention you for
> exactly the r8712u, but does so for related devices.) So it was going
> to be To: Larry, CC: wireless ML. Observing other threads suggested
> that you may then Ack and send it to Linville -- which, now that you
> have reminded me, would have been Greg KH.
>
> OK, so I will re-send these to Greg. Do you not get even a CC?!! You
> mention none, above, and had offered/expected to review them (in a 3
> July email.)
>
> (NB I ruled out a CC to linuxdriverproject.org, of course.)

I am one of the driver's authors, not a maintainer. You should send any patches 
for a staging driver to GregKH, and Cc all of the driver authors. As I am the 
only one listed, you only need send these to me. You will need me to ACK the 
patch, otherwise Greg is unlikely to pick it up, particularly as it does more 
than make cosmetic changes.

Larry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
  2011-07-12  2:55     ` Larry Finger
@ 2011-07-12  3:21       ` Ali Bahar
  0 siblings, 0 replies; 8+ messages in thread
From: Ali Bahar @ 2011-07-12  3:21 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, WLAN FAE

On Mon, Jul 11, 2011 at 09:55:04PM -0500, Larry Finger wrote:
> On 07/11/2011 09:00 PM, Ali Bahar wrote:
> >On Mon, Jul 11, 2011 at 10:57:20AM -0500, Larry Finger wrote:
> >>On 07/11/2011 05:07 AM, Ali Bahar wrote:
> >>>These are updates to how the 'bup' flag is handled. The first allows Sets

> >that you may then Ack and send it to Linville -- which, now that you
> >have reminded me, would have been Greg KH.

> >OK, so I will re-send these to Greg. Do you not get even a CC?!! You
> >mention none, above, and had offered/expected to review them (in a 3
> >July email.)

> I am one of the driver's authors, not a maintainer. You should send
> any patches for a staging driver to GregKH, and Cc all of the driver
> authors. As I am the only one listed, you only need send these to

So,
  To: Greg
  Cc: Larry
  # and I expect
  Cc: linux-wireless
  # No need for wlanfae@realtek.com


> me. You will need me to ACK the patch, otherwise Greg is unlikely to
> pick it up, particularly as it does more than make cosmetic changes.

Of course.
Thanks,
Ali


> 
> Larry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up.
@ 2011-07-12 15:10 Ali Bahar
  0 siblings, 0 replies; 8+ messages in thread
From: Ali Bahar @ 2011-07-12 15:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Larry Finger, linux-wireless, Ali Bahar

These are updates to how the 'bup' flag is handled. The first allows Sets
before the interface is brought Up, and the second is housekeeping of the
flag's value when the interface is taken Down.

Ali Bahar (2):
  staging: r8712u: Sets to SSID, and to AP MAC#, can now be done    
    when the interface is Down.
  staging: r8712u: Interface-state not fully tracked.

 drivers/staging/rtl8712/drv_types.h           |    5 +++++
 drivers/staging/rtl8712/os_intfs.c            |   14 ++++++++++++++
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   25 +++++++++++++++++++++----
 3 files changed, 40 insertions(+), 4 deletions(-)

-- 
1.7.6


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-12 15:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-07-11 10:07 ` [PATCH 2/2] staging: r8712u: Interface-state not fully tracked Ali Bahar
2011-07-11 15:57 ` [PATCH 0/2] staging: r8712u: Set ESSID/AP now possible before interface is brought Up Larry Finger
2011-07-12  2:00   ` Ali Bahar
2011-07-12  2:55     ` Larry Finger
2011-07-12  3:21       ` Ali Bahar
2011-07-12 15:10 Ali Bahar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.