Commit 5743fc81 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: move move all commands to iw_handler.

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11d404cb
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include "device.h" #include "device.h"
#include "ioctl.h" #include "iwctl.h"
#include "iocmd.h" #include "iocmd.h"
#include "mac.h" #include "mac.h"
#include "card.h" #include "card.h"
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
#include "rf.h" #include "rf.h"
#include "iowpa.h" #include "iowpa.h"
#include "wpactl.h" #include "wpactl.h"
#include "control.h"
#include "rndis.h"
#include <net/iw_handler.h> #define SUPPORTED_WIRELESS_EXT 19
#define SUPPORTED_WIRELESS_EXT 18
static const long frequency_list[] = { static const long frequency_list[] = {
2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484, 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484,
...@@ -81,9 +81,9 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) ...@@ -81,9 +81,9 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
* Wireless Handler: get protocol name * Wireless Handler: get protocol name
*/ */
int iwctl_giwname(struct net_device *dev, struct iw_request_info *info, int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,
char *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
strcpy(wrq, "802.11-a/b/g"); strcpy(wrqu->name, "802.11-a/b/g");
return 0; return 0;
} }
...@@ -91,9 +91,10 @@ int iwctl_giwname(struct net_device *dev, struct iw_request_info *info, ...@@ -91,9 +91,10 @@ int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set scan * Wireless Handler: set scan
*/ */
int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_point *wrq = &wrqu->data;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_scan_req *req = (struct iw_scan_req *)extra; struct iw_scan_req *req = (struct iw_scan_req *)extra;
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
...@@ -102,7 +103,10 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, ...@@ -102,7 +103,10 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
return -EINVAL; return -EINVAL;
PRINT_K(" SIOCSIWSCAN \n"); PRINT_K(" SIOCSIWSCAN\n");
if (pMgmt == NULL)
return -EFAULT;
if (pMgmt->eScanState == WMAC_IS_SCANNING) { if (pMgmt->eScanState == WMAC_IS_SCANNING) {
// In scanning.. // In scanning..
...@@ -161,8 +165,9 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, ...@@ -161,8 +165,9 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler : get scan results * Wireless Handler : get scan results
*/ */
int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct iw_point *wrq = &wrqu->data;
int ii; int ii;
int jj; int jj;
int kk; int kk;
...@@ -181,6 +186,9 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, ...@@ -181,6 +186,9 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN\n");
if (pMgmt == NULL)
return -EFAULT;
if (pMgmt->eScanState == WMAC_IS_SCANNING) { if (pMgmt->eScanState == WMAC_IS_SCANNING) {
// In scanning.. // In scanning..
return -EAGAIN; return -EAGAIN;
...@@ -308,12 +316,13 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, ...@@ -308,12 +316,13 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set frequence or channel * Wireless Handler: set frequence or channel
*/ */
int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info, int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_freq *wrq = &wrqu->freq;
int rc = 0; int rc = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ\n");
// If setting by frequency, convert to a channel // If setting by frequency, convert to a channel
if ((wrq->e == 1) && (wrq->m >= (int)2.412e8) && if ((wrq->e == 1) && (wrq->m >= (int)2.412e8) &&
...@@ -346,12 +355,17 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info, ...@@ -346,12 +355,17 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get frequence or channel * Wireless Handler: get frequence or channel
*/ */
int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info, int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_freq *wrq = &wrqu->freq;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ\n");
if (pMgmt == NULL)
return -EFAULT;
#ifdef WEXT_USECHANNELS #ifdef WEXT_USECHANNELS
wrq->m = (int)pMgmt->uCurrChannel; wrq->m = (int)pMgmt->uCurrChannel;
...@@ -372,16 +386,21 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info, ...@@ -372,16 +386,21 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set operation mode * Wireless Handler: set operation mode
*/ */
int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
__u32 *wmode, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
__u32 *wmode = &wrqu->mode;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0; int rc = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE\n");
if (pMgmt == NULL)
return -EFAULT;
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP && pDevice->bEnableHostapd) { if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP && pDevice->bEnableHostapd) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Can't set operation mode, hostapd is running \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Can't set operation mode, hostapd is running\n");
return rc; return rc;
} }
...@@ -425,19 +444,72 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, ...@@ -425,19 +444,72 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
rc = -EINVAL; rc = -EINVAL;
} }
if (pDevice->bCommit) {
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
netif_stop_queue(pDevice->dev);
spin_lock_irq(&pDevice->lock);
bScheduleCommand((void *) pDevice,
WLAN_CMD_RUN_AP, NULL);
spin_unlock_irq(&pDevice->lock);
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Commit the settings\n");
spin_lock_irq(&pDevice->lock);
if (pDevice->bLinkPass &&
memcmp(pMgmt->abyCurrSSID,
pMgmt->abyDesireSSID,
WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) {
bScheduleCommand((void *) pDevice,
WLAN_CMD_DISASSOCIATE, NULL);
} else {
pDevice->bLinkPass = FALSE;
pMgmt->eCurrState = WMAC_STATE_IDLE;
memset(pMgmt->abyCurrBSSID, 0, 6);
}
ControlvMaskByte(pDevice,
MESSAGE_REQUEST_MACREG, MAC_REG_PAPEDELAY,
LEDSTS_STS, LEDSTS_SLOW);
netif_stop_queue(pDevice->dev);
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
if (!pDevice->bWPASuppWextEnabled)
bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice,
WLAN_CMD_SSID,
NULL);
spin_unlock_irq(&pDevice->lock);
}
pDevice->bCommit = FALSE;
}
return rc; return rc;
} }
/* /*
* Wireless Handler: get operation mode * Wireless Handler: get operation mode
*/ */
void iwctl_giwmode(struct net_device *dev, struct iw_request_info *info, int iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
__u32 *wmode, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
__u32 *wmode = &wrqu->mode;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE\n");
if (pMgmt == NULL)
return -EFAULT;
// If not managed, assume it's ad-hoc // If not managed, assume it's ad-hoc
switch (pMgmt->eConfigMode) { switch (pMgmt->eConfigMode) {
case WMAC_CONFIG_ESS_STA: case WMAC_CONFIG_ESS_STA:
...@@ -455,14 +527,17 @@ void iwctl_giwmode(struct net_device *dev, struct iw_request_info *info, ...@@ -455,14 +527,17 @@ void iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
default: default:
*wmode = IW_MODE_ADHOC; *wmode = IW_MODE_ADHOC;
} }
return 0;
} }
/* /*
* Wireless Handler: get capability range * Wireless Handler: get capability range
*/ */
void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct iw_point *wrq = &wrqu->data;
struct iw_range *range = (struct iw_range *)extra; struct iw_range *range = (struct iw_range *)extra;
int i; int i;
int k; int k;
...@@ -555,20 +630,26 @@ void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, ...@@ -555,20 +630,26 @@ void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
range->avg_qual.level = 176; // -80 dBm range->avg_qual.level = 176; // -80 dBm
range->avg_qual.noise = 0; range->avg_qual.noise = 0;
} }
return 0;
} }
/* /*
* Wireless Handler : set ap mac address * Wireless Handler : set ap mac address
*/ */
int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct sockaddr *wrq = &wrqu->ap_addr;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0; int rc = 0;
BYTE ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; BYTE ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
PRINT_K(" SIOCSIWAP \n"); PRINT_K(" SIOCSIWAP\n");
if (pMgmt == NULL)
return -EFAULT;
if (wrq->sa_family != ARPHRD_ETHER) { if (wrq->sa_family != ARPHRD_ETHER) {
rc = -EINVAL; rc = -EINVAL;
...@@ -609,12 +690,16 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, ...@@ -609,12 +690,16 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get ap mac address * Wireless Handler: get ap mac address
*/ */
int iwctl_giwap(struct net_device *dev, struct iw_request_info *info, int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct sockaddr *wrq = &wrqu->ap_addr;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP\n");
if (pMgmt == NULL)
return -EFAULT;
memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6); memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6);
...@@ -632,8 +717,9 @@ int iwctl_giwap(struct net_device *dev, struct iw_request_info *info, ...@@ -632,8 +717,9 @@ int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get ap list * Wireless Handler: get ap list
*/ */
int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info, int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, u8 *extra) union iwreq_data *wrqu, char *extra)
{ {
struct iw_point *wrq = &wrqu->data;
struct sockaddr *sock; struct sockaddr *sock;
struct iw_quality *qual; struct iw_quality *qual;
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
...@@ -692,12 +778,16 @@ int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info, ...@@ -692,12 +778,16 @@ int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set essid * Wireless Handler: set essid
*/ */
int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_point *wrq = &wrqu->essid;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSID;
if (pMgmt == NULL)
return -EFAULT;
if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
return -EINVAL; return -EINVAL;
...@@ -794,14 +884,18 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, ...@@ -794,14 +884,18 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
/* /*
* Wireless Handler: get essid * Wireless Handler: get essid
*/ */
void iwctl_giwessid(struct net_device *dev, struct iw_request_info *info, int iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_point *wrq = &wrqu->essid;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSID;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID\n");
if (pMgmt == NULL)
return -EFAULT;
// Note: if wrq->u.data.flags != 0, we should get the relevant // Note: if wrq->u.data.flags != 0, we should get the relevant
// SSID from the SSID list... // SSID from the SSID list...
...@@ -813,15 +907,18 @@ void iwctl_giwessid(struct net_device *dev, struct iw_request_info *info, ...@@ -813,15 +907,18 @@ void iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,
wrq->length = pItemSSID->len; wrq->length = pItemSSID->len;
wrq->flags = 1; // active wrq->flags = 1; // active
return 0;
} }
/* /*
* Wireless Handler: set data rate * Wireless Handler: set data rate
*/ */
int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->bitrate;
int rc = 0; int rc = 0;
u8 brate = 0; u8 brate = 0;
int i; int i;
...@@ -895,13 +992,18 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, ...@@ -895,13 +992,18 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
/* /*
* Wireless Handler: get data rate * Wireless Handler: get data rate
*/ */
void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->bitrate;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE\n");
if (pMgmt == NULL)
return -EFAULT;
{ {
BYTE abySupportedRates[13] = { BYTE abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30,
...@@ -934,14 +1036,18 @@ void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, ...@@ -934,14 +1036,18 @@ void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
if (pDevice->bFixRate == TRUE) if (pDevice->bFixRate == TRUE)
wrq->fixed = TRUE; wrq->fixed = TRUE;
} }
return 0;
} }
/* /*
* Wireless Handler: set rts threshold * Wireless Handler: set rts threshold
*/ */
int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq) int iwctl_siwrts(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->rts;
if ((wrq->value < 0 || wrq->value > 2312) && !wrq->disabled) if ((wrq->value < 0 || wrq->value > 2312) && !wrq->disabled)
return -EINVAL; return -EINVAL;
...@@ -958,11 +1064,12 @@ int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq) ...@@ -958,11 +1064,12 @@ int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq)
* Wireless Handler: get rts * Wireless Handler: get rts
*/ */
int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->rts;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS\n");
wrq->value = pDevice->wRTSThreshold; wrq->value = pDevice->wRTSThreshold;
wrq->disabled = (wrq->value >= 2312); wrq->disabled = (wrq->value >= 2312);
wrq->fixed = 1; wrq->fixed = 1;
...@@ -973,13 +1080,14 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info, ...@@ -973,13 +1080,14 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set fragment threshold * Wireless Handler: set fragment threshold
*/ */
int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info, int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->frag;
int rc = 0; int rc = 0;
int fthr = wrq->value; int fthr = wrq->value;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG\n");
if (wrq->disabled) if (wrq->disabled)
fthr = 2312; fthr = 2312;
...@@ -996,11 +1104,12 @@ int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info, ...@@ -996,11 +1104,12 @@ int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get fragment threshold * Wireless Handler: get fragment threshold
*/ */
int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info, int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->frag;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG\n");
wrq->value = pDevice->wFragmentationThreshold; wrq->value = pDevice->wFragmentationThreshold;
wrq->disabled = (wrq->value >= 2312); wrq->disabled = (wrq->value >= 2312);
wrq->fixed = 1; wrq->fixed = 1;
...@@ -1011,12 +1120,13 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info, ...@@ -1011,12 +1120,13 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set retry threshold * Wireless Handler: set retry threshold
*/ */
int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info, int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->retry;
int rc = 0; int rc = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY\n");
if (wrq->disabled) { if (wrq->disabled) {
rc = -EINVAL; rc = -EINVAL;
...@@ -1043,10 +1153,11 @@ int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info, ...@@ -1043,10 +1153,11 @@ int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get retry threshold * Wireless Handler: get retry threshold
*/ */
int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info, int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n"); struct iw_param *wrq = &wrqu->retry;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY\n");
wrq->disabled = 0; // Can't be disabled wrq->disabled = 0; // Can't be disabled
// Note: by default, display the min retry number // Note: by default, display the min retry number
...@@ -1069,17 +1180,21 @@ int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info, ...@@ -1069,17 +1180,21 @@ int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set encode mode * Wireless Handler: set encode mode
*/ */
int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
DWORD dwKeyIndex = (DWORD)(wrq->flags & IW_ENCODE_INDEX); struct iw_point *wrq = &wrqu->encoding;
u32 dwKeyIndex = (u32)(wrq->flags & IW_ENCODE_INDEX);
int ii; int ii;
int uu; int uu;
int rc = 0; int rc = 0;
int index = (wrq->flags & IW_ENCODE_INDEX); int index = (wrq->flags & IW_ENCODE_INDEX);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE\n");
if (pMgmt == NULL)
return -EFAULT;
// Check the size of the key // Check the size of the key
if (wrq->length > WLAN_WEP232_KEYLEN) { if (wrq->length > WLAN_WEP232_KEYLEN) {
...@@ -1163,10 +1278,11 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, ...@@ -1163,10 +1278,11 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_point *wrq = &wrqu->encoding;
char abyKey[WLAN_WEP232_KEYLEN]; char abyKey[WLAN_WEP232_KEYLEN];
unsigned index = (unsigned)(wrq->flags & IW_ENCODE_INDEX); unsigned index = (unsigned)(wrq->flags & IW_ENCODE_INDEX);
...@@ -1174,6 +1290,9 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, ...@@ -1174,6 +1290,9 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n");
if (pMgmt == NULL)
return -EFAULT;
if (index > WLAN_WEP_NKEYS) if (index > WLAN_WEP_NKEYS)
return -EINVAL; return -EINVAL;
if (index < 1) { // get default key if (index < 1) { // get default key
...@@ -1221,13 +1340,17 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, ...@@ -1221,13 +1340,17 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: set power mode * Wireless Handler: set power mode
*/ */
int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info, int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_param *wrq = &wrqu->power;
int rc = 0; int rc = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER\n");
if (pMgmt == NULL)
return -EFAULT;
if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) { if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
rc = -EINVAL; rc = -EINVAL;
...@@ -1269,13 +1392,17 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info, ...@@ -1269,13 +1392,17 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get power mode * Wireless Handler: get power mode
*/ */
int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info, int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_param *wrq = &wrqu->power;
int mode = pDevice->ePSMode; int mode = pDevice->ePSMode;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER\n");
if (pMgmt == NULL)
return -EFAULT;
if ((wrq->disabled = (mode == WMAC_POWER_CAM))) if ((wrq->disabled = (mode == WMAC_POWER_CAM)))
return 0; return 0;
...@@ -1295,12 +1422,13 @@ int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info, ...@@ -1295,12 +1422,13 @@ int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
* Wireless Handler: get Sensitivity * Wireless Handler: get Sensitivity
*/ */
int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info, int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
struct iw_param *wrq = &wrqu->sens;
long ldBm; long ldBm;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
if (pDevice->bLinkPass == TRUE) { if (pDevice->bLinkPass == TRUE) {
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
wrq->value = ldBm; wrq->value = ldBm;
...@@ -1313,15 +1441,19 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info, ...@@ -1313,15 +1441,19 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_param *wrq = &wrqu->param;
int ret = 0; int ret = 0;
static int wpa_version = 0; // must be static to save the last value, einsn liu static int wpa_version = 0; // must be static to save the last value, einsn liu
static int pairwise = 0; static int pairwise = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); if (pMgmt == NULL)
return -EFAULT;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH\n");
switch (wrq->flags & IW_AUTH_INDEX) { switch (wrq->flags & IW_AUTH_INDEX) {
case IW_AUTH_WPA_VERSION: case IW_AUTH_WPA_VERSION:
wpa_version = wrq->value; wpa_version = wrq->value;
...@@ -1405,6 +1537,7 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, ...@@ -1405,6 +1537,7 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
} }
break; break;
default: default:
PRINT_K("iwctl_siwauth: not supported %x\n", wrq->flags);
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
break; break;
} }
...@@ -1412,18 +1545,22 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, ...@@ -1412,18 +1545,22 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info, int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info, int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_point *wrq = &wrqu->data;
int ret = 0; int ret = 0;
if (pMgmt == NULL)
return -EFAULT;
if (wrq->length){ if (wrq->length){
if ((wrq->length < 2) || (extra[1] + 2 != wrq->length)) { if ((wrq->length < 2) || (extra[1] + 2 != wrq->length)) {
ret = -EINVAL; ret = -EINVAL;
...@@ -1449,13 +1586,17 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info, ...@@ -1449,13 +1586,17 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_point *wrq = &wrqu->data;
int ret = 0; int ret = 0;
int space = wrq->length; int space = wrq->length;
if (pMgmt == NULL)
return -EFAULT;
wrq->length = 0; wrq->length = 0;
if (pMgmt->wWPAIELen > 0) { if (pMgmt->wWPAIELen > 0) {
wrq->length = pMgmt->wWPAIELen; wrq->length = pMgmt->wWPAIELen;
...@@ -1471,10 +1612,11 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, ...@@ -1471,10 +1612,11 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_point *wrq = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext*)extra; struct iw_encode_ext *ext = (struct iw_encode_ext*)extra;
struct viawget_wpa_param *param=NULL; struct viawget_wpa_param *param=NULL;
// original member // original member
...@@ -1492,6 +1634,9 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, ...@@ -1492,6 +1634,9 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
PRINT_K("SIOCSIWENCODEEXT......\n"); PRINT_K("SIOCSIWENCODEEXT......\n");
if (pMgmt == NULL)
return -EFAULT;
buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL); buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
if (buf == NULL) if (buf == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -1594,19 +1739,24 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, ...@@ -1594,19 +1739,24 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
} }
int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info, int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info, int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra) union iwreq_data *wrqu, char *extra)
{ {
PSDevice pDevice = netdev_priv(dev); PSDevice pDevice = netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_mlme *mlme = (struct iw_mlme *)extra; struct iw_mlme *mlme = (struct iw_mlme *)extra;
int ret = 0; int ret = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMLME\n");
if (pMgmt == NULL)
return -EFAULT;
if (memcmp(pMgmt->abyCurrBSSID, mlme->addr.sa_data, ETH_ALEN)) { if (memcmp(pMgmt->abyCurrBSSID, mlme->addr.sa_data, ETH_ALEN)) {
ret = -EINVAL; ret = -EINVAL;
return ret; return ret;
...@@ -1626,79 +1776,66 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info, ...@@ -1626,79 +1776,66 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
return ret; return ret;
} }
static int iwctl_config_commit(struct net_device *dev,
struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
{
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SIOCSIWCOMMIT\n");
return 0;
}
static const iw_handler iwctl_handler[] = { static const iw_handler iwctl_handler[] = {
(iw_handler)NULL, // SIOCSIWCOMMIT IW_HANDLER(SIOCSIWCOMMIT, iwctl_config_commit),
(iw_handler)NULL, // SIOCGIWNAME IW_HANDLER(SIOCGIWNAME, iwctl_giwname),
(iw_handler)NULL, // SIOCSIWNWID IW_HANDLER(SIOCSIWFREQ, iwctl_siwfreq),
(iw_handler)NULL, // SIOCGIWNWID IW_HANDLER(SIOCGIWFREQ, iwctl_giwfreq),
(iw_handler)NULL, // SIOCSIWFREQ IW_HANDLER(SIOCSIWMODE, iwctl_siwmode),
(iw_handler)NULL, // SIOCGIWFREQ IW_HANDLER(SIOCGIWMODE, iwctl_giwmode),
(iw_handler)NULL, // SIOCSIWMODE IW_HANDLER(SIOCGIWSENS, iwctl_giwsens),
(iw_handler)NULL, // SIOCGIWMODE IW_HANDLER(SIOCGIWRANGE, iwctl_giwrange),
(iw_handler)NULL, // SIOCSIWSENS IW_HANDLER(SIOCSIWAP, iwctl_siwap),
(iw_handler)NULL, // SIOCGIWSENS IW_HANDLER(SIOCGIWAP, iwctl_giwap),
(iw_handler)NULL, // SIOCSIWRANGE IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme),
(iw_handler)iwctl_giwrange, // SIOCGIWRANGE IW_HANDLER(SIOCGIWAPLIST, iwctl_giwaplist),
(iw_handler)NULL, // SIOCSIWPRIV IW_HANDLER(SIOCSIWSCAN, iwctl_siwscan),
(iw_handler)NULL, // SIOCGIWPRIV IW_HANDLER(SIOCGIWSCAN, iwctl_giwscan),
(iw_handler)NULL, // SIOCSIWSTATS IW_HANDLER(SIOCSIWESSID, iwctl_siwessid),
(iw_handler)NULL, // SIOCGIWSTATS IW_HANDLER(SIOCGIWESSID, iwctl_giwessid),
(iw_handler)NULL, // SIOCSIWSPY IW_HANDLER(SIOCSIWRATE, iwctl_siwrate),
(iw_handler)NULL, // SIOCGIWSPY IW_HANDLER(SIOCGIWRATE, iwctl_giwrate),
(iw_handler)NULL, // -- hole -- IW_HANDLER(SIOCSIWRTS, iwctl_siwrts),
(iw_handler)NULL, // -- hole -- IW_HANDLER(SIOCGIWRTS, iwctl_giwrts),
(iw_handler)NULL, // SIOCSIWAP IW_HANDLER(SIOCSIWFRAG, iwctl_siwfrag),
(iw_handler)NULL, // SIOCGIWAP IW_HANDLER(SIOCGIWFRAG, iwctl_giwfrag),
(iw_handler)NULL, // -- hole -- 0x16 IW_HANDLER(SIOCSIWRETRY, iwctl_siwretry),
(iw_handler)NULL, // SIOCGIWAPLIST IW_HANDLER(SIOCGIWRETRY, iwctl_giwretry),
(iw_handler)iwctl_siwscan, // SIOCSIWSCAN IW_HANDLER(SIOCSIWENCODE, iwctl_siwencode),
(iw_handler)iwctl_giwscan, // SIOCGIWSCAN IW_HANDLER(SIOCGIWENCODE, iwctl_giwencode),
(iw_handler)NULL, // SIOCSIWESSID IW_HANDLER(SIOCSIWPOWER, iwctl_siwpower),
(iw_handler)NULL, // SIOCGIWESSID IW_HANDLER(SIOCGIWPOWER, iwctl_giwpower),
(iw_handler)NULL, // SIOCSIWNICKN IW_HANDLER(SIOCSIWGENIE, iwctl_siwgenie),
(iw_handler)NULL, // SIOCGIWNICKN IW_HANDLER(SIOCGIWGENIE, iwctl_giwgenie),
(iw_handler)NULL, // -- hole -- IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme),
(iw_handler)NULL, // -- hole -- IW_HANDLER(SIOCSIWAUTH, iwctl_siwauth),
(iw_handler)NULL, // SIOCSIWRATE 0x20 IW_HANDLER(SIOCGIWAUTH, iwctl_giwauth),
(iw_handler)NULL, // SIOCGIWRATE IW_HANDLER(SIOCSIWENCODEEXT, iwctl_siwencodeext),
(iw_handler)NULL, // SIOCSIWRTS IW_HANDLER(SIOCGIWENCODEEXT, iwctl_giwencodeext)
(iw_handler)NULL, // SIOCGIWRTS
(iw_handler)NULL, // SIOCSIWFRAG
(iw_handler)NULL, // SIOCGIWFRAG
(iw_handler)NULL, // SIOCSIWTXPOW
(iw_handler)NULL, // SIOCGIWTXPOW
(iw_handler)NULL, // SIOCSIWRETRY
(iw_handler)NULL, // SIOCGIWRETRY
(iw_handler)NULL, // SIOCSIWENCODE
(iw_handler)NULL, // SIOCGIWENCODE
(iw_handler)NULL, // SIOCSIWPOWER
(iw_handler)NULL, // SIOCGIWPOWER
(iw_handler)NULL, // -- hole --
(iw_handler)NULL, // -- hole --
(iw_handler)NULL, // SIOCSIWGENIE
(iw_handler)NULL, // SIOCGIWGENIE
(iw_handler)NULL, // SIOCSIWAUTH
(iw_handler)NULL, // SIOCGIWAUTH
(iw_handler)NULL, // SIOCSIWENCODEEXT
(iw_handler)NULL, // SIOCGIWENCODEEXT
(iw_handler)NULL, // SIOCSIWPMKSA
(iw_handler)NULL, // -- hole --
}; };
static const iw_handler iwctl_private_handler[] = { static const iw_handler iwctl_private_handler[] = {
NULL, // SIOCIWFIRSTPRIV NULL, // SIOCIWFIRSTPRIV
}; };
struct iw_priv_args iwctl_private_args[] = { const struct iw_priv_args iwctl_private_args[] = {
{ IOCTL_CMD_SET, IW_PRIV_TYPE_CHAR | 1024, 0, "set" }, { IOCTL_CMD_SET, IW_PRIV_TYPE_CHAR | 1024, 0, "set" },
}; };
const struct iw_handler_def iwctl_handler_def = { const struct iw_handler_def iwctl_handler_def = {
.get_wireless_stats = &iwctl_get_wireless_stats, .get_wireless_stats = &iwctl_get_wireless_stats,
.num_standard = sizeof(iwctl_handler) / sizeof(iw_handler), .num_standard = ARRAY_SIZE(iwctl_handler),
.num_private = 0, .num_private = 0,
.num_private_args = 0, .num_private_args = 0,
.standard = (iw_handler *)iwctl_handler, .standard = iwctl_handler,
.private = NULL, .private = NULL,
.private_args = NULL, .private_args = NULL,
}; };
...@@ -42,104 +42,105 @@ ...@@ -42,104 +42,105 @@
struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev); struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev);
int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *wrq, char *extra); union iwreq_data *wrqu, char *extra);
void iwctl_giwrange(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
void iwctl_giwmode(struct net_device *dev, struct iw_request_info *info, int iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
__u32 *wmode, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
__u32 *wmode, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info, int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info, int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
struct iw_freq *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwname(struct net_device *dev, struct iw_request_info *info, int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,
char *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info, int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwap(struct net_device *dev, struct iw_request_info *info, int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info, int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
void iwctl_giwessid(struct net_device *dev, struct iw_request_info *info, int iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
void iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq); int iwctl_siwrts(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra);
int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info, int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info, int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info, int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info, int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info, int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info, int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info, int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info, int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info, int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info, int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info, int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info,
struct iw_param *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info, int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info, int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info, int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info, int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq, char *extra); union iwreq_data *wrqu, char *extra);
extern const struct iw_handler_def iwctl_handler_def; extern const struct iw_handler_def iwctl_handler_def;
extern const struct iw_priv_args iwctl_private_args; extern const struct iw_priv_args iwctl_priv_args;
#endif /* __IWCTL_H__ */ #endif /* __IWCTL_H__ */
...@@ -1558,7 +1558,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -1558,7 +1558,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
PSDevice pDevice = (PSDevice)netdev_priv(dev); PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &pDevice->sMgmtObj; PSMgmtObject pMgmt = &pDevice->sMgmtObj;
PSCmdRequest pReq; PSCmdRequest pReq;
u8 *buffer;
struct iwreq *wrq = (struct iwreq *) rq; struct iwreq *wrq = (struct iwreq *) rq;
int rc = 0; int rc = 0;
...@@ -1569,343 +1568,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -1569,343 +1568,6 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
switch(cmd) { switch(cmd) {
case SIOCGIWNAME:
rc = iwctl_giwname(dev, NULL, (char *)&(wrq->u.name), NULL);
break;
case SIOCSIWNWID:
case SIOCGIWNWID: //0x8b03 support
rc = -EOPNOTSUPP;
break;
// Set frequency/channel
case SIOCSIWFREQ:
rc = iwctl_siwfreq(dev, NULL, &(wrq->u.freq), NULL);
break;
// Get frequency/channel
case SIOCGIWFREQ:
rc = iwctl_giwfreq(dev, NULL, &(wrq->u.freq), NULL);
break;
// Set desired network name (ESSID)
case SIOCSIWESSID:
{
char essid[IW_ESSID_MAX_SIZE+1];
if (wrq->u.essid.length > IW_ESSID_MAX_SIZE) {
rc = -E2BIG;
break;
}
if (copy_from_user(essid, wrq->u.essid.pointer,
wrq->u.essid.length)) {
rc = -EFAULT;
break;
}
rc = iwctl_siwessid(dev, NULL,
&(wrq->u.essid), essid);
}
break;
// Get current network name (ESSID)
case SIOCGIWESSID:
{
char essid[IW_ESSID_MAX_SIZE+1];
if (wrq->u.essid.pointer) {
iwctl_giwessid(dev, NULL,
&(wrq->u.essid), essid);
if (copy_to_user(wrq->u.essid.pointer,
essid,
wrq->u.essid.length) )
rc = -EFAULT;
}
}
break;
case SIOCSIWAP:
rc = iwctl_siwap(dev, NULL, &(wrq->u.ap_addr), NULL);
break;
// Get current Access Point (BSSID)
case SIOCGIWAP:
rc = iwctl_giwap(dev, NULL, &(wrq->u.ap_addr), NULL);
break;
// Set desired station name
case SIOCSIWNICKN:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWNICKN \n");
rc = -EOPNOTSUPP;
break;
// Get current station name
case SIOCGIWNICKN:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWNICKN \n");
rc = -EOPNOTSUPP;
break;
// Set the desired bit-rate
case SIOCSIWRATE:
rc = iwctl_siwrate(dev, NULL, &(wrq->u.bitrate), NULL);
break;
// Get the current bit-rate
case SIOCGIWRATE:
iwctl_giwrate(dev, NULL, &(wrq->u.bitrate), NULL);
break;
// Set the desired RTS threshold
case SIOCSIWRTS:
rc = iwctl_siwrts(dev, &(wrq->u.rts));
break;
// Get the current RTS threshold
case SIOCGIWRTS:
rc = iwctl_giwrts(dev, NULL, &(wrq->u.rts), NULL);
break;
// Set the desired fragmentation threshold
case SIOCSIWFRAG:
rc = iwctl_siwfrag(dev, NULL, &(wrq->u.frag), NULL);
break;
// Get the current fragmentation threshold
case SIOCGIWFRAG:
rc = iwctl_giwfrag(dev, NULL, &(wrq->u.frag), NULL);
break;
// Set mode of operation
case SIOCSIWMODE:
rc = iwctl_siwmode(dev, NULL, &(wrq->u.mode), NULL);
break;
// Get mode of operation
case SIOCGIWMODE:
iwctl_giwmode(dev, NULL, &(wrq->u.mode), NULL);
break;
// Set WEP keys and mode
case SIOCSIWENCODE:
{
char abyKey[WLAN_WEP232_KEYLEN];
if (wrq->u.encoding.pointer) {
if (wrq->u.encoding.length > WLAN_WEP232_KEYLEN) {
rc = -E2BIG;
break;
}
memset(abyKey, 0, WLAN_WEP232_KEYLEN);
if (copy_from_user(abyKey,
wrq->u.encoding.pointer,
wrq->u.encoding.length)) {
rc = -EFAULT;
break;
}
} else if (wrq->u.encoding.length != 0) {
rc = -EINVAL;
break;
}
rc = iwctl_siwencode(dev, NULL, &(wrq->u.encoding), abyKey);
}
break;
// Get the WEP keys and mode
case SIOCGIWENCODE:
if (!capable(CAP_NET_ADMIN)) {
rc = -EPERM;
break;
}
{
char abyKey[WLAN_WEP232_KEYLEN];
rc = iwctl_giwencode(dev, NULL, &(wrq->u.encoding), abyKey);
if (rc != 0) break;
if (wrq->u.encoding.pointer) {
if (copy_to_user(wrq->u.encoding.pointer,
abyKey,
wrq->u.encoding.length))
rc = -EFAULT;
}
}
break;
// Get the current Tx-Power
case SIOCGIWTXPOW:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n");
rc = -EOPNOTSUPP;
break;
case SIOCSIWTXPOW:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n");
rc = -EOPNOTSUPP;
break;
case SIOCSIWRETRY:
rc = iwctl_siwretry(dev, NULL, &(wrq->u.retry), NULL);
break;
case SIOCGIWRETRY:
rc = iwctl_giwretry(dev, NULL, &(wrq->u.retry), NULL);
break;
// Get range of parameters
case SIOCGIWRANGE:
{
struct iw_range range;
iwctl_giwrange(dev, NULL, &(wrq->u.data), (char *) &range);
if (copy_to_user(wrq->u.data.pointer, &range, sizeof(struct iw_range)))
rc = -EFAULT;
}
break;
case SIOCGIWPOWER:
rc = iwctl_giwpower(dev, NULL, &(wrq->u.power), NULL);
break;
case SIOCSIWPOWER:
rc = iwctl_siwpower(dev, NULL, &(wrq->u.power), NULL);
break;
case SIOCGIWSENS:
rc = iwctl_giwsens(dev, NULL, &(wrq->u.sens), NULL);
break;
case SIOCSIWSENS:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSENS \n");
rc = -EOPNOTSUPP;
break;
case SIOCGIWAPLIST:
if (wrq->u.data.pointer) {
buffer = kzalloc((sizeof(struct sockaddr) +
sizeof(struct iw_quality)) * IW_MAX_AP,
GFP_KERNEL);
if (buffer == NULL) {
rc = -ENOMEM;
break;
}
rc = iwctl_giwaplist(dev, NULL, &(wrq->u.data), buffer);
if (rc < 0) {
kfree(buffer);
break;
}
if (copy_to_user(wrq->u.data.pointer, buffer,
wrq->u.data.length * (sizeof(struct sockaddr)
+ sizeof(struct iw_quality))))
rc = -EFAULT;
kfree(buffer);
}
break;
#ifdef WIRELESS_SPY
// Set the spy list
case SIOCSIWSPY:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n");
rc = -EOPNOTSUPP;
break;
// Get the spy list
case SIOCGIWSPY:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n");
rc = -EOPNOTSUPP;
break;
#endif // WIRELESS_SPY
case SIOCGIWPRIV:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPRIV \n");
rc = -EOPNOTSUPP;
/*
if(wrq->u.data.pointer) {
wrq->u.data.length = sizeof(iwctl_private_args) / sizeof( iwctl_private_args[0]);
if(copy_to_user(wrq->u.data.pointer,
(u_char *) iwctl_private_args,
sizeof(iwctl_private_args)))
rc = -EFAULT;
}
*/
break;
case SIOCSIWAUTH:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH\n");
rc = iwctl_siwauth(dev, NULL, &(wrq->u.param), NULL);
break;
case SIOCGIWAUTH:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAUTH \n");
rc = iwctl_giwauth(dev, NULL, &(wrq->u.param), NULL);
break;
case SIOCSIWGENIE:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWGENIE \n");
rc = iwctl_siwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer);
break;
case SIOCGIWGENIE:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWGENIE \n");
rc = iwctl_giwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer);
break;
case SIOCSIWENCODEEXT:
{
char extra[sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1];
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODEEXT \n");
if(wrq->u.encoding.pointer){
memset(extra, 0, sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1);
if(wrq->u.encoding.length > (sizeof(struct iw_encode_ext)+ MAX_KEY_LEN)){
rc = -E2BIG;
break;
}
if(copy_from_user(extra, wrq->u.encoding.pointer,wrq->u.encoding.length)){
rc = -EFAULT;
break;
}
}else if(wrq->u.encoding.length != 0){
rc = -EINVAL;
break;
}
rc = iwctl_siwencodeext(dev, NULL, &(wrq->u.encoding), extra);
}
break;
case SIOCGIWENCODEEXT:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODEEXT \n");
rc = iwctl_giwencodeext(dev, NULL, &(wrq->u.encoding), NULL);
break;
case SIOCSIWMLME:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMLME \n");
rc = iwctl_siwmlme(dev, NULL, &(wrq->u.data), wrq->u.data.pointer);
break;
case IOCTL_CMD_TEST: case IOCTL_CMD_TEST:
...@@ -1968,50 +1630,9 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -1968,50 +1630,9 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
return ethtool_ioctl(dev, (void *) rq->ifr_data); return ethtool_ioctl(dev, (void *) rq->ifr_data);
// All other calls are currently unsupported
default:
rc = -EOPNOTSUPP;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Ioctl command not supported..%x\n", cmd);
} }
if (pDevice->bCommit) {
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
netif_stop_queue(pDevice->dev);
spin_lock_irq(&pDevice->lock);
bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
spin_unlock_irq(&pDevice->lock);
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n");
spin_lock_irq(&pDevice->lock);
//2007-1121-01<Modify>by EinsnLiu
if (pDevice->bLinkPass &&
memcmp(pMgmt->abyCurrSSID,pMgmt->abyDesireSSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) {
bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
} else {
pDevice->bLinkPass = FALSE;
pMgmt->eCurrState = WMAC_STATE_IDLE;
memset(pMgmt->abyCurrBSSID, 0, 6);
}
ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW);
//End Modify
netif_stop_queue(pDevice->dev);
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
if (!pDevice->bWPASuppWextEnabled)
bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice,
WLAN_CMD_SSID,
NULL);
spin_unlock_irq(&pDevice->lock);
}
pDevice->bCommit = FALSE;
}
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment