[PATCH 4/8] staging: brcm80211: decrease level of non-error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Non-error messages which were printed using WL_ERROR macro
were decreased to WL_NONE (which is a no_printk) or WL_TRACE
level macros. mac80211 callbacks that are not handled by the
driver are printed with WL_ERROR.

Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
Reviewed-by: Brett Rudley <brudley@xxxxxxxxxxxx>
Reviewed-by: Henry Ptasinski <henryp@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmsmac/wl_mac80211.c  |   72 ++++++++++-----------
 drivers/staging/brcm80211/brcmsmac/wlc_bmac.c     |    2 +-
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    2 +-
 3 files changed, 37 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
index 7e1dd43..f79d239 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
@@ -149,6 +149,7 @@ static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 {
 	int status;
 	struct wl_info *wl = hw->priv;
+
 	WL_LOCK(wl);
 	if (!wl->pub->up) {
 		WL_ERROR("ops->tx called while down\n");
@@ -262,8 +263,6 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
 
 	WL_LOCK(wl);
 	if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
-		WL_NONE("%s: Setting listen interval to %d\n",
-			__func__, conf->listen_interval);
 		if (wlc_iovar_setint
 		    (wl->wlc, "bcn_li_bcn", conf->listen_interval)) {
 			WL_ERROR("%s: Error setting listen_interval\n",
@@ -275,13 +274,15 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
 		ASSERT(new_int == conf->listen_interval);
 	}
 	if (changed & IEEE80211_CONF_CHANGE_MONITOR)
-		WL_NONE("Need to set monitor mode\n");
+		WL_ERROR("%s: change monitor mode: %s (implement)\n", __func__,
+			 conf->flags & IEEE80211_CONF_MONITOR ?
+				"true" : "false");
 	if (changed & IEEE80211_CONF_CHANGE_PS)
-		WL_NONE("Need to set Power-save mode\n");
+		WL_ERROR("%s: change power-save mode: %s (implement)\n",
+			 __func__, conf->flags & IEEE80211_CONF_PS ?
+				"true" : "false");
 
 	if (changed & IEEE80211_CONF_CHANGE_POWER) {
-		WL_NONE("%s: Setting tx power to %d dbm\n",
-			__func__, conf->power_level);
 		if (wlc_iovar_setint
 		    (wl->wlc, "qtxpower", conf->power_level * 4)) {
 			WL_ERROR("%s: Error setting power_level\n", __func__);
@@ -297,10 +298,6 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
 		err = ieee_set_channel(hw, conf->channel, conf->channel_type);
 	}
 	if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
-		WL_NONE("%s: srl %d, lrl %d\n",
-			__func__,
-			conf->short_frame_max_tx_count,
-			conf->long_frame_max_tx_count);
 		if (wlc_set
 		    (wl->wlc, WLC_SET_SRL,
 		     conf->short_frame_max_tx_count) < 0) {
@@ -333,23 +330,22 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw,
 		/* association status changed (associated/disassociated)
 		 * also implies a change in the AID.
 		 */
-		WL_NONE("Associated: %s\n", info->assoc ? "true" : "false");
+		WL_ERROR("%s: %s: %sassociated\n", KBUILD_MODNAME, __func__,
+			 info->assoc ? "" : "dis");
 		wlc_associate_upd(wl->wlc, info->assoc);
 	}
 	if (changed & BSS_CHANGED_ERP_CTS_PROT) {
 		/* CTS protection changed */
-		WL_NONE("Use_cts_prot: %s (implement)\n",
+		WL_ERROR("%s: use_cts_prot: %s (implement)\n", __func__,
 			info->use_cts_prot ? "true" : "false");
 	}
 	if (changed & BSS_CHANGED_ERP_PREAMBLE) {
 		/* preamble changed */
-		WL_NONE("Short preamble: %s (implement)\n",
+		WL_ERROR("%s: short preamble: %s (implement)\n", __func__,
 			info->use_short_preamble ? "true" : "false");
 	}
 	if (changed & BSS_CHANGED_ERP_SLOT) {
 		/* slot timing changed */
-		WL_NONE("Changing short slot: %s\n",
-			info->use_short_slot ? "true" : "false");
 		if (info->use_short_slot)
 			val = 1;
 		else
@@ -370,57 +366,58 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw,
 	}
 	if (changed & BSS_CHANGED_BASIC_RATES) {
 		/* Basic rateset changed */
-		WL_NONE("Need to change Basic Rates: 0x%x (implement)\n",
-			(u32) info->basic_rates);
+		WL_ERROR("%s: Need to change Basic Rates: 0x%x (implement)\n",
+			 __func__, (u32) info->basic_rates);
 	}
 	if (changed & BSS_CHANGED_BEACON_INT) {
 		/* Beacon interval changed */
-		WL_NONE("Beacon Interval: %d\n",
-			info->beacon_int);
+		WL_NONE("%s: Beacon Interval: %d\n",
+			__func__, info->beacon_int);
 		wlc_set(wl->wlc, WLC_SET_BCNPRD, info->beacon_int);
 	}
 	if (changed & BSS_CHANGED_BSSID) {
 		/* BSSID changed, for whatever reason (IBSS and managed mode) */
-		WL_NONE("new BSSID: aid %d  bss:%pM\n",
-			info->aid, info->bssid);
+		WL_NONE("%s: new BSSID: aid %d  bss:%pM\n",
+			__func__, info->aid, info->bssid);
 		wlc_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET,
 				  info->bssid);
 	}
 	if (changed & BSS_CHANGED_BEACON) {
 		/* Beacon data changed, retrieve new beacon (beaconing modes) */
-		WL_NONE("BSS_CHANGED_BEACON\n");
+		WL_ERROR("BSS_CHANGED_BEACON\n");
 	}
 	if (changed & BSS_CHANGED_BEACON_ENABLED) {
 		/* Beaconing should be enabled/disabled (beaconing modes) */
-		WL_NONE("Beacon enabled: %s\n",
+		WL_ERROR("Beacon enabled: %s\n",
 			 info->enable_beacon ? "true" : "false");
 	}
 	if (changed & BSS_CHANGED_CQM) {
 		/* Connection quality monitor config changed */
-		WL_NONE("BSS_CHANGED_CQM: threshold %d, hys %d\n",
-			info->cqm_rssi_thold, info->cqm_rssi_hyst);
+		WL_ERROR("%s: quality monitor: threshold %d, hys %d\n",
+			 __func__, info->cqm_rssi_thold, info->cqm_rssi_hyst);
 	}
 	if (changed & BSS_CHANGED_IBSS) {
 		/* IBSS join status changed */
-		WL_NONE("BSS_CHANGED_IBSS: %s\n",
+		WL_ERROR("%s: ibss joined: %s (implement)\n", __func__,
 			info->ibss_joined ? "true" : "false");
 	}
 	if (changed & BSS_CHANGED_ARP_FILTER) {
 		/* Hardware ARP filter address list or state changed */
-		WL_NONE("BSS_CHANGED_ARP_FILTER: enabled %s, count %d\n",
-			info->arp_filter_enabled ? "true" : "false",
-			info->arp_addr_cnt);
+		WL_ERROR("%s: arp filtering: enabled %s count %d (implement)\n",
+			 __func__, info->arp_filter_enabled ? "true" : "false",
+			 info->arp_addr_cnt);
 	}
 	if (changed & BSS_CHANGED_QOS) {
 		/*
 		 * QoS for this association was enabled/disabled.
 		 * Note that it is only ever disabled for station mode.
 		 */
-		 WL_NONE("BSS_CHANGED_QOS: %s\n", info->qos ? "true" : "false");
+		WL_ERROR("%s: qos enabled: %s (implement)\n",
+			 __func__, info->qos ? "true" : "false");
 	}
 	if (changed & BSS_CHANGED_IDLE) {
 		/* Idle changed for this BSS/interface */
-		WL_NONE("BSS_CHANGED_IDLE: %s\n",
+		WL_NONE("%s: idle status: %s\n", __func__,
 			info->idle ? "true" : "false");
 	}
 	return;
@@ -465,7 +462,7 @@ wl_ops_configure_filter(struct ieee80211_hw *hw,
 static int
 wl_ops_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)
 {
-	WL_ERROR("%s: Enter\n", __func__);
+	WL_NONE("%s: Enter\n", __func__);
 	return 0;
 }
 
@@ -646,7 +643,7 @@ static void wl_ops_rfkill_poll(struct ieee80211_hw *hw)
 	blocked = wlc_check_radio_disabled(wl->wlc);
 	WL_UNLOCK(wl);
 
-	WL_ERROR("wl: rfkill_poll: %d\n", blocked);
+	WL_NONE("wl: rfkill_poll: %d\n", blocked);
 	wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked);
 }
 
@@ -676,7 +673,7 @@ static const struct ieee80211_ops wl_ops = {
 
 static int wl_set_hint(struct wl_info *wl, char *abbrev)
 {
-	WL_ERROR("%s: Sending country code %c%c to MAC80211\n",
+	WL_NONE("%s: Sending country code %c%c to MAC80211\n",
 		 __func__, abbrev[0], abbrev[1]);
 	return regulatory_hint(wl->pub->ieee_hw->wiphy, abbrev);
 }
@@ -1532,12 +1529,12 @@ static void BCMFASTPATH wl_dpc(unsigned long data)
 
 static void wl_link_up(struct wl_info *wl, char *ifname)
 {
-	WL_ERROR("wl%d: link up (%s)\n", wl->pub->unit, ifname);
+	WL_NONE("wl%d: link up (%s)\n", wl->pub->unit, ifname);
 }
 
 static void wl_link_down(struct wl_info *wl, char *ifname)
 {
-	WL_ERROR("wl%d: link down (%s)\n", wl->pub->unit, ifname);
+	WL_NONE("wl%d: link down (%s)\n", wl->pub->unit, ifname);
 }
 
 void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e)
@@ -1885,7 +1882,8 @@ bool wl_rfkill_set_hw_state(struct wl_info *wl)
 {
 	bool blocked = wlc_check_radio_disabled(wl->wlc);
 
-	WL_ERROR("%s: update hw state: blocked=%s\n", __func__, blocked ? "true" : "false");
+	WL_NONE("%s: update hw state: blocked=%s\n", __func__,
+		blocked ? "true" : "false");
 	wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked);
 	if (blocked)
 		wiphy_rfkill_start_polling(wl->pub->ieee_hw->wiphy);
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
index 8d9aca5..5f0e7e6 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
@@ -995,7 +995,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
 		goto fail;
 	}
 
-	WL_ERROR("%s:: deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
+	WL_TRACE("%s:: deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
 		 __func__, wlc_hw->deviceid, wlc_hw->_nbands,
 		 wlc_hw->sih->boardtype, macaddr);
 
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
index 41c8c60..5628182 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
@@ -8331,7 +8331,7 @@ void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi,
 	uint prio_bits;
 	uint cur_bits;
 
-	WL_ERROR("%s: flow control kicks in\n", __func__);
+	WL_TRACE("%s: flow control kicks in\n", __func__);
 
 	if (prio == ALLPRIO) {
 		prio_bits = TXQ_STOP_FOR_PRIOFC_MASK;
-- 
1.7.1


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux