mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
mac80211: provide station PMF configuration to driver
Some device drivers offload part of aggregation including AddBA/DelBA negotiations to firmware. In such scenario, the PMF configuration of the station needs to be provided to driver to enable encryption of AddBA/DelBA action frames. Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com> [fix commit log, documentation] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
3384d757d4
commit
64a8cef41a
3 changed files with 8 additions and 1 deletions
|
@ -1491,6 +1491,7 @@ struct ieee80211_sta_rates {
|
||||||
* @tdls: indicates whether the STA is a TDLS peer
|
* @tdls: indicates whether the STA is a TDLS peer
|
||||||
* @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only
|
* @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only
|
||||||
* valid if the STA is a TDLS peer in the first place.
|
* valid if the STA is a TDLS peer in the first place.
|
||||||
|
* @mfp: indicates whether the STA uses management frame protection or not.
|
||||||
*/
|
*/
|
||||||
struct ieee80211_sta {
|
struct ieee80211_sta {
|
||||||
u32 supp_rates[IEEE80211_NUM_BANDS];
|
u32 supp_rates[IEEE80211_NUM_BANDS];
|
||||||
|
@ -1507,6 +1508,7 @@ struct ieee80211_sta {
|
||||||
struct ieee80211_sta_rates __rcu *rates;
|
struct ieee80211_sta_rates __rcu *rates;
|
||||||
bool tdls;
|
bool tdls;
|
||||||
bool tdls_initiator;
|
bool tdls_initiator;
|
||||||
|
bool mfp;
|
||||||
|
|
||||||
/* must be last */
|
/* must be last */
|
||||||
u8 drv_priv[0] __aligned(sizeof(void *));
|
u8 drv_priv[0] __aligned(sizeof(void *));
|
||||||
|
|
|
@ -1068,6 +1068,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
|
||||||
sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME);
|
sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME);
|
||||||
|
|
||||||
if (mask & BIT(NL80211_STA_FLAG_MFP)) {
|
if (mask & BIT(NL80211_STA_FLAG_MFP)) {
|
||||||
|
sta->sta.mfp = !!(set & BIT(NL80211_STA_FLAG_MFP));
|
||||||
if (set & BIT(NL80211_STA_FLAG_MFP))
|
if (set & BIT(NL80211_STA_FLAG_MFP))
|
||||||
set_sta_flag(sta, WLAN_STA_MFP);
|
set_sta_flag(sta, WLAN_STA_MFP);
|
||||||
else
|
else
|
||||||
|
|
|
@ -2966,8 +2966,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
|
||||||
|
|
||||||
rate_control_rate_init(sta);
|
rate_control_rate_init(sta);
|
||||||
|
|
||||||
if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED)
|
if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED) {
|
||||||
set_sta_flag(sta, WLAN_STA_MFP);
|
set_sta_flag(sta, WLAN_STA_MFP);
|
||||||
|
sta->sta.mfp = true;
|
||||||
|
} else {
|
||||||
|
sta->sta.mfp = false;
|
||||||
|
}
|
||||||
|
|
||||||
sta->sta.wme = elems.wmm_param;
|
sta->sta.wme = elems.wmm_param;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue