|
@@ -108,7 +108,7 @@ static int iwctl_commit(struct net_device *dev,
|
|
|
void *wrq,
|
|
|
char *extra)
|
|
|
{
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT\n");
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -140,7 +140,7 @@ static int iwctl_siwscan(struct net_device *dev,
|
|
|
unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
|
|
|
PWLAN_IE_SSID pItemSSID = NULL;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN\n");
|
|
|
|
|
|
if (pDevice->byReAssocCount > 0) { //reject scan when re-associating!
|
|
|
//send scan event to wpa_Supplicant
|
|
@@ -210,7 +210,7 @@ static int iwctl_giwscan(struct net_device *dev,
|
|
|
long ldBm;
|
|
|
char buf[MAX_WPA_IE_LEN * 2 + 30];
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN\n");
|
|
|
|
|
|
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
|
|
|
// In scanning..
|
|
@@ -353,7 +353,7 @@ int iwctl_siwfreq(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
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 ((wrq->e == 1) &&
|
|
@@ -401,7 +401,7 @@ int iwctl_giwfreq(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ\n");
|
|
|
|
|
|
#ifdef WEXT_USECHANNELS
|
|
|
wrq->m = (int)pMgmt->uCurrChannel;
|
|
@@ -433,10 +433,10 @@ int iwctl_siwmode(struct net_device *dev,
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
int rc = 0;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE\n");
|
|
|
|
|
|
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;
|
|
|
}
|
|
|
|
|
@@ -448,7 +448,7 @@ int iwctl_siwmode(struct net_device *dev,
|
|
|
pDevice->bCommit = true;
|
|
|
|
|
|
}
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc\n");
|
|
|
break;
|
|
|
case IW_MODE_AUTO:
|
|
|
case IW_MODE_INFRA:
|
|
@@ -458,7 +458,7 @@ int iwctl_siwmode(struct net_device *dev,
|
|
|
pDevice->bCommit = true;
|
|
|
|
|
|
}
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure\n");
|
|
|
break;
|
|
|
case IW_MODE_MASTER:
|
|
|
|
|
@@ -472,7 +472,7 @@ int iwctl_siwmode(struct net_device *dev,
|
|
|
pDevice->bCommit = true;
|
|
|
|
|
|
}
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point\n");
|
|
|
break;
|
|
|
|
|
|
case IW_MODE_REPEAT:
|
|
@@ -498,7 +498,7 @@ int iwctl_giwmode(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE\n");
|
|
|
// If not managed, assume it's ad-hoc
|
|
|
switch (pMgmt->eConfigMode) {
|
|
|
case WMAC_CONFIG_ESS_STA:
|
|
@@ -533,7 +533,7 @@ int iwctl_giwrange(struct net_device *dev,
|
|
|
int i, k;
|
|
|
unsigned char abySupportedRates[13] = {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE\n");
|
|
|
if (wrq->pointer) {
|
|
|
wrq->length = sizeof(struct iw_range);
|
|
|
memset(range, 0, sizeof(struct iw_range));
|
|
@@ -640,7 +640,7 @@ int iwctl_siwap(struct net_device *dev,
|
|
|
int rc = 0;
|
|
|
unsigned char ZeroBSSID[WLAN_BSSID_LEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP\n");
|
|
|
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
|
|
|
// In scanning..
|
|
|
printk("SIOCSIWAP(??)-->In scanning...\n");
|
|
@@ -697,7 +697,7 @@ int iwctl_giwap(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP\n");
|
|
|
|
|
|
memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6);
|
|
|
//2008-0410,<Modify> by Einsn Liu
|
|
@@ -800,7 +800,7 @@ int iwctl_siwessid(struct net_device *dev,
|
|
|
//2008-0409-05, <Add> by Einsn Liu
|
|
|
unsigned char len;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID\n");
|
|
|
pDevice->fWPA_Authened = false;
|
|
|
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
|
|
|
// In scanning..
|
|
@@ -811,7 +811,7 @@ int iwctl_siwessid(struct net_device *dev,
|
|
|
// Just send an empty SSID list
|
|
|
memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
|
|
|
memset(pMgmt->abyDesireBSSID, 0xFF, 6);
|
|
|
- PRINT_K("set essid to 'any' \n");
|
|
|
+ PRINT_K("set essid to 'any'\n");
|
|
|
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
|
|
|
return 0;
|
|
|
#endif
|
|
@@ -827,7 +827,7 @@ int iwctl_siwessid(struct net_device *dev,
|
|
|
pItemSSID->len = wrq->length - 1;
|
|
|
} else
|
|
|
pItemSSID->len = wrq->length;
|
|
|
- printk("set essid to %s \n", pItemSSID->abySSID);
|
|
|
+ printk("set essid to %s\n", pItemSSID->abySSID);
|
|
|
//2008-0409-05, <Add> by Einsn Liu
|
|
|
len = (pItemSSID->len > ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) ? pItemSSID->len : ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len;
|
|
|
if ((pDevice->bLinkPass == true) &&
|
|
@@ -885,7 +885,7 @@ int iwctl_siwessid(struct net_device *dev,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID);
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s\n", pItemSSID->abySSID);
|
|
|
}
|
|
|
|
|
|
if (pDevice->flags & DEVICE_FLAGS_OPENED)
|
|
@@ -907,7 +907,7 @@ int iwctl_giwessid(struct net_device *dev,
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
PWLAN_IE_SSID pItemSSID;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID\n");
|
|
|
|
|
|
// Note : if wrq->u.data.flags != 0, we should
|
|
|
// get the relevant SSID from the SSID list...
|
|
@@ -939,7 +939,7 @@ int iwctl_siwrate(struct net_device *dev,
|
|
|
int i;
|
|
|
unsigned char abySupportedRates[13] = {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE\n");
|
|
|
if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
|
|
|
rc = -EINVAL;
|
|
|
return rc;
|
|
@@ -993,7 +993,7 @@ int iwctl_siwrate(struct net_device *dev,
|
|
|
pDevice->uConnectionRate = 3;
|
|
|
} else {
|
|
|
pDevice->uConnectionRate = brate;
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate);
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d\n", pDevice->uConnectionRate);
|
|
|
}
|
|
|
|
|
|
} else {
|
|
@@ -1019,7 +1019,7 @@ int iwctl_giwrate(struct net_device *dev,
|
|
|
//Mark the unnecessary sentences.
|
|
|
// PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE\n");
|
|
|
{
|
|
|
unsigned char abySupportedRates[13] = {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
|
|
|
int brate = 0;
|
|
@@ -1062,7 +1062,7 @@ int iwctl_siwrts(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
int rc = 0;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS\n");
|
|
|
|
|
|
{
|
|
|
int rthr = wrq->value;
|
|
@@ -1090,7 +1090,7 @@ int iwctl_giwrts(struct net_device *dev,
|
|
|
{
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS\n");
|
|
|
wrq->value = pDevice->wRTSThreshold;
|
|
|
wrq->disabled = (wrq->value >= 2312);
|
|
|
wrq->fixed = 1;
|
|
@@ -1111,7 +1111,7 @@ int iwctl_siwfrag(struct net_device *dev,
|
|
|
int rc = 0;
|
|
|
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)
|
|
|
fthr = 2312;
|
|
@@ -1136,7 +1136,7 @@ int iwctl_giwfrag(struct net_device *dev,
|
|
|
{
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG\n");
|
|
|
wrq->value = pDevice->wFragmentationThreshold;
|
|
|
wrq->disabled = (wrq->value >= 2312);
|
|
|
wrq->fixed = 1;
|
|
@@ -1155,7 +1155,7 @@ int iwctl_siwretry(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
int rc = 0;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY\n");
|
|
|
|
|
|
if (wrq->disabled) {
|
|
|
rc = -EINVAL;
|
|
@@ -1188,7 +1188,8 @@ int iwctl_giwretry(struct net_device *dev,
|
|
|
char *extra)
|
|
|
{
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n");
|
|
|
+
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY\n");
|
|
|
wrq->disabled = 0; // Can't be disabled
|
|
|
|
|
|
// Note : by default, display the min retry number
|
|
@@ -1233,7 +1234,7 @@ int iwctl_siwencode(struct net_device *dev,
|
|
|
|
|
|
PSKeyTable pkeytab;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE\n");
|
|
|
|
|
|
if ((wrq->flags & IW_ENCODE_DISABLED) == 0) {
|
|
|
//Not disable encryption
|
|
@@ -1413,7 +1414,7 @@ int iwctl_siwpower(struct net_device *dev,
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
int rc = 0;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER\n");
|
|
|
|
|
|
if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
|
|
|
rc = -EINVAL;
|
|
@@ -1435,14 +1436,14 @@ int iwctl_siwpower(struct net_device *dev,
|
|
|
}
|
|
|
switch (wrq->flags & IW_POWER_MODE) {
|
|
|
case IW_POWER_UNICAST_R:
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R\n");
|
|
|
rc = -EINVAL;
|
|
|
break;
|
|
|
case IW_POWER_ALL_R:
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ALL_R \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ALL_R\n");
|
|
|
rc = -EINVAL;
|
|
|
case IW_POWER_ON:
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ON \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ON\n");
|
|
|
break;
|
|
|
default:
|
|
|
rc = -EINVAL;
|
|
@@ -1463,7 +1464,7 @@ int iwctl_giwpower(struct net_device *dev,
|
|
|
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
|
|
|
int mode = pDevice->ePSMode;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER\n");
|
|
|
|
|
|
wrq->disabled = (mode == WMAC_POWER_CAM);
|
|
|
if (wrq->disabled)
|
|
@@ -1492,7 +1493,7 @@ int iwctl_giwsens(struct net_device *dev,
|
|
|
PSDevice pDevice = (PSDevice)netdev_priv(dev);
|
|
|
long ldBm;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
|
|
|
if (pDevice->bLinkPass == true) {
|
|
|
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
|
|
|
wrq->value = ldBm;
|
|
@@ -1519,7 +1520,7 @@ int iwctl_siwauth(struct net_device *dev,
|
|
|
static int wpa_version = 0; //must be static to save the last value,einsn liu
|
|
|
static int pairwise = 0;
|
|
|
|
|
|
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n");
|
|
|
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH\n");
|
|
|
switch (wrq->flags & IW_AUTH_INDEX) {
|
|
|
case IW_AUTH_WPA_VERSION:
|
|
|
wpa_version = wrq->value;
|
|
@@ -1694,7 +1695,7 @@ int iwctl_siwencodeext(struct net_device *dev,
|
|
|
u8 key_array[64];
|
|
|
int ret = 0;
|
|
|
|
|
|
- PRINT_K("SIOCSIWENCODEEXT...... \n");
|
|
|
+ PRINT_K("SIOCSIWENCODEEXT......\n");
|
|
|
|
|
|
param = kzalloc(sizeof(*param), GFP_KERNEL);
|
|
|
if (param == NULL)
|