Linux wireless drivers development
 help / color / mirror / Atom feed
From: lemagoup@gmail.com
To: kvalo@qca.qualcomm.com
Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org,
	jmassot@aldebaran.com,
	Pierre Le Magourou <plemagourou@aldebaran.com>
Subject: [PATCH v2 2/3] ath6kl: Fix wrong regulatory domain disconnection.
Date: Mon,  4 Jul 2016 13:07:18 +0200	[thread overview]
Message-ID: <20160704110719.7694-3-plemagourou@aldebaran.com> (raw)
In-Reply-To: <20160704110719.7694-1-plemagourou@aldebaran.com>

From: Pierre Le Magourou <plemagourou@aldebaran.com>

One minute after a successful connection, the kernel checks if the
frequency and the channel width are well configured for the country we
are in. (regulatory domain)

ath6kl driver was setting the NL80211_CHAN_HT20 channel without checking
for the HT capabilities. (we should have NL80211_CHAN_NO_HT in our
case because the firmware did not support HT)

This patch adds a check on ht_cap.ht_supported in order to create the
channel corresponding to the firmware capabilities.

Signed-off-by: Pierre Le Magourou <plemagourou@aldebaran.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..c9c4d7f 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1104,7 +1104,8 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
 
 	cfg80211_chandef_create(&chandef,
 				ieee80211_get_channel(vif->ar->wiphy, freq),
-				(mode == WMI_11G_HT20) ?
+				(mode == WMI_11G_HT20 &&
+				 ath6kl_band_2ghz.ht_cap.ht_supported) ?
 					NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
 
 	mutex_lock(&vif->wdev.mtx);
-- 
2.9.0


  parent reply	other threads:[~2016-07-04 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 11:07 [PATCH v2 0/3] ath6kl: Fix tethering problems lemagoup
2016-07-04 11:07 ` [PATCH v2 1/3] ath6kl: Fix WLAN tethering authentication problem lemagoup
2016-07-19 13:25   ` [v2,1/3] " Kalle Valo
2016-07-04 11:07 ` lemagoup [this message]
2016-07-04 11:07 ` [PATCH v2 3/3] ath6kl: Unset IFF_LOWER_UP flag on AP mode leave lemagoup

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=20160704110719.7694-3-plemagourou@aldebaran.com \
    --to=lemagoup@gmail.com \
    --cc=ath6kl@lists.infradead.org \
    --cc=jmassot@aldebaran.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=plemagourou@aldebaran.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