* [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
@ 2011-11-07 3:01 Marcos Paulo de Souza
2011-11-07 5:43 ` Dan Carpenter
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Marcos Paulo de Souza @ 2011-11-07 3:01 UTC (permalink / raw)
To: kernel-janitors
As asked in the TODO file of the driver, the PRINT_K macro needs to be
removed.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
---
drivers/staging/vt6656/iwctl.c | 46 ++++++++++++++++++++--------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 2121205..8c64928 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -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);
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
2011-11-07 3:01 [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro Marcos Paulo de Souza
@ 2011-11-07 5:43 ` Dan Carpenter
2011-11-07 10:27 ` Marcos Souza
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2011-11-07 5:43 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
Hi Marcos,
This should be sent to devel@driverdev.osuosl.org 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
2011-11-07 3:01 [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro Marcos Paulo de Souza
2011-11-07 5:43 ` Dan Carpenter
@ 2011-11-07 10:27 ` Marcos Souza
2011-11-07 10:47 ` Dan Carpenter
2011-11-07 11:52 ` Marcos Souza
3 siblings, 0 replies; 5+ messages in thread
From: Marcos Souza @ 2011-11-07 10:27 UTC (permalink / raw)
To: kernel-janitors
2011/11/7, Dan Carpenter <dan.carpenter@oracle.com>:
> Hi Marcos,
>
> This should be sent to devel@driverdev.osuosl.org as well.
On copy this time
> 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.
So, I'll send patches to change all these print_k and dbg_prt to dev_dbg
> regards,
> dan carpenter
Thanks for your comments.
>
--
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
2011-11-07 3:01 [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro Marcos Paulo de Souza
2011-11-07 5:43 ` Dan Carpenter
2011-11-07 10:27 ` Marcos Souza
@ 2011-11-07 10:47 ` Dan Carpenter
2011-11-07 11:52 ` Marcos Souza
3 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2011-11-07 10:47 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
On Mon, Nov 07, 2011 at 07:27:52AM -0300, Marcos Souza wrote:
> 2011/11/7, Dan Carpenter <dan.carpenter@oracle.com>:
> > Hi Marcos,
> >
> > This should be sent to devel@driverdev.osuosl.org as well.
> On copy this time
> > 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.
> So, I'll send patches to change all these print_k and dbg_prt to dev_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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro
2011-11-07 3:01 [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro Marcos Paulo de Souza
` (2 preceding siblings ...)
2011-11-07 10:47 ` Dan Carpenter
@ 2011-11-07 11:52 ` Marcos Souza
3 siblings, 0 replies; 5+ messages in thread
From: Marcos Souza @ 2011-11-07 11:52 UTC (permalink / raw)
To: kernel-janitors
2011/11/7, Dan Carpenter <dan.carpenter@oracle.com>:
> On Mon, Nov 07, 2011 at 07:27:52AM -0300, Marcos Souza wrote:
>> 2011/11/7, Dan Carpenter <dan.carpenter@oracle.com>:
>> > Hi Marcos,
>> >
>> > This should be sent to devel@driverdev.osuosl.org as well.
>> On copy this time
>> > 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.
>> So, I'll send patches to change all these print_k and dbg_prt to dev_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.
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.
> regards,
> dan carpenter
>
>
--
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-07 11:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 3:01 [PATCH] drivers/staging/vt6656/iwctl.c: Remove PRINT_K macro Marcos Paulo de Souza
2011-11-07 5:43 ` Dan Carpenter
2011-11-07 10:27 ` Marcos Souza
2011-11-07 10:47 ` Dan Carpenter
2011-11-07 11:52 ` Marcos Souza
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox