Commit aca40a5f authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: move tspec work to wiphy work

One more work that will now execute with the wiphy
locked, for future cleanups.
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e3208fb7
...@@ -550,7 +550,7 @@ struct ieee80211_if_managed { ...@@ -550,7 +550,7 @@ struct ieee80211_if_managed {
* on the BE queue, but there's a lot of VO traffic, we might * on the BE queue, but there's a lot of VO traffic, we might
* get stuck in a downgraded situation and flush takes forever. * get stuck in a downgraded situation and flush takes forever.
*/ */
struct delayed_work tx_tspec_wk; struct wiphy_delayed_work tx_tspec_wk;
/* Information elements from the last transmitted (Re)Association /* Information elements from the last transmitted (Re)Association
* Request frame. * Request frame.
......
...@@ -2489,8 +2489,10 @@ __ieee80211_sta_handle_tspec_ac_params(struct ieee80211_sub_if_data *sdata) ...@@ -2489,8 +2489,10 @@ __ieee80211_sta_handle_tspec_ac_params(struct ieee80211_sub_if_data *sdata)
ac); ac);
tx_tspec->action = TX_TSPEC_ACTION_NONE; tx_tspec->action = TX_TSPEC_ACTION_NONE;
ret = true; ret = true;
schedule_delayed_work(&ifmgd->tx_tspec_wk, wiphy_delayed_work_queue(local->hw.wiphy,
tx_tspec->time_slice_start + HZ - now + 1); &ifmgd->tx_tspec_wk,
tx_tspec->time_slice_start +
HZ - now + 1);
break; break;
case TX_TSPEC_ACTION_NONE: case TX_TSPEC_ACTION_NONE:
/* nothing now */ /* nothing now */
...@@ -2508,7 +2510,8 @@ void ieee80211_sta_handle_tspec_ac_params(struct ieee80211_sub_if_data *sdata) ...@@ -2508,7 +2510,8 @@ void ieee80211_sta_handle_tspec_ac_params(struct ieee80211_sub_if_data *sdata)
BSS_CHANGED_QOS); BSS_CHANGED_QOS);
} }
static void ieee80211_sta_handle_tspec_ac_params_wk(struct work_struct *work) static void ieee80211_sta_handle_tspec_ac_params_wk(struct wiphy *wiphy,
struct wiphy_work *work)
{ {
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata;
...@@ -3060,7 +3063,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, ...@@ -3060,7 +3063,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
/* existing TX TSPEC sessions no longer exist */ /* existing TX TSPEC sessions no longer exist */
memset(ifmgd->tx_tspec, 0, sizeof(ifmgd->tx_tspec)); memset(ifmgd->tx_tspec, 0, sizeof(ifmgd->tx_tspec));
cancel_delayed_work_sync(&ifmgd->tx_tspec_wk); wiphy_delayed_work_cancel(local->hw.wiphy, &ifmgd->tx_tspec_wk);
sdata->vif.bss_conf.pwr_reduction = 0; sdata->vif.bss_conf.pwr_reduction = 0;
sdata->vif.bss_conf.tx_pwr_env_num = 0; sdata->vif.bss_conf.tx_pwr_env_num = 0;
...@@ -3128,7 +3131,8 @@ static void ieee80211_sta_tx_wmm_ac_notify(struct ieee80211_sub_if_data *sdata, ...@@ -3128,7 +3131,8 @@ static void ieee80211_sta_tx_wmm_ac_notify(struct ieee80211_sub_if_data *sdata,
if (tx_tspec->downgraded) { if (tx_tspec->downgraded) {
tx_tspec->action = TX_TSPEC_ACTION_STOP_DOWNGRADE; tx_tspec->action = TX_TSPEC_ACTION_STOP_DOWNGRADE;
schedule_delayed_work(&ifmgd->tx_tspec_wk, 0); wiphy_delayed_work_queue(sdata->local->hw.wiphy,
&ifmgd->tx_tspec_wk, 0);
} }
} }
...@@ -3140,7 +3144,8 @@ static void ieee80211_sta_tx_wmm_ac_notify(struct ieee80211_sub_if_data *sdata, ...@@ -3140,7 +3144,8 @@ static void ieee80211_sta_tx_wmm_ac_notify(struct ieee80211_sub_if_data *sdata,
if (tx_tspec->consumed_tx_time >= tx_tspec->admitted_time) { if (tx_tspec->consumed_tx_time >= tx_tspec->admitted_time) {
tx_tspec->downgraded = true; tx_tspec->downgraded = true;
tx_tspec->action = TX_TSPEC_ACTION_DOWNGRADE; tx_tspec->action = TX_TSPEC_ACTION_DOWNGRADE;
schedule_delayed_work(&ifmgd->tx_tspec_wk, 0); wiphy_delayed_work_queue(sdata->local->hw.wiphy,
&ifmgd->tx_tspec_wk, 0);
} }
} }
...@@ -6837,8 +6842,8 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) ...@@ -6837,8 +6842,8 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
timer_setup(&ifmgd->timer, ieee80211_sta_timer, 0); timer_setup(&ifmgd->timer, ieee80211_sta_timer, 0);
timer_setup(&ifmgd->bcn_mon_timer, ieee80211_sta_bcn_mon_timer, 0); timer_setup(&ifmgd->bcn_mon_timer, ieee80211_sta_bcn_mon_timer, 0);
timer_setup(&ifmgd->conn_mon_timer, ieee80211_sta_conn_mon_timer, 0); timer_setup(&ifmgd->conn_mon_timer, ieee80211_sta_conn_mon_timer, 0);
INIT_DELAYED_WORK(&ifmgd->tx_tspec_wk, wiphy_delayed_work_init(&ifmgd->tx_tspec_wk,
ieee80211_sta_handle_tspec_ac_params_wk); ieee80211_sta_handle_tspec_ac_params_wk);
ifmgd->flags = 0; ifmgd->flags = 0;
ifmgd->powersave = sdata->wdev.ps; ifmgd->powersave = sdata->wdev.ps;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment