From: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qca.qualcomm.com>
Subject: Re: [PATCH] ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events
Date: Fri, 16 Nov 2012 16:20:15 -0800 [thread overview]
Message-ID: <20121117002015.GQ3354@lenteja.do-not-panic.com> (raw)
In-Reply-To: <20121116082804.10073.67557.stgit@localhost6.localdomain6>
On Fri, Nov 16, 2012 at 10:28:04AM +0200, Kalle Valo wrote:
> As ath6kl firmware can't do intersections the driver should only listen
> to regdom changes from cellular base stations, all other requests need to
> be refused.
>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath6kl/cfg80211.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> index bf5e7d5..41dea0d 100644
> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -3500,11 +3500,18 @@ static int ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
> int ret, i;
>
> ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
> - "cfg reg_notify %c%c%s%s initiator %d\n",
> + "cfg reg_notify %c%c%s%s initiator %d hint_type %d\n",
> request->alpha2[0], request->alpha2[1],
> request->intersect ? " intersect" : "",
> request->processed ? " processed" : "",
> - request->initiator);
> + request->initiator, request->user_reg_hint_type);
> +
> + /*
> + * As firmware is not able intersect regdoms, we can only listen to
> + * cellular hints.
> + */
> + if (request->user_reg_hint_type != NL80211_USER_REG_HINT_CELL_BASE)
> + return -EOPNOTSUPP;
The reg_notifier() doesn't need to process all requests and we don't care
if it fails so a few things for the future if its not too late to respin:
* The reg_notifier() on the kernel can be made to return void, and simply
allow routines to exit early by a simple non return return.
* The comment at the top here seems non relevant as feature is to
support cell base station hints, not to support or process all
hints. That is, the reg notifier does work with the fimrware only
in case of the cell base station hint.
Luis
prev parent reply other threads:[~2012-11-17 0:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 8:28 [PATCH] ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events Kalle Valo
2012-11-16 11:38 ` Kalle Valo
2012-11-17 0:20 ` Luis R. Rodriguez [this message]
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=20121117002015.GQ3354@lenteja.do-not-panic.com \
--to=rodrigue@qca.qualcomm.com \
--cc=ath6kl-devel@qca.qualcomm.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/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).