mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
mac80211: reconfigure tx on device reconfiguration
Add tx_conf array to save the current tx queues configuration, and reconfig it on resume (ieee80211_reconfig). On resume, the driver is being reconfigured. Without reconfiguring the tx queues as well, the driver might configure the device to use wrong ac params (e.g. ps-poll instead of uapsd). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b3c2ce131c
commit
2683d65bb0
@ -1255,6 +1255,10 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
|
|||||||
*/
|
*/
|
||||||
p.uapsd = false;
|
p.uapsd = false;
|
||||||
|
|
||||||
|
if (params->queue >= local->hw.queues)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
local->tx_conf[params->queue] = p;
|
||||||
if (drv_conf_tx(local, params->queue, &p)) {
|
if (drv_conf_tx(local, params->queue, &p)) {
|
||||||
wiphy_debug(local->hw.wiphy,
|
wiphy_debug(local->hw.wiphy,
|
||||||
"failed to set TX queue parameters for queue %d\n",
|
"failed to set TX queue parameters for queue %d\n",
|
||||||
|
@ -746,6 +746,7 @@ struct ieee80211_local {
|
|||||||
struct workqueue_struct *workqueue;
|
struct workqueue_struct *workqueue;
|
||||||
|
|
||||||
unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
|
unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
|
||||||
|
struct ieee80211_tx_queue_params tx_conf[IEEE80211_MAX_QUEUES];
|
||||||
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
|
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
|
||||||
spinlock_t queue_stop_reason_lock;
|
spinlock_t queue_stop_reason_lock;
|
||||||
|
|
||||||
|
@ -917,6 +917,7 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
|
|||||||
params.aifs, params.cw_min, params.cw_max,
|
params.aifs, params.cw_min, params.cw_max,
|
||||||
params.txop, params.uapsd);
|
params.txop, params.uapsd);
|
||||||
#endif
|
#endif
|
||||||
|
local->tx_conf[queue] = params;
|
||||||
if (drv_conf_tx(local, queue, ¶ms))
|
if (drv_conf_tx(local, queue, ¶ms))
|
||||||
wiphy_debug(local->hw.wiphy,
|
wiphy_debug(local->hw.wiphy,
|
||||||
"failed to set TX queue parameters for queue %d\n",
|
"failed to set TX queue parameters for queue %d\n",
|
||||||
|
@ -799,6 +799,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
|
|||||||
|
|
||||||
qparam.uapsd = false;
|
qparam.uapsd = false;
|
||||||
|
|
||||||
|
local->tx_conf[queue] = qparam;
|
||||||
drv_conf_tx(local, queue, &qparam);
|
drv_conf_tx(local, queue, &qparam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1134,7 +1135,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
|
|||||||
struct ieee80211_hw *hw = &local->hw;
|
struct ieee80211_hw *hw = &local->hw;
|
||||||
struct ieee80211_sub_if_data *sdata;
|
struct ieee80211_sub_if_data *sdata;
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
int res;
|
int res, i;
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
if (local->suspended)
|
if (local->suspended)
|
||||||
@ -1211,6 +1212,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
|
|||||||
}
|
}
|
||||||
mutex_unlock(&local->sta_mtx);
|
mutex_unlock(&local->sta_mtx);
|
||||||
|
|
||||||
|
/* reconfigure tx conf */
|
||||||
|
for (i = 0; i < hw->queues; i++)
|
||||||
|
drv_conf_tx(local, i, &local->tx_conf[i]);
|
||||||
|
|
||||||
/* reconfigure hardware */
|
/* reconfigure hardware */
|
||||||
ieee80211_hw_config(local, ~0);
|
ieee80211_hw_config(local, ~0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user