diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-06-02 15:39:54 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-06-10 10:05:36 -0400 |
commit | 30686bf7f5b3c30831761e188a6e3cb33580fa48 (patch) | |
tree | 65be6b3ae5d661bf076af64855555f562fe356fd /net/mac80211/mlme.c | |
parent | 206c59d1d7d42bcafc1d7f1e476e87e4427e2345 (diff) |
mac80211: convert HW flags to unsigned long bitmap
As we're running out of hardware capability flags pretty quickly,
convert them to use the regular test_bit() style unsigned long
bitmaps.
This introduces a number of helper functions/macros to set and to
test the bits, along with new debugfs code.
The occurrences of an explicit __clear_bit() are intentional, the
drivers were never supposed to change their supported bits on the
fly. We should investigate changing this to be a per-frame flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 235ed68dca36..9b2cc278ac2a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -118,7 +118,7 @@ void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata) | |||
118 | if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER) | 118 | if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER) |
119 | return; | 119 | return; |
120 | 120 | ||
121 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | 121 | if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) |
122 | return; | 122 | return; |
123 | 123 | ||
124 | mod_timer(&sdata->u.mgd.bcn_mon_timer, | 124 | mod_timer(&sdata->u.mgd.bcn_mon_timer, |
@@ -134,7 +134,7 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata) | |||
134 | 134 | ||
135 | ifmgd->probe_send_count = 0; | 135 | ifmgd->probe_send_count = 0; |
136 | 136 | ||
137 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | 137 | if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) |
138 | return; | 138 | return; |
139 | 139 | ||
140 | mod_timer(&sdata->u.mgd.conn_mon_timer, | 140 | mod_timer(&sdata->u.mgd.conn_mon_timer, |
@@ -677,7 +677,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
677 | capab |= WLAN_CAPABILITY_PRIVACY; | 677 | capab |= WLAN_CAPABILITY_PRIVACY; |
678 | 678 | ||
679 | if ((assoc_data->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && | 679 | if ((assoc_data->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && |
680 | (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT)) | 680 | ieee80211_hw_check(&local->hw, SPECTRUM_MGMT)) |
681 | capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; | 681 | capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; |
682 | 682 | ||
683 | if (ifmgd->flags & IEEE80211_STA_ENABLE_RRM) | 683 | if (ifmgd->flags & IEEE80211_STA_ENABLE_RRM) |
@@ -885,7 +885,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
885 | drv_mgd_prepare_tx(local, sdata); | 885 | drv_mgd_prepare_tx(local, sdata); |
886 | 886 | ||
887 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 887 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
888 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | 888 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
889 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS | | 889 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS | |
890 | IEEE80211_TX_INTFL_MLME_CONN_TX; | 890 | IEEE80211_TX_INTFL_MLME_CONN_TX; |
891 | ieee80211_tx_skb(sdata, skb); | 891 | ieee80211_tx_skb(sdata, skb); |
@@ -927,7 +927,7 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local, | |||
927 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT | | 927 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT | |
928 | IEEE80211_TX_INTFL_OFFCHAN_TX_OK; | 928 | IEEE80211_TX_INTFL_OFFCHAN_TX_OK; |
929 | 929 | ||
930 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | 930 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
931 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; | 931 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; |
932 | 932 | ||
933 | if (ifmgd->flags & IEEE80211_STA_CONNECTION_POLL) | 933 | if (ifmgd->flags & IEEE80211_STA_CONNECTION_POLL) |
@@ -1198,7 +1198,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1198 | chanctx = container_of(conf, struct ieee80211_chanctx, conf); | 1198 | chanctx = container_of(conf, struct ieee80211_chanctx, conf); |
1199 | 1199 | ||
1200 | if (local->use_chanctx && | 1200 | if (local->use_chanctx && |
1201 | !(local->hw.flags & IEEE80211_HW_CHANCTX_STA_CSA)) { | 1201 | !ieee80211_hw_check(&local->hw, CHANCTX_STA_CSA)) { |
1202 | sdata_info(sdata, | 1202 | sdata_info(sdata, |
1203 | "driver doesn't support chan-switch with channel contexts\n"); | 1203 | "driver doesn't support chan-switch with channel contexts\n"); |
1204 | goto drop_connection; | 1204 | goto drop_connection; |
@@ -1407,15 +1407,15 @@ static void ieee80211_enable_ps(struct ieee80211_local *local, | |||
1407 | return; | 1407 | return; |
1408 | 1408 | ||
1409 | if (conf->dynamic_ps_timeout > 0 && | 1409 | if (conf->dynamic_ps_timeout > 0 && |
1410 | !(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)) { | 1410 | !ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) { |
1411 | mod_timer(&local->dynamic_ps_timer, jiffies + | 1411 | mod_timer(&local->dynamic_ps_timer, jiffies + |
1412 | msecs_to_jiffies(conf->dynamic_ps_timeout)); | 1412 | msecs_to_jiffies(conf->dynamic_ps_timeout)); |
1413 | } else { | 1413 | } else { |
1414 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) | 1414 | if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) |
1415 | ieee80211_send_nullfunc(local, sdata, 1); | 1415 | ieee80211_send_nullfunc(local, sdata, 1); |
1416 | 1416 | ||
1417 | if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && | 1417 | if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) && |
1418 | (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) | 1418 | ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
1419 | return; | 1419 | return; |
1420 | 1420 | ||
1421 | conf->flags |= IEEE80211_CONF_PS; | 1421 | conf->flags |= IEEE80211_CONF_PS; |
@@ -1474,7 +1474,7 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) | |||
1474 | int count = 0; | 1474 | int count = 0; |
1475 | int timeout; | 1475 | int timeout; |
1476 | 1476 | ||
1477 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) { | 1477 | if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) { |
1478 | local->ps_sdata = NULL; | 1478 | local->ps_sdata = NULL; |
1479 | return; | 1479 | return; |
1480 | } | 1480 | } |
@@ -1620,7 +1620,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) | |||
1620 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); | 1620 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); |
1621 | } | 1621 | } |
1622 | 1622 | ||
1623 | if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && | 1623 | if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) && |
1624 | !(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { | 1624 | !(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { |
1625 | if (drv_tx_frames_pending(local)) { | 1625 | if (drv_tx_frames_pending(local)) { |
1626 | mod_timer(&local->dynamic_ps_timer, jiffies + | 1626 | mod_timer(&local->dynamic_ps_timer, jiffies + |
@@ -1633,8 +1633,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) | |||
1633 | } | 1633 | } |
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) && | 1636 | if (!(ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) && |
1637 | (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) || | 1637 | ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) || |
1638 | (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { | 1638 | (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { |
1639 | ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED; | 1639 | ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED; |
1640 | local->hw.conf.flags |= IEEE80211_CONF_PS; | 1640 | local->hw.conf.flags |= IEEE80211_CONF_PS; |
@@ -2159,7 +2159,7 @@ static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata) | |||
2159 | ieee80211_recalc_ps(local, -1); | 2159 | ieee80211_recalc_ps(local, -1); |
2160 | mutex_unlock(&local->iflist_mtx); | 2160 | mutex_unlock(&local->iflist_mtx); |
2161 | 2161 | ||
2162 | if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) | 2162 | if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) |
2163 | goto out; | 2163 | goto out; |
2164 | 2164 | ||
2165 | /* | 2165 | /* |
@@ -2257,7 +2257,7 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata) | |||
2257 | */ | 2257 | */ |
2258 | ifmgd->probe_send_count++; | 2258 | ifmgd->probe_send_count++; |
2259 | 2259 | ||
2260 | if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { | 2260 | if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) { |
2261 | ifmgd->nullfunc_failed = false; | 2261 | ifmgd->nullfunc_failed = false; |
2262 | ieee80211_send_nullfunc(sdata->local, sdata, 0); | 2262 | ieee80211_send_nullfunc(sdata->local, sdata, 0); |
2263 | } else { | 2263 | } else { |
@@ -2562,7 +2562,7 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata, | |||
2562 | return; | 2562 | return; |
2563 | auth_data->expected_transaction = 4; | 2563 | auth_data->expected_transaction = 4; |
2564 | drv_mgd_prepare_tx(sdata->local, sdata); | 2564 | drv_mgd_prepare_tx(sdata->local, sdata); |
2565 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | 2565 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
2566 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | | 2566 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | |
2567 | IEEE80211_TX_INTFL_MLME_CONN_TX; | 2567 | IEEE80211_TX_INTFL_MLME_CONN_TX; |
2568 | ieee80211_send_auth(sdata, 3, auth_data->algorithm, 0, | 2568 | ieee80211_send_auth(sdata, 3, auth_data->algorithm, 0, |
@@ -3337,7 +3337,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
3337 | } | 3337 | } |
3338 | ifmgd->have_beacon = true; | 3338 | ifmgd->have_beacon = true; |
3339 | ifmgd->assoc_data->need_beacon = false; | 3339 | ifmgd->assoc_data->need_beacon = false; |
3340 | if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) { | 3340 | if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) { |
3341 | sdata->vif.bss_conf.sync_tsf = | 3341 | sdata->vif.bss_conf.sync_tsf = |
3342 | le64_to_cpu(mgmt->u.beacon.timestamp); | 3342 | le64_to_cpu(mgmt->u.beacon.timestamp); |
3343 | sdata->vif.bss_conf.sync_device_ts = | 3343 | sdata->vif.bss_conf.sync_device_ts = |
@@ -3443,7 +3443,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
3443 | len - baselen, false, &elems, | 3443 | len - baselen, false, &elems, |
3444 | care_about_ies, ncrc); | 3444 | care_about_ies, ncrc); |
3445 | 3445 | ||
3446 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { | 3446 | if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) { |
3447 | bool directed_tim = ieee80211_check_tim(elems.tim, | 3447 | bool directed_tim = ieee80211_check_tim(elems.tim, |
3448 | elems.tim_len, | 3448 | elems.tim_len, |
3449 | ifmgd->aid); | 3449 | ifmgd->aid); |
@@ -3511,7 +3511,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
3511 | * the driver will use them. The synchronized view is currently | 3511 | * the driver will use them. The synchronized view is currently |
3512 | * guaranteed only in certain callbacks. | 3512 | * guaranteed only in certain callbacks. |
3513 | */ | 3513 | */ |
3514 | if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) { | 3514 | if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) { |
3515 | sdata->vif.bss_conf.sync_tsf = | 3515 | sdata->vif.bss_conf.sync_tsf = |
3516 | le64_to_cpu(mgmt->u.beacon.timestamp); | 3516 | le64_to_cpu(mgmt->u.beacon.timestamp); |
3517 | sdata->vif.bss_conf.sync_device_ts = | 3517 | sdata->vif.bss_conf.sync_device_ts = |
@@ -3749,7 +3749,7 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
3749 | auth_data->expected_transaction = trans; | 3749 | auth_data->expected_transaction = trans; |
3750 | } | 3750 | } |
3751 | 3751 | ||
3752 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | 3752 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
3753 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | | 3753 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | |
3754 | IEEE80211_TX_INTFL_MLME_CONN_TX; | 3754 | IEEE80211_TX_INTFL_MLME_CONN_TX; |
3755 | 3755 | ||
@@ -3822,7 +3822,7 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) | |||
3822 | IEEE80211_ASSOC_MAX_TRIES); | 3822 | IEEE80211_ASSOC_MAX_TRIES); |
3823 | ieee80211_send_assoc(sdata); | 3823 | ieee80211_send_assoc(sdata); |
3824 | 3824 | ||
3825 | if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { | 3825 | if (!ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { |
3826 | assoc_data->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; | 3826 | assoc_data->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; |
3827 | assoc_data->timeout_started = true; | 3827 | assoc_data->timeout_started = true; |
3828 | run_again(sdata, assoc_data->timeout); | 3828 | run_again(sdata, assoc_data->timeout); |
@@ -3936,7 +3936,7 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) | |||
3936 | 3936 | ||
3937 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); | 3937 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); |
3938 | 3938 | ||
3939 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | 3939 | if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) |
3940 | max_tries = max_nullfunc_tries; | 3940 | max_tries = max_nullfunc_tries; |
3941 | else | 3941 | else |
3942 | max_tries = max_probe_tries; | 3942 | max_tries = max_probe_tries; |
@@ -3961,7 +3961,7 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) | |||
3961 | } | 3961 | } |
3962 | } else if (time_is_after_jiffies(ifmgd->probe_timeout)) | 3962 | } else if (time_is_after_jiffies(ifmgd->probe_timeout)) |
3963 | run_again(sdata, ifmgd->probe_timeout); | 3963 | run_again(sdata, ifmgd->probe_timeout); |
3964 | else if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { | 3964 | else if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { |
3965 | mlme_dbg(sdata, | 3965 | mlme_dbg(sdata, |
3966 | "Failed to send nullfunc to AP %pM after %dms, disconnecting\n", | 3966 | "Failed to send nullfunc to AP %pM after %dms, disconnecting\n", |
3967 | bssid, probe_wait_ms); | 3967 | bssid, probe_wait_ms); |
@@ -4030,14 +4030,11 @@ static void ieee80211_sta_monitor_work(struct work_struct *work) | |||
4030 | 4030 | ||
4031 | static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | 4031 | static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) |
4032 | { | 4032 | { |
4033 | u32 flags; | ||
4034 | |||
4035 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | 4033 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { |
4036 | __ieee80211_stop_poll(sdata); | 4034 | __ieee80211_stop_poll(sdata); |
4037 | 4035 | ||
4038 | /* let's probe the connection once */ | 4036 | /* let's probe the connection once */ |
4039 | flags = sdata->local->hw.flags; | 4037 | if (!ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) |
4040 | if (!(flags & IEEE80211_HW_CONNECTION_MONITOR)) | ||
4041 | ieee80211_queue_work(&sdata->local->hw, | 4038 | ieee80211_queue_work(&sdata->local->hw, |
4042 | &sdata->u.mgd.monitor_work); | 4039 | &sdata->u.mgd.monitor_work); |
4043 | /* and do all the other regular work too */ | 4040 | /* and do all the other regular work too */ |
@@ -4450,8 +4447,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
4450 | sdata->vif.bss_conf.sync_dtim_count = tim_ie[2]; | 4447 | sdata->vif.bss_conf.sync_dtim_count = tim_ie[2]; |
4451 | else | 4448 | else |
4452 | sdata->vif.bss_conf.sync_dtim_count = 0; | 4449 | sdata->vif.bss_conf.sync_dtim_count = 0; |
4453 | } else if (!(local->hw.flags & | 4450 | } else if (!ieee80211_hw_check(&sdata->local->hw, |
4454 | IEEE80211_HW_TIMING_BEACON_ONLY)) { | 4451 | TIMING_BEACON_ONLY)) { |
4455 | ies = rcu_dereference(cbss->proberesp_ies); | 4452 | ies = rcu_dereference(cbss->proberesp_ies); |
4456 | /* must be non-NULL since beacon IEs were NULL */ | 4453 | /* must be non-NULL since beacon IEs were NULL */ |
4457 | sdata->vif.bss_conf.sync_tsf = ies->tsf; | 4454 | sdata->vif.bss_conf.sync_tsf = ies->tsf; |
@@ -4829,7 +4826,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
4829 | rcu_read_unlock(); | 4826 | rcu_read_unlock(); |
4830 | 4827 | ||
4831 | if (WARN((sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_UAPSD) && | 4828 | if (WARN((sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_UAPSD) && |
4832 | (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK), | 4829 | ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK), |
4833 | "U-APSD not supported with HW_PS_NULLFUNC_STACK\n")) | 4830 | "U-APSD not supported with HW_PS_NULLFUNC_STACK\n")) |
4834 | sdata->vif.driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; | 4831 | sdata->vif.driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; |
4835 | 4832 | ||
@@ -4910,7 +4907,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
4910 | rcu_read_lock(); | 4907 | rcu_read_lock(); |
4911 | beacon_ies = rcu_dereference(req->bss->beacon_ies); | 4908 | beacon_ies = rcu_dereference(req->bss->beacon_ies); |
4912 | 4909 | ||
4913 | if (sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC && | 4910 | if (ieee80211_hw_check(&sdata->local->hw, NEED_DTIM_BEFORE_ASSOC) && |
4914 | !beacon_ies) { | 4911 | !beacon_ies) { |
4915 | /* | 4912 | /* |
4916 | * Wait up to one beacon interval ... | 4913 | * Wait up to one beacon interval ... |
@@ -4937,7 +4934,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
4937 | assoc_data->timeout = jiffies; | 4934 | assoc_data->timeout = jiffies; |
4938 | assoc_data->timeout_started = true; | 4935 | assoc_data->timeout_started = true; |
4939 | 4936 | ||
4940 | if (local->hw.flags & IEEE80211_HW_TIMING_BEACON_ONLY) { | 4937 | if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) { |
4941 | sdata->vif.bss_conf.sync_tsf = beacon_ies->tsf; | 4938 | sdata->vif.bss_conf.sync_tsf = beacon_ies->tsf; |
4942 | sdata->vif.bss_conf.sync_device_ts = | 4939 | sdata->vif.bss_conf.sync_device_ts = |
4943 | bss->device_ts_beacon; | 4940 | bss->device_ts_beacon; |