From 31b2eb0bb7d303f9c8f2861c70a0b63cd6560459 Mon Sep 17 00:00:00 2001 From: Ali Bahar Date: Tue, 12 Jul 2011 23:10:55 +0800 Subject: [PATCH] --- yaml --- r: 267383 b: refs/heads/master c: d1661dfdb99138eca2d3fbcf9c651ffcaba6f28a h: refs/heads/master i: 267381: 8f9c417b847834fbb5893fee27ac18d9df82415f 267379: 5599f7e61a097740b63bdf60332ac687de8293bb 267375: 9d55dbd8cf5bd05f7248e53574f668d6c05e7c1d v: v3 --- [refs] | 2 +- trunk/drivers/staging/rtl8712/drv_types.h | 5 ++++ .../staging/rtl8712/rtl871x_ioctl_linux.c | 25 ++++++++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index ba75d28fcfd9..8f9013294de6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1dac4186bcc663cb8c2bcc59481aea8fe9124a6c +refs/heads/master: d1661dfdb99138eca2d3fbcf9c651ffcaba6f28a diff --git a/trunk/drivers/staging/rtl8712/drv_types.h b/trunk/drivers/staging/rtl8712/drv_types.h index 4f380a64aa85..c5303c3fda14 100644 --- a/trunk/drivers/staging/rtl8712/drv_types.h +++ b/trunk/drivers/staging/rtl8712/drv_types.h @@ -117,6 +117,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/trunk/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/trunk/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 40e6b5cc412d..59bdab105334 100644 --- a/trunk/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/trunk/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))