Skip to contentSkip to conversation

wcn36xx: reduce verbosity of drivers messages

PATCH Superseded Ramon Fried 3 participants 4 messages Feb 17, 2018 – Feb 27, 2018 1 message not in the archive Qualcomm WCN36XX wireless driver

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wcn36xx: reduce verbosity of drivers messages

Whenever the WLAN interface is started the FW version and caps are printed, this info should appear as debug info.

---
 drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
 drivers/net/wireless/ath/wcn36xx/smd.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +1 -1
index ab5be6d2c691..8c2654075eb8 100644
@@ -261,7 +261,7 @@ static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
 
 	for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
 		if (get_feat_caps(wcn->fw_feat_caps, i))
-			wcn36xx_info("FW Cap %s\n", wcn36xx_get_cap_name(i));
+			wcn36xx_dbg(WCN36XX_DBG_MAC, "FW Cap %s\n", wcn36xx_get_cap_name(i));
 	}
 }
 
drivers/net/wireless/ath/wcn36xx/smd.c +2 -2
index 2a4871ca9c72..7c4d19b041bc 100644
@@ -409,10 +409,10 @@ static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len)
 	wcn->fw_minor = rsp->start_rsp_params.version.minor;
 	wcn->fw_major = rsp->start_rsp_params.version.major;
 
-	wcn36xx_info("firmware WLAN version '%s' and CRM version '%s'\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware WLAN version '%s' and CRM version '%s'\n",
 		     wcn->wlan_version, wcn->crm_version);
 
-	wcn36xx_info("firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
 		     wcn->fw_major, wcn->fw_minor,
 		     wcn->fw_version, wcn->fw_revision,
 		     rsp->start_rsp_params.stations,
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw
In reply to Ramon Fried
Quoted 30 lines · Ramon Fried

Whenever the WLAN interface is started the FW version and caps are printed, this info should appear as debug info.

---
 drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
 drivers/net/wireless/ath/wcn36xx/smd.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +1 -1
index ab5be6d2c691..8c2654075eb8 100644
@@ -261,7 +261,7 @@ static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
 
 	for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
 		if (get_feat_caps(wcn->fw_feat_caps, i))
-			wcn36xx_info("FW Cap %s\n", wcn36xx_get_cap_name(i));
+			wcn36xx_dbg(WCN36XX_DBG_MAC, "FW Cap %s\n", wcn36xx_get_cap_name(i));
 	}
 }
 
drivers/net/wireless/ath/wcn36xx/smd.c +0 -0
index 2a4871ca9c72..7c4d19b041bc 100644
@@ -409,10 +409,10 @@ static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len)
 	wcn->fw_minor = rsp->start_rsp_params.version.minor;
 	wcn->fw_major = rsp->start_rsp_params.version.major;

drivers/net/wireless/ath/wcn36xx/smd.c static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len) · line 418

Quoted 10 lines
drivers/net/wireless/ath/wcn36xx/smd.c +2 -2
 
-	wcn36xx_info("firmware WLAN version '%s' and CRM version '%s'\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware WLAN version '%s' and CRM version '%s'\n",
 		     wcn->wlan_version, wcn->crm_version);
 
-	wcn36xx_info("firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
 		     wcn->fw_major, wcn->fw_minor,
 		     wcn->fw_version, wcn->fw_revision,
 		     rsp->start_rsp_params.stations,

I think that printing this information, especially the firmware version, is useful. Isn't there a better way to solve this, like print this only once during the driver is loaded or during the first start() call?

Signature · 1 line
Kalle Valo

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi Ramon,

you dropped the mailing lists from CC, I'll add them back.

Quoted 36 lines · Ramon Fried
Quoted 25 lines · Kalle Valo
Quoted 23 lines · Ramon Fried
drivers/net/wireless/ath/wcn36xx/main.c +1 -1
@@ -261,7 +261,7 @@ static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
 
 	for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
 		if (get_feat_caps(wcn->fw_feat_caps, i))
-			wcn36xx_info("FW Cap %s\n", wcn36xx_get_cap_name(i));
+			wcn36xx_dbg(WCN36XX_DBG_MAC, "FW Cap %s\n", wcn36xx_get_cap_name(i));
 	}
 }
 
drivers/net/wireless/ath/wcn36xx/smd.c +1 -1
index 2a4871ca9c72..7c4d19b041bc 100644
@@ -409,10 +409,10 @@ static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len)
 	wcn->fw_minor = rsp->start_rsp_params.version.minor;
 	wcn->fw_major = rsp->start_rsp_params.version.major;
 
-	wcn36xx_info("firmware WLAN version '%s' and CRM version '%s'\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware WLAN version '%s' and CRM version '%s'\n",
 		     wcn->wlan_version, wcn->crm_version);
 
Quoted 9 lines

drivers/net/wireless/ath/wcn36xx/smd.c static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len) · line 418

Quoted 5 lines
drivers/net/wireless/ath/wcn36xx/smd.c +1 -1
-	wcn36xx_info("firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
+	wcn36xx_dbg(WCN36XX_DBG_HAL, "firmware API %u.%u.%u.%u, %u stations, %u bssids\n",
 		     wcn->fw_major, wcn->fw_minor,
 		     wcn->fw_version, wcn->fw_revision,
 		     rsp->start_rsp_params.stations,

I think that printing this information, especially the firmware version, is useful. Isn't there a better way to solve this, like print this only once during the driver is loaded or during the first start() call?

Quoted 1 line

I agree regarding the firmware version. I can fix it.

Good, thanks.

Quoted 2 lines

the capabilities IMHO is really only relevant for debug and hackers who can turn debug on.

Yeah, makes sense.

Signature · 1 line
Kalle Valo