drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
Subsystems (2)
PATCH 1/1 drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
As asked in the TODO file of the driver, the PRINT_K macro needs to be removed.
--- drivers/staging/vt6656/iwctl.c | 46 ++++++++++++++++++++-------------------- 1 files changed, 23 insertions(+), 23 deletions(-)
drivers/staging/vt6656/iwctl.c +23 -23
@@ -157,18 +157,18 @@ int iwctl_siwscan(struct net_device *dev,if (!(pDevice->flags &DEVICE_FLAGS_OPENED ))return -EINVAL ; -PRINT_K (" SIOCSIWSCAN\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO " SIOCSIWSCAN \n" );if (pMgmt->eScanState =WMAC_IS_SCANNING ) {// In scanning.. -PRINT_K ("SIOCSIWSCAN(overlap??)-->In scanning...\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWSCAN(overlap??)-->In scanning...\n" );return -EAGAIN ; }if (pDevice->byReAssocCount >0 ) {//reject scan when re-associating! //send scan event to wpa_Supplicant union iwreq_data wrqu; -PRINT_K ("wireless_send_event--->SIOCGIWSCAN(scan done)\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "wireless_send_event--->SIOCGIWSCAN(scan done)\n" );memset (&wrqu,0 ,sizeof (wrqu));wireless_send_event (pDevice->dev,SIOCGIWSCAN , &wrqu,NULL );return 0 ;
@@ -192,7 +192,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!else pItemSSID->len = req->essid_len; pMgmt->eScanType =WMAC_SCAN_PASSIVE ; -PRINT_K ("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n" ,((PWLAN_IE_SSID )abyScanSSID)->abySSID, +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n" , ((PWLAN_IE_SSID )abyScanSSID)->abySSID, ((PWLAN_IE_SSID )abyScanSSID)->len);bScheduleCommand ((void *) pDevice,WLAN_CMD_BSSID_SCAN , abyScanSSID);spin_unlock_irq (&pDevice->lock);
@@ -665,7 +665,7 @@ int iwctl_siwap(struct net_device *dev,int rc =0 ;BYTE ZeroBSSID[WLAN_BSSID_LEN ]={0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; -PRINT_K (" SIOCSIWAP \n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO " SIOCSIWAP \n" );if (wrq->sa_family !=ARPHRD_ETHER ) rc = -EINVAL ;
@@ -675,7 +675,7 @@ int iwctl_siwap(struct net_device *dev,//mike :add if ((is_broadcast_ether_addr (pMgmt->abyDesireBSSID)) || (memcmp (pMgmt->abyDesireBSSID, ZeroBSSID,6 ) =0 )){ -PRINT_K ("SIOCSIWAP:invalid desired BSSID return!\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWAP:invalid desired BSSID return!\n" );return rc; }//mike add: if desired AP is hidden ssid(there are two same BSSID in list),
@@ -690,7 +690,7 @@ int iwctl_siwap(struct net_device *dev, } }if (uSameBssidNum >=2 ) {//hit: desired AP is in hidden ssid mode!!! -PRINT_K ("SIOCSIWAP:ignore for desired AP in hidden mode\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWAP:ignore for desired AP in hidden mode\n" );return rc; } }
@@ -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" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "set essid to 'any' \n" );#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //Unknown desired AP,so here need not associate?? return 0 ;
@@ -829,7 +829,7 @@ int iwctl_siwessid(struct net_device *dev, }else pItemSSID->len = wrq->length; -PRINT_K ("set essid to %s \n" ,pItemSSID->abySSID); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "set essid to %s\n" , pItemSSID->abySSID);//mike:need clear desiredBSSID if (pItemSSID->len=0 ) {
@@ -855,7 +855,7 @@ int iwctl_siwessid(struct net_device *dev, );if (pCurr =NULL ){ -PRINT_K ("SIOCSIWESSID:hidden ssid site survey before associate.......\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWESSID:hidden ssid site survey before associate.......\n" );vResetCommandTimer ((void *) pDevice); pMgmt->eScanType =WMAC_SCAN_ACTIVE ; bScheduleCommand((void *) pDevice,
@@ -875,7 +875,7 @@ int iwctl_siwessid(struct net_device *dev, } }if (uSameBssidNum >=2 ) {//hit: desired AP is in hidden ssid mode!!! -PRINT_K ("SIOCSIWESSID:hidden ssid directly associate.......\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWESSID:hidden ssid directly associate.......\n" );vResetCommandTimer ((void *) pDevice); pMgmt->eScanType =WMAC_SCAN_PASSIVE ;//this scan type,you'll submit scan result! bScheduleCommand((void *) pDevice,
@@ -1572,20 +1572,20 @@ int iwctl_siwauth(struct net_device *dev,case IW_AUTH_WPA_VERSION : wpa_version = wrq->value;if (wrq->value =IW_AUTH_WPA_VERSION_DISABLED ) { -PRINT_K ("iwctl_siwauth:set WPADEV to disable at 1??????\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set WPADEV to disable at 1??????\n" );//pDevice->bWPADEVUp = FALSE; }else if (wrq->value =IW_AUTH_WPA_VERSION_WPA ) { -PRINT_K ("iwctl_siwauth:set WPADEV to WPA1******\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set WPADEV to WPA1******\n" ); }else { -PRINT_K ("iwctl_siwauth:set WPADEV to WPA2******\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set WPADEV to WPA2******\n" ); }//pDevice->bWPASuppWextEnabled =TRUE; break ;case IW_AUTH_CIPHER_PAIRWISE : pairwise = wrq->value; -PRINT_K ("iwctl_siwauth:set pairwise=%d\n" ,pairwise); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set pairwise=%d\n" , pairwise);if (pairwise =IW_AUTH_CIPHER_CCMP ){ pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled; }else if (pairwise =IW_AUTH_CIPHER_TKIP ){
@@ -1599,7 +1599,7 @@ int iwctl_siwauth(struct net_device *dev,break ;case IW_AUTH_CIPHER_GROUP : -PRINT_K ("iwctl_siwauth:set GROUP=%d\n" ,wrq->value); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set GROUP=%d\n" , wrq->value);if (wpa_version =IW_AUTH_WPA_VERSION_DISABLED )break ;if (pairwise =IW_AUTH_CIPHER_NONE ){
@@ -1611,7 +1611,7 @@ int iwctl_siwauth(struct net_device *dev, }break ;case IW_AUTH_KEY_MGMT : -PRINT_K ("iwctl_siwauth(wpa_version=%d):set KEY_MGMT=%d\n" ,wpa_version,wrq->value); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth(wpa_version=%d):set KEY_MGMT=%d\n" , wpa_version, wrq->value);if (wpa_version =IW_AUTH_WPA_VERSION_WPA2 ){if (wrq->value =IW_AUTH_KEY_MGMT_PSK ) pMgmt->eAuthenMode =WMAC_AUTH_WPA2PSK ;
@@ -1630,7 +1630,7 @@ int iwctl_siwauth(struct net_device *dev,case IW_AUTH_DROP_UNENCRYPTED :break ;case IW_AUTH_80211_AUTH_ALG : -PRINT_K ("iwctl_siwauth:set AUTH_ALG=%d\n" ,wrq->value); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set AUTH_ALG=%d\n" , wrq->value);if (wrq->value=IW_AUTH_ALG_OPEN_SYSTEM ){ pMgmt->bShareKeyAlgorithmúLSE; }else if (wrq->value=IW_AUTH_ALG_SHARED_KEY ){
@@ -1658,7 +1658,7 @@ int iwctl_siwauth(struct net_device *dev, pMgmt->bShareKeyAlgorithm = FALSE; pMgmt->eAuthenMode =WMAC_AUTH_OPEN ;//pDevice->bWPADEVUp = FALSE; -PRINT_K ("iwctl_siwauth:set WPADEV to disaable at 2?????\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwauth:set WPADEV to disaable at 2?????\n" ); }break ;
@@ -1770,7 +1770,7 @@ int iwctl_siwencodeext(struct net_device *dev,u8 key_array[64 ];int ret=0 ; -PRINT_K ("SIOCSIWENCODEEXT...... \n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWENCODEEXT...... \n" ); blen =sizeof (*param); buf =kmalloc ((int )blen, (int )GFP_KERNEL );
@@ -1794,7 +1794,7 @@ switch (ext->alg) { alg_name =WPA_ALG_CCMP ;break ;default : -PRINT_K ("Unknown alg = %d\n" ,ext->alg); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "Unknown alg = %d\n" , ext->alg); ret= -ENOMEM ; goto error; }
@@ -1856,7 +1856,7 @@ if(param->u.wpa_key.alg_name = WPA_ALG_NONE) { } }if (pDevice->bwextstep3 = TRUE) { -PRINT_K ("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n" ); pDevice->bwextstep0 = FALSE; pDevice->bwextstep1 = FALSE; pDevice->bwextstep2 = FALSE;
@@ -1911,7 +1911,7 @@ int iwctl_siwmlme(struct net_device *dev,//break; case IW_MLME_DISASSOC :if (pDevice->bLinkPass = TRUE){ -PRINT_K ("iwctl_siwmlme--->send DISASSOCIATE\n" ); +DBG_PRT (MSG_LEVEL_INFO ,KERN_INFO "iwctl_siwmlme--->send DISASSOCIATE\n" );bScheduleCommand ((void *) pDevice,WLAN_CMD_DISASSOCIATE ,NULL );
Signature · 6 lines
1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Marcos,
This should be sent to [email protected] as well.
DBG_PRT() is just as bad as PRINT_K(). The first example in iwctl_siwscan() should be either pr_debug() or dev_dbg(). Also the message itself is wrong.
regards,
dan carpenter
2011/11/7, Dan Carpenter <[email protected]>:
Quoted 3 lines
Hi Marcos,
This should be sent to [email protected] as well.
On copy this time
Quoted 3 lines
DBG_PRT()is just as bad asPRINT_K(). The first example iniwctl_siwscan()should be eitherpr_debug()ordev_dbg(). Also the message itself is wrong.
So, I'll send patches to change all these print_k and dbg_prt to dev_dbg
Quoted 2 lines
regards,
dan carpenter
Thanks for your comments.
Quoted 1 line
Signature · 7 lines
Marcos Paulo de Souza *Porque uma vida sem desafios é uma vida sem razão.* -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Marcos Souza
2011/11/7, Dan Carpenter <[email protected]>:
Quoted 3 lines
Hi Marcos,
This should be sent to [email protected] as well.
On copy this time
Quoted 3 lines
DBG_PRT()is just as bad asPRINT_K(). The first example iniwctl_siwscan()should be eitherpr_debug()ordev_dbg(). Also the message itself is wrong.So, I'll send patches to change all these
print_kanddbg_prttodev_dbg
It's not as simple as doing a sed over the driver. You have to look at each one and decide what it should be. I only looked at the first PRINT_K() and said specific one should be a pr_debug() not that all of them should.
regards,
dan carpenter
2011/11/7, Dan Carpenter <[email protected]>:
Quoted 9 lines · Marcos Souza
Quoted 8 lines
2011/11/7, Dan Carpenter <[email protected]>:
Quoted 3 lines
Hi Marcos,
This should be sent to [email protected] as well.
On copy this time
Quoted 3 lines
DBG_PRT()is just as bad asPRINT_K(). The first example iniwctl_siwscan()should be eitherpr_debug()ordev_dbg(). Also the message itself is wrong.
Quoted 6 lines
Quoted 1 line
So, I'll send patches to change all these
print_kanddbg_prttodev_dbgIt's not as simple as doing a sed over the driver. You have to look at each one and decide what it should be. I only looked at the first
PRINT_K()and said specific one should be apr_debug()not that all of them should.
Sorry, I think I was not so clear as I wanted. I'll analyse all the uses of dbg_prt and print_k, and change these as they can be assigned to pr_debug and dev_dbg.
Quoted 4 lines
regards,
dan carpenter
Signature · 7 lines
Marcos Paulo de Souza *Porque uma vida sem desafios é uma vida sem razão.* -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html