mac80211: Make no-probe-response kernel messages more useful.
PATCH 1/2 mac80211: Make no-probe-response kernel messages more useful.
From: Ben Greear <[email protected]>
Add device name and flags to give better idea of what exactly is happening.
---
:100644 100644 77913a1... 04f33cf... M net/mac80211/mlme.c
net/mac80211/mlme.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
net/mac80211/mlme.c +8 -6
@@ -1863,10 +1863,11 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)else if (ifmgd->probe_send_count <IEEE80211_MAX_PROBE_TRIES ) {#ifdef CONFIG_MAC80211_VERBOSE_DEBUG -printk (KERN_DEBUG "No probe response from AP %pM" -" after %dms, try %d\n" , bssid, +printk (KERN_DEBUG "%s: No probe response from AP %pM" +" after %dms, try %d flags: 0x%x\n" , + sdata->dev->name, bssid, (1000 *IEEE80211_PROBE_WAIT )/HZ , - ifmgd->probe_send_count); + ifmgd->probe_send_count, ifmgd->flags);#endif ieee80211_mgd_probe_ap_send (sdata); }else {
@@ -1876,9 +1877,10 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)*/ ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL |IEEE80211_STA_BEACON_POLL ); -printk (KERN_DEBUG "No probe response from AP %pM" -" after %dms, disconnecting.\n" , - bssid, (1000 *IEEE80211_PROBE_WAIT )/HZ ); +printk (KERN_DEBUG "%s: No probe response from AP %pM" +" after %dms, disconnecting, flags: 0x%x\n" , + sdata->dev->name, bssid, + (1000 *IEEE80211_PROBE_WAIT )/HZ , ifmgd->flags);ieee80211_set_disassoc (sdata, true);mutex_unlock (&ifmgd->mtx);mutex_lock (&local->mtx);
Signature · 1 line
1.7.2.2
PATCH 2/2 mac80211: Don't go off-channel in work_work unless needed.
From: Ben Greear <[email protected]>
If the work to be done is on the current active channel, then do not call the offchannel and return-to-channel logic.
---
:100644 100644 ae344d1... 1f2673d... M net/mac80211/work.c
net/mac80211/work.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-)
net/mac80211/work.c +20 -8
@@ -873,6 +873,7 @@ static void ieee80211_work_work(struct work_struct *work)LIST_HEAD (free_work);enum work_action rma;bool remain_off_channel = false; +bool went_off_channel = false;if (local->scanning)return ;
@@ -910,12 +911,21 @@ static void ieee80211_work_work(struct work_struct *work)* happen to be on the same channel as * the requested channel */ -ieee80211_offchannel_stop_beaconing (local); -ieee80211_offchannel_stop_station (local); - - local->tmp_channel = wk->chan; - local->tmp_channel_type = wk->chan_type; -ieee80211_hw_config (local,0 ); +WARN_ON (local->scan_channel !=NULL ); +if (wk->chan != local->oper_channel || + wk->chan_type != local->_oper_channel_type) { +/* Only change channels if we need to */ +ieee80211_offchannel_stop_beaconing (local); +ieee80211_offchannel_stop_station (local); + + local->tmp_channel = wk->chan; + local->tmp_channel_type = wk->chan_type; +ieee80211_hw_config (local,0 ); + went_off_channel = true; + }else { + local->tmp_channel = wk->chan; + local->tmp_channel_type = wk->chan_type; + } started = true; wk->timeout = jiffies; }
@@ -989,8 +999,10 @@ static void ieee80211_work_work(struct work_struct *work)if (!remain_off_channel && local->tmp_channel) { local->tmp_channel =NULL ; -ieee80211_hw_config (local,0 ); -ieee80211_offchannel_return (local, true); +if (went_off_channel) { +ieee80211_hw_config (local,0 ); +ieee80211_offchannel_return (local, true); + }/* give connection some time to breathe */ run_again (local, jiffies +HZ /2 ); }
Signature · 1 line
1.7.2.2
Johannes Berg
maintainerRe: [PATCH 2/2] mac80211: Don't go off-channel in work_work unless needed.
Quoted 16 lines · On Wed, 2010-09-29 at 11:03 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
If the work to be done is on the current active channel, then do not call the offchannel and return-to-channel logic.
Signed-off-by Ben Greear <[email protected]>---
:100644 100644 ae344d1... 1f2673d... Mnet/mac80211/work.cnet/mac80211/work.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-)net/mac80211/work.c +0
-0
net/mac80211/work.c static void ieee80211_work_work(struct work_struct *work) · line 876
Quoted 4 lines
net/mac80211/work.c +1
-0@@ -873,6 +873,7 @@ static void ieee80211_work_work(struct work_struct *work)LIST_HEAD (free_work);enum work_action rma;bool remain_off_channel = false; +bool went_off_channel = false;
Heh, this is not going to work ... the return may be done in a separate invocation of the function. Would have been nice to test this ;-)
johannes
Re: [PATCH 2/2] mac80211: Don't go off-channel in work_work unless needed.
Quoted 12 lines · Johannes Berg
Quoted 11 lines · On Wed, 2010-09-29 at 11:03 -0700, [email protected] wrote:
From: Ben Greear<[email protected]>
If the work to be done is on the current active channel, then do not call the offchannel and return-to-channel logic.
Signed-off-by Ben Greear<[email protected]>---
:100644 100644 ae344d1... 1f2673d... Mnet/mac80211/work.cnet/mac80211/work.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-)
Quoted 12 lines
net/mac80211/work.c static void ieee80211_work_work(struct work_struct *work) · line 876
Quoted 9 lines
net/mac80211/work.c +1
-0@@ -873,6 +873,7 @@ static void ieee80211_work_work(struct work_struct *work)LIST_HEAD (free_work);enum work_action rma;bool remain_off_channel = false; +bool went_off_channel = false;Heh, this is not going to work ... the return may be done in a separate invocation of the function. Would have been nice to test this ;-)
What is a good way to test this? I brought up several STA interfaces and an AP and ran traffic..but I guess I need to do something different?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Johannes Berg
maintainerRe: [PATCH 2/2] mac80211: Don't go off-channel in work_work unless needed.
Quoted 7 lines · Ben Greear
Quoted 4 lines
net/mac80211/work.c static void ieee80211_work_work(struct work_struct *work) · line 876
Quoted 1 line
net/mac80211/work.c +1
-0+bool went_off_channel = false;Heh, this is not going to work ... the return may be done in a separate invocation of the function. Would have been nice to test this ;-)
What is a good way to test this? I brought up several STA interfaces and an AP and ran traffic..but I guess I need to do something different?
The work stuff gets invoked when you try to auth, assoc, do off-channel work, etc... best way is probably to use iw's off-channel command that translates to a work item here...
johannes
Quoted 4 lines · On Thu, Sep 30, 2010 at 04:03, <[email protected]> wrote:
From: Ben Greear <[email protected]>
Add device name and flags to give better idea of what exactly is happening.
Is there a printk variant that does standardised formatting for the wireless device name?
Thanks,
Signature · 5 lines
Julian Calaby Email: [email protected] Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
Quoted 6 lines · Julian Calaby
Quoted 3 lines · On Thu, Sep 30, 2010 at 04:03, <[email protected]> wrote:
From: Ben Greear <[email protected]> Add device name and flags to give better idea of what exactly is happening.
Is there a printk variant that does standardised formatting for the wireless device name?
wiphy_<level>, netdev_<level> and dev_<level> in
descending order of preference.
Johannes Berg
maintainerQuoted 4 lines · On Wed, 2010-09-29 at 11:03 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
Add device name and flags to give better idea of what exactly is happening.
Which of the flags are actually useful though?
johannes