From patchwork Wed Dec 12 21:54:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 1870561 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 40E9EDF266 for ; Wed, 12 Dec 2012 21:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754292Ab2LLVzc (ORCPT ); Wed, 12 Dec 2012 16:55:32 -0500 Received: from mail.candelatech.com ([208.74.158.172]:59816 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754080Ab2LLVzb (ORCPT ); Wed, 12 Dec 2012 16:55:31 -0500 Received: from fs3.candelatech.com (firewall.candelatech.com [70.89.124.249]) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id qBCLtCmE013749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Dec 2012 13:55:19 -0800 From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [RFC 2/6] wifi: Don't spam logs with 'Found new beacon' messages. Date: Wed, 12 Dec 2012 13:54:51 -0800 Message-Id: <1355349295-30960-2-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1355349295-30960-1-git-send-email-greearb@candelatech.com> References: <1355349295-30960-1-git-send-email-greearb@candelatech.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ben Greear 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 --- 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(®_beacon->chan, beacon_chan, sizeof(struct ieee80211_channel));