linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Cc: Senthilkumar Balasubramanian
	<Senthilkumar.Balasubramanian@Atheros.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	Easwar Krishnan <Easwar.Krishnan@Atheros.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 6/7] cfg80211: add debug print when processing a channel
Date: Thu, 21 Oct 2010 02:04:07 -0700	[thread overview]
Message-ID: <20101021090407.GE2776@tux> (raw)
In-Reply-To: <20101021090254.GC2776@tux>

On Thu, Oct 21, 2010 at 02:02:54AM -0700, Luis Rodriguez wrote:
> On Thu, Oct 21, 2010 at 01:18:28AM -0700, Senthilkumar Balasubramanian wrote:
> > On Wed, Oct 20, 2010 at 10:48:58PM +0530, Luis R. Rodriguez wrote:
> > > In the worst case you are seeing really odd things you want
> > > more information than what is provided right now, for those
> > > that insist and want debug info through CONFIG_CFG80211_REG_DEBUG
> > > provide a print of when we are processing a channel and with what
> > > regulatory rule.
> > > 
> > > Cc: Easwar Krishnan <easwar.krishnan@atheros.com>
> > > Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> > > ---
> > >  net/wireless/reg.c |   40 ++++++++++++++++++++++++++++++++++++++++
> > >  1 files changed, 40 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> > > index 62396b2..f0ff146 100644
> > > --- a/net/wireless/reg.c
> > > +++ b/net/wireless/reg.c
> > > @@ -728,6 +728,42 @@ static const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
> > >  	}
> > >  }
> > >  
> > > +#ifdef CONFIG_CFG80211_REG_DEBUG
> > > +
> > > +static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
> > > +				    u32 desired_bw_khz,
> > > +				    const struct ieee80211_reg_rule *reg_rule)
> > > +{
> > > +	const struct ieee80211_power_rule *power_rule;
> > > +	const struct ieee80211_freq_range *freq_range;
> > > +	char max_antenna_gain[32];
> > > +
> > > +	power_rule = &reg_rule->power_rule;
> > > +	freq_range = &reg_rule->freq_range;
> > > +
> > > +	if (!power_rule->max_antenna_gain)
> > > +		snprintf(max_antenna_gain, 32, "N/A");
> > > +	else
> > > +		snprintf(max_antenna_gain, 32, "%d", power_rule->max_antenna_gain);
> > > +
> > > +	REG_DBG_PRINT("cfg80211: Updating information on frequency %d MHz "
> > > +		      "for %d a MHz width channel with regulatory rule:\n",
> > > +		      chan->center_freq,
> > > +		      KHZ_TO_MHZ(desired_bw_khz));
> > > +
> > > +	REG_DBG_PRINT("cfg80211: %d KHz - %d KHz @  KHz), (%s mBi, %d mBm)\n",
> > > +		      freq_range->start_freq_khz,
> > > +		      freq_range->end_freq_khz,
> > > +		      max_antenna_gain,
> > > +		      power_rule->max_eirp);
> > > +}
> > > +#else
> > > +static void reg_reg_rule_print_dbg(const struct ieee80211_reg_rule *reg_rule)
> > This will break compilation. Function name and arguments needs to be fixed here.
> 
> Good catch. I'll fix in the AM.

BTW , feel free to fix my patches and resend :)

  Luis

  reply	other threads:[~2010-10-21  9:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 17:18 [PATCH 0/7] cfg80211: few regulatory fixes and debugging enhancements Luis R. Rodriguez
2010-10-20 17:18 ` [PATCH 1/7] cfg80211: pass the reg hint initiator to helpers Luis R. Rodriguez
2010-10-20 17:18 ` [PATCH 2/7] cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY Luis R. Rodriguez
2010-10-20 21:24   ` Gábor Stefanik
2010-10-20 17:18 ` [PATCH 3/7] cfg80211: fix disabling channels based on hints Luis R. Rodriguez
2010-10-20 17:18 ` [PATCH 4/7] cfg80211: add debug prints for when we ignore regulatory hints Luis R. Rodriguez
2010-10-20 17:18 ` [PATCH 5/7] cfg80211: add debug print when disabling a channel on a custom regd Luis R. Rodriguez
2010-10-20 17:18 ` [PATCH 6/7] cfg80211: add debug print when processing a channel Luis R. Rodriguez
2010-10-21  8:18   ` Senthil Balasubramanian
2010-10-21  9:02     ` Luis R. Rodriguez
2010-10-21  9:04       ` Luis R. Rodriguez [this message]
2010-10-20 17:18 ` [PATCH 7/7] cfg80211: prefix REG_DBG_PRINT() with cfg80211 Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101021090407.GE2776@tux \
    --to=lrodriguez@atheros.com \
    --cc=Easwar.Krishnan@Atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=Senthilkumar.Balasubramanian@Atheros.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).