Search Linux Wireless

[RFC 2/6] wifi: Don't spam logs with 'Found new beacon' messages.

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

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

We saw logs fill with this (at very high speeds):

cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0
cfg80211: Found new beacon on frequency: 5745 MHz (Ch 149) on wiphy0

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
 net/wireless/reg.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 6e53089..8aa7867 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2067,11 +2067,12 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy,
 	if (!reg_beacon)
 		return -ENOMEM;
 
-	REG_DBG_PRINT("Found new beacon on "
-		      "frequency: %d MHz (Ch %d) on %s\n",
-		      beacon_chan->center_freq,
-		      ieee80211_frequency_to_channel(beacon_chan->center_freq),
-		      wiphy_name(wiphy));
+	if (printk_ratelimit())
+		REG_DBG_PRINT("Found new beacon on "
+			      "frequency: %d MHz (Ch %d) on %s\n",
+			      beacon_chan->center_freq,
+			      ieee80211_frequency_to_channel(beacon_chan->center_freq),
+			      wiphy_name(wiphy));
 
 	memcpy(&reg_beacon->chan, beacon_chan,
 		sizeof(struct ieee80211_channel));
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux