Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 664880 Details for
Bug 830151
NM wifi scans makes VOIP uncomfortable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
scan_latency_optimalizations_draft.patch
scan_latency_optimalizations_draft.patch (text/plain), 9.24 KB, created by
Stanislaw Gruszka
on 2012-12-17 13:42:33 UTC
(
hide
)
Description:
scan_latency_optimalizations_draft.patch
Filename:
MIME Type:
Creator:
Stanislaw Gruszka
Created:
2012-12-17 13:42:33 UTC
Size:
9.24 KB
patch
obsolete
>diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c >index d604b40..0cfb549 100644 >--- a/drivers/net/wireless/iwlegacy/3945-mac.c >+++ b/drivers/net/wireless/iwlegacy/3945-mac.c >@@ -3474,6 +3474,7 @@ struct ieee80211_ops il3945_mac_ops = { > .sta_add = il3945_mac_sta_add, > .sta_remove = il_mac_sta_remove, > .tx_last_beacon = il_mac_tx_last_beacon, >+ .flush = il_mac_flush, > }; > > static int >@@ -3549,6 +3550,7 @@ il3945_setup_mac(struct il_priv *il) > > /* Tell mac80211 our characteristics */ > hw->flags = IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_SPECTRUM_MGMT; >+// IEEE80211_HW_SUPPORTS_PS; > > hw->wiphy->interface_modes = > BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); >@@ -3567,10 +3569,14 @@ il3945_setup_mac(struct il_priv *il) > if (il->bands[IEEE80211_BAND_2GHZ].n_channels) > il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = > &il->bands[IEEE80211_BAND_2GHZ]; >- >+#if 1 >+ il->bands[IEEE80211_BAND_5GHZ].n_channels = 0; >+ il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; >+#else > if (il->bands[IEEE80211_BAND_5GHZ].n_channels) > il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = > &il->bands[IEEE80211_BAND_5GHZ]; >+#endif > > il_leds_init(il); > >diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c >index c3fbf67..7d462d8 100644 >--- a/drivers/net/wireless/iwlegacy/4965-mac.c >+++ b/drivers/net/wireless/iwlegacy/4965-mac.c >@@ -6306,6 +6306,7 @@ const struct ieee80211_ops il4965_mac_ops = { > .sta_remove = il_mac_sta_remove, > .channel_switch = il4965_mac_channel_switch, > .tx_last_beacon = il_mac_tx_last_beacon, >+ .flush = il_mac_flush, > }; > > static int >diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c >index 7e16d10..df6eb63 100644 >--- a/drivers/net/wireless/iwlegacy/common.c >+++ b/drivers/net/wireless/iwlegacy/common.c >@@ -4707,6 +4707,33 @@ out: > } > EXPORT_SYMBOL(il_mac_change_interface); > >+void >+il_mac_flush(struct ieee80211_hw *hw, bool drop) >+{ >+ struct il_priv *il = hw->priv; >+ unsigned long timeout = jiffies + msecs_to_jiffies(500); >+ int i; >+ >+ for (i = 0; i < il->hw_params.max_txq_num; i++) { >+ struct il_queue *q; >+ >+ if (i == il->cmd_queue) >+ continue; >+ >+ q = &il->txq[i].q; >+ if (q->read_ptr == q->write_ptr) >+ continue; >+ >+ if (time_after(jiffies, timeout)) { >+ IL_ERR("Failed to flush queue\n"); >+ break; >+ } >+ >+ msleep(50); >+ } >+} >+EXPORT_SYMBOL(il_mac_flush); >+ > /* > * On every watchdog tick we check (latest) time stamp. If it does not > * change during timeout period and queue is not empty we reset firmware. >diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h >index a9a569f..37fe553 100644 >--- a/drivers/net/wireless/iwlegacy/common.h >+++ b/drivers/net/wireless/iwlegacy/common.h >@@ -1723,6 +1723,7 @@ void il_mac_remove_interface(struct ieee80211_hw *hw, > struct ieee80211_vif *vif); > int il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, > enum nl80211_iftype newtype, bool newp2p); >+void il_mac_flush(struct ieee80211_hw *hw, bool drop); > int il_alloc_txq_mem(struct il_priv *il); > void il_free_txq_mem(struct il_priv *il); > >diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h >index 42d0d02..dfc4a1d 100644 >--- a/net/mac80211/ieee80211_i.h >+++ b/net/mac80211/ieee80211_i.h >@@ -830,6 +830,7 @@ enum queue_stop_reason { > IEEE80211_QUEUE_STOP_REASON_AGGREGATION, > IEEE80211_QUEUE_STOP_REASON_SUSPEND, > IEEE80211_QUEUE_STOP_REASON_SKB_ADD, >+ IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, > }; > > #ifdef CONFIG_MAC80211_LEDS >diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c >index a5379ae..727de37 100644 >--- a/net/mac80211/offchannel.c >+++ b/net/mac80211/offchannel.c >@@ -133,7 +133,9 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, > sdata, BSS_CHANGED_BEACON_ENABLED); > > if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { >- netif_tx_stop_all_queues(sdata->dev); >+ ieee80211_stop_queues_by_reason(&local->hw, >+ IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL); >+ > if (offchannel_ps_enable && > (sdata->vif.type == NL80211_IFTYPE_STATION) && > sdata->u.mgd.associated) >@@ -169,19 +171,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, > ieee80211_offchannel_ps_disable(sdata); > } > >- if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { >- /* >- * This may wake up queues even though the driver >- * currently has them stopped. This is not very >- * likely, since the driver won't have gotten any >- * (or hardly any) new packets while we weren't >- * on the right channel, and even if it happens >- * it will at most lead to queueing up one more >- * packet per queue in mac80211 rather than on >- * the interface qdisc. >- */ >- netif_tx_wake_all_queues(sdata->dev); >- } >+ if (sdata->vif.type != NL80211_IFTYPE_MONITOR) >+ ieee80211_wake_queues_by_reason(&local->hw, >+ IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL); > > if (sdata->vif.type == NL80211_IFTYPE_AP || > sdata->vif.type == NL80211_IFTYPE_ADHOC || >diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c >index 8ed83dc..4fd3026 100644 >--- a/net/mac80211/scan.c >+++ b/net/mac80211/scan.c >@@ -25,9 +25,9 @@ > #include "driver-ops.h" > #include "mesh.h" > >-#define IEEE80211_PROBE_DELAY (HZ / 33) >-#define IEEE80211_CHANNEL_TIME (HZ / 33) >-#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 8) >+#define IEEE80211_PROBE_DELAY (HZ / 66) >+#define IEEE80211_CHANNEL_TIME (HZ / 66) >+#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 16) > > static void ieee80211_rx_bss_free(struct cfg80211_bss *cbss) > { >@@ -541,34 +541,17 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, > return rc; > } > >-static unsigned long >-ieee80211_scan_get_channel_time(struct ieee80211_channel *chan) >-{ >- /* >- * TODO: channel switching also consumes quite some time, >- * add that delay as well to get a better estimation >- */ >- if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) >- return IEEE80211_PASSIVE_CHANNEL_TIME; >- return IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME; >-} >- > static void ieee80211_scan_state_decision(struct ieee80211_local *local, > unsigned long *next_delay) > { > bool associated = false; > bool tx_empty = true; >- bool bad_latency; >- bool listen_int_exceeded; >- unsigned long min_beacon_int = 0; > struct ieee80211_sub_if_data *sdata; >- struct ieee80211_channel *next_chan; > enum mac80211_scan_state next_scan_state; > > /* > * check if at least one STA interface is associated, > * check if at least one STA interface has pending tx frames >- * and grab the lowest used beacon interval > */ > mutex_lock(&local->iflist_mtx); > list_for_each_entry(sdata, &local->interfaces, list) { >@@ -578,12 +561,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, > if (sdata->vif.type == NL80211_IFTYPE_STATION) { > if (sdata->u.mgd.associated) { > associated = true; >- >- if (sdata->vif.bss_conf.beacon_int < >- min_beacon_int || min_beacon_int == 0) >- min_beacon_int = >- sdata->vif.bss_conf.beacon_int; >- >+ > if (!qdisc_all_tx_empty(sdata->dev)) { > tx_empty = false; > break; >@@ -593,42 +571,12 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, > } > mutex_unlock(&local->iflist_mtx); > >- next_chan = local->scan_req->channels[local->scan_channel_idx]; >- >- /* >- * we're currently scanning a different channel, let's >- * see if we can scan another channel without interfering >- * with the current traffic situation. >- * >- * Since we don't know if the AP has pending frames for us >- * we can only check for our tx queues and use the current >- * pm_qos requirements for rx. Hence, if no tx traffic occurs >- * at all we will scan as many channels in a row as the pm_qos >- * latency allows us to. Additionally we also check for the >- * currently negotiated listen interval to prevent losing >- * frames unnecessarily. >- * >- * Otherwise switch back to the operating channel. >- */ >- >- bad_latency = time_after(jiffies + >- ieee80211_scan_get_channel_time(next_chan), >- local->leave_oper_channel_time + >- usecs_to_jiffies(pm_qos_request(PM_QOS_NETWORK_LATENCY))); >- >- listen_int_exceeded = time_after(jiffies + >- ieee80211_scan_get_channel_time(next_chan), >- local->leave_oper_channel_time + >- usecs_to_jiffies(min_beacon_int * 1024) * >- local->hw.conf.listen_interval); >- >- if (associated && !tx_empty) { >- if (local->scan_req->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) >+ if (associated) { >+ if (!tx_empty && >+ local->scan_req->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) > next_scan_state = SCAN_ABORT; > else > next_scan_state = SCAN_SUSPEND; >- } else if (associated && (bad_latency || listen_int_exceeded)) { >- next_scan_state = SCAN_SUSPEND; > } else { > next_scan_state = SCAN_SET_CHANNEL; > } >@@ -690,14 +638,9 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local, > local->scan_channel = NULL; > ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); > >- /* >- * Re-enable vifs and beaconing. Leave PS >- * in off-channel state..will put that back >- * on-channel at the end of scanning. >- */ >- ieee80211_offchannel_return(local, false); >+ ieee80211_offchannel_return(local, true); > >- *next_delay = HZ / 5; >+ *next_delay = HZ / 2; > /* afterwards, resume scan & go to next channel */ > local->next_scan_state = SCAN_RESUME; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 830151
:
590412
| 664880