* [PATCH] mac80211: print info when disabling HT
@ 2012-05-30 11:56 Johannes Berg
2012-05-30 13:48 ` Joe Perches
2012-05-30 13:57 ` [PATCH v2] " Johannes Berg
0 siblings, 2 replies; 9+ messages in thread
From: Johannes Berg @ 2012-05-30 11:56 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Make mac80211 print a message when it disables
HT due to the connection using WEP/TKIP or due
to the AP not supporting WMM/QoS.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/mlme.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/net/mac80211/mlme.c 2012-05-30 10:39:53.000000000 +0200
+++ b/net/mac80211/mlme.c 2012-05-30 13:54:29.000000000 +0200
@@ -3326,11 +3326,15 @@ int ieee80211_mgd_assoc(struct ieee80211
* We can set this to true for non-11n hardware, that'll be checked
* separately along with the peer capabilities.
*/
- for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
+ for (i = 0; i < req->crypto.n_ciphers_pairwise; i++) {
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
- req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104)
+ req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_printk(KERN_INFO, sdata->dev,
+ "disabling HT due to WEP/TKIP use\n");
+ }
+ }
if (req->flags & ASSOC_REQ_DISABLE_HT)
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
@@ -3338,8 +3342,11 @@ int ieee80211_mgd_assoc(struct ieee80211
/* Also disable HT if we don't support it or the AP doesn't use WMM */
sband = local->hw.wiphy->bands[req->bss->channel->band];
if (!sband->ht_cap.ht_supported ||
- local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used)
+ local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_printk(KERN_INFO, sdata->dev,
+ "disabling HT as WMM/QoS is not supported\n");
+ }
memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa));
memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-05-30 11:56 [PATCH] mac80211: print info when disabling HT Johannes Berg
@ 2012-05-30 13:48 ` Joe Perches
2012-05-30 13:51 ` Johannes Berg
2012-05-30 13:57 ` [PATCH v2] " Johannes Berg
1 sibling, 1 reply; 9+ messages in thread
From: Joe Perches @ 2012-05-30 13:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Wed, 2012-05-30 at 13:56 +0200, Johannes Berg wrote:
> Make mac80211 print a message when it disables
> HT due to the connection using WEP/TKIP or due
> to the AP not supporting WMM/QoS.
trivia: please use:
netdev_<level>(
not
netdev_printk(KERN_<LEVEL>,
[]
> + netdev_printk(KERN_INFO, sdata->dev,
> + "disabling HT due to WEP/TKIP use\n");
netdev_info(sdata->dev, etc...)
etc...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-05-30 13:48 ` Joe Perches
@ 2012-05-30 13:51 ` Johannes Berg
2012-05-30 14:08 ` Joe Perches
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-05-30 13:51 UTC (permalink / raw)
To: Joe Perches; +Cc: John Linville, linux-wireless
On Wed, 2012-05-30 at 06:48 -0700, Joe Perches wrote:
> On Wed, 2012-05-30 at 13:56 +0200, Johannes Berg wrote:
> > Make mac80211 print a message when it disables
> > HT due to the connection using WEP/TKIP or due
> > to the AP not supporting WMM/QoS.
>
> trivia: please use:
> netdev_<level>(
> not
> netdev_printk(KERN_<LEVEL>,
> []
> > + netdev_printk(KERN_INFO, sdata->dev,
> > + "disabling HT due to WEP/TKIP use\n");
>
> netdev_info(sdata->dev, etc...)
>
> etc...
*sigh*
Ok. I'm curious as to what the reason is for both, and using
netdev_printk() everywhere?
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] mac80211: print info when disabling HT
2012-05-30 11:56 [PATCH] mac80211: print info when disabling HT Johannes Berg
2012-05-30 13:48 ` Joe Perches
@ 2012-05-30 13:57 ` Johannes Berg
1 sibling, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2012-05-30 13:57 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Make mac80211 print a message when it disables
HT due to the connection using WEP/TKIP or due
to the AP not supporting WMM/QoS.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
v2: use netdev_info
net/mac80211/mlme.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/net/mac80211/mlme.c 2012-05-30 15:52:37.000000000 +0200
+++ b/net/mac80211/mlme.c 2012-05-30 15:52:59.000000000 +0200
@@ -3317,11 +3317,15 @@ int ieee80211_mgd_assoc(struct ieee80211
* We can set this to true for non-11n hardware, that'll be checked
* separately along with the peer capabilities.
*/
- for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
+ for (i = 0; i < req->crypto.n_ciphers_pairwise; i++) {
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
- req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104)
+ req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_info(sdata->dev,
+ "disabling HT due to WEP/TKIP use\n");
+ }
+ }
if (req->flags & ASSOC_REQ_DISABLE_HT)
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
@@ -3329,8 +3333,11 @@ int ieee80211_mgd_assoc(struct ieee80211
/* Also disable HT if we don't support it or the AP doesn't use WMM */
sband = local->hw.wiphy->bands[req->bss->channel->band];
if (!sband->ht_cap.ht_supported ||
- local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used)
+ local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_info(sdata->dev,
+ "disabling HT as WMM/QoS is not supported\n");
+ }
memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa));
memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-05-30 13:51 ` Johannes Berg
@ 2012-05-30 14:08 ` Joe Perches
2012-05-30 14:18 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2012-05-30 14:08 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Wed, 2012-05-30 at 15:51 +0200, Johannes Berg wrote:
> On Wed, 2012-05-30 at 06:48 -0700, Joe Perches wrote:
> > On Wed, 2012-05-30 at 13:56 +0200, Johannes Berg wrote:
> > > Make mac80211 print a message when it disables
> > > HT due to the connection using WEP/TKIP or due
> > > to the AP not supporting WMM/QoS.
> >
> > trivia: please use:
> > netdev_<level>(
> > not
> > netdev_printk(KERN_<LEVEL>,
> > []
> > > + netdev_printk(KERN_INFO, sdata->dev,
> > > + "disabling HT due to WEP/TKIP use\n");
> >
> > netdev_info(sdata->dev, etc...)
> >
> > etc...
>
> *sigh*
> Ok. I'm curious as to what the reason is for both, and using
> netdev_printk() everywhere?
netdev_printk isn't used generally. Other than the
netdev_<level> macros themselves, it's used only with
KERN_DEBUG to force output.
And to me, all of those netdev_level(KERN_DEBUG uses
would be better as netdev_dbg.
There are no other uses of netdev_printk except in
macros.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-05-30 14:08 ` Joe Perches
@ 2012-05-30 14:18 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2012-05-30 14:18 UTC (permalink / raw)
To: Joe Perches; +Cc: John Linville, linux-wireless
On Wed, 2012-05-30 at 07:08 -0700, Joe Perches wrote:
> On Wed, 2012-05-30 at 15:51 +0200, Johannes Berg wrote:
> > On Wed, 2012-05-30 at 06:48 -0700, Joe Perches wrote:
> > > On Wed, 2012-05-30 at 13:56 +0200, Johannes Berg wrote:
> > > > Make mac80211 print a message when it disables
> > > > HT due to the connection using WEP/TKIP or due
> > > > to the AP not supporting WMM/QoS.
> > >
> > > trivia: please use:
> > > netdev_<level>(
> > > not
> > > netdev_printk(KERN_<LEVEL>,
> > > []
> > > > + netdev_printk(KERN_INFO, sdata->dev,
> > > > + "disabling HT due to WEP/TKIP use\n");
> > >
> > > netdev_info(sdata->dev, etc...)
> > >
> > > etc...
> >
> > *sigh*
> > Ok. I'm curious as to what the reason is for both, and using
> > netdev_printk() everywhere?
>
> netdev_printk isn't used generally. Other than the
> netdev_<level> macros themselves, it's used only with
> KERN_DEBUG to force output.
>
> And to me, all of those netdev_level(KERN_DEBUG uses
> would be better as netdev_dbg.
>
> There are no other uses of netdev_printk except in
> macros.
Oh, I guess I was looking at an old tree since I was preparing the patch
against wireless-testing. Thanks for the explanation.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] mac80211: print info when disabling HT
@ 2012-06-06 6:05 Johannes Berg
2012-06-08 17:38 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-06-06 6:05 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Make mac80211 print a message when it disables
HT due to the connection using WEP/TKIP or due
to the AP not supporting WMM/QoS.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Did this slip through? :-)
net/mac80211/mlme.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7c07715..9c0fac0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3299,11 +3299,15 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
* We can set this to true for non-11n hardware, that'll be checked
* separately along with the peer capabilities.
*/
- for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
+ for (i = 0; i < req->crypto.n_ciphers_pairwise; i++) {
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
- req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104)
+ req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_info(sdata->dev,
+ "disabling HT due to WEP/TKIP use\n");
+ }
+ }
if (req->flags & ASSOC_REQ_DISABLE_HT)
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
@@ -3311,8 +3315,11 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
/* Also disable HT if we don't support it or the AP doesn't use WMM */
sband = local->hw.wiphy->bands[req->bss->channel->band];
if (!sband->ht_cap.ht_supported ||
- local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used)
+ local->hw.queues < IEEE80211_NUM_ACS || !bss->wmm_used) {
ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ netdev_info(sdata->dev,
+ "disabling HT as WMM/QoS is not supported\n");
+ }
memcpy(&ifmgd->ht_capa, &req->ht_capa, sizeof(ifmgd->ht_capa));
memcpy(&ifmgd->ht_capa_mask, &req->ht_capa_mask,
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-06-06 6:05 [PATCH] " Johannes Berg
@ 2012-06-08 17:38 ` John W. Linville
2012-06-08 17:51 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2012-06-08 17:38 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On Wed, Jun 06, 2012 at 08:05:33AM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Make mac80211 print a message when it disables
> HT due to the connection using WEP/TKIP or due
> to the AP not supporting WMM/QoS.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> Did this slip through? :-)
I've got it on the wireless-next side.
commit 1c4cb928e1b7c6ad30a9b7d3e720f26156d92925
Author: Johannes Berg <johannes.berg@intel.com>
Date: Wed May 30 15:57:00 2012 +0200
mac80211: print info when disabling HT
Make mac80211 print a message when it disables
HT due to the connection using WEP/TKIP or due
to the AP not supporting WMM/QoS.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mac80211: print info when disabling HT
2012-06-08 17:38 ` John W. Linville
@ 2012-06-08 17:51 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2012-06-08 17:51 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
On Fri, 2012-06-08 at 13:38 -0400, John W. Linville wrote:
> On Wed, Jun 06, 2012 at 08:05:33AM +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > Make mac80211 print a message when it disables
> > HT due to the connection using WEP/TKIP or due
> > to the AP not supporting WMM/QoS.
> >
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> > ---
> > Did this slip through? :-)
>
> I've got it on the wireless-next side.
Oops, must've missed it, sorry!
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-08 17:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 11:56 [PATCH] mac80211: print info when disabling HT Johannes Berg
2012-05-30 13:48 ` Joe Perches
2012-05-30 13:51 ` Johannes Berg
2012-05-30 14:08 ` Joe Perches
2012-05-30 14:18 ` Johannes Berg
2012-05-30 13:57 ` [PATCH v2] " Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2012-06-06 6:05 [PATCH] " Johannes Berg
2012-06-08 17:38 ` John W. Linville
2012-06-08 17:51 ` Johannes Berg
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).