diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-04-20 00:33:55 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-05-21 14:39:34 +0200 |
commit | 289c6324259e46a35885af112dff5588c866a5a3 (patch) | |
tree | e463595936054cde0b7ee4473f5e0fa31d905d4b /package/kernel/mac80211/patches/subsys | |
parent | 64f343a881a95fd82359eeb81651a2845a8a2dc4 (diff) | |
download | upstream-289c6324259e46a35885af112dff5588c866a5a3.tar.gz upstream-289c6324259e46a35885af112dff5588c866a5a3.tar.bz2 upstream-289c6324259e46a35885af112dff5588c866a5a3.zip |
mac80211: Update to version 5.7-rc3-1
This updates the mac80211 backport.
The removed patches are already integrated in the upstream version.
The 131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch patch
was manually adapted to the changes in kernel 5.7.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys')
10 files changed, 101 insertions, 152 deletions
diff --git a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch index 5fe7616143..5556f9b72a 100644 --- a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch @@ -687,7 +687,7 @@ #endif /* AES_GMAC_H */ --- a/net/mac80211/key.h +++ b/net/mac80211/key.h -@@ -88,7 +88,7 @@ struct ieee80211_key { +@@ -89,7 +89,7 @@ struct ieee80211_key { * Management frames. */ u8 rx_pn[IEEE80211_NUM_TIDS + 1][IEEE80211_CCMP_PN_LEN]; diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index 8e0fddd10a..cceb6d5d7d 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1172,7 +1172,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1186,7 +1186,6 @@ static int ieee80211_stop_ap(struct wiph sdata->vif.bss_conf.ftmr_params = NULL; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/subsys/130-disable-fils.patch b/package/kernel/mac80211/patches/subsys/130-disable-fils.patch index f370dd52ee..5ca64d2c73 100644 --- a/package/kernel/mac80211/patches/subsys/130-disable-fils.patch +++ b/package/kernel/mac80211/patches/subsys/130-disable-fils.patch @@ -21,7 +21,7 @@ Disable FILS support, since it pulls in crypto hash support * FILS AEAD for (Re)Association Request/Response frames --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -571,7 +571,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -586,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ NL80211_FEATURE_MAC_ON_CREATE | NL80211_FEATURE_USERSPACE_MPM | NL80211_FEATURE_FULL_AP_CLIENT_STATE; diff --git a/package/kernel/mac80211/patches/subsys/131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch b/package/kernel/mac80211/patches/subsys/131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch index 02e523878e..c3bf7ccc7a 100644 --- a/package/kernel/mac80211/patches/subsys/131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch +++ b/package/kernel/mac80211/patches/subsys/131-Revert-mac80211-aes-cmac-switch-to-shash-CMAC-driver.patch @@ -11,14 +11,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/net/mac80211/aes_cmac.c +++ b/net/mac80211/aes_cmac.c -@@ -19,50 +19,126 @@ +@@ -19,67 +19,151 @@ #define CMAC_TLEN_256 16 /* CMAC TLen = 128 bits (16 octets) */ #define AAD_LEN 20 -static const u8 zero[CMAC_TLEN_256]; -void ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad, -- const u8 *data, size_t data_len, u8 *mic) +void gf_mulx(u8 *pad) +{ + int i, carry; @@ -34,9 +33,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> +void aes_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, + const u8 *addr[], const size_t *len, u8 *mac, + size_t mac_len) - { -- SHASH_DESC_ON_STACK(desc, tfm); -- u8 out[AES_BLOCK_SIZE]; ++{ + u8 cbc[AES_BLOCK_SIZE], pad[AES_BLOCK_SIZE]; + const u8 *pos, *end; + size_t i, e, left, total_len; @@ -88,30 +85,48 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + crypto_cipher_encrypt_one(tfm, pad, pad); + memcpy(mac, pad, mac_len); +} ++ ++ ++void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, + const u8 *data, size_t data_len, u8 *mic) + { +- SHASH_DESC_ON_STACK(desc, tfm); +- u8 out[AES_BLOCK_SIZE]; ++ const u8 *addr[4]; ++ size_t len[4]; ++ u8 zero[CMAC_TLEN]; + const __le16 *fc; - desc->tfm = tfm; - +- - crypto_shash_init(desc); - crypto_shash_update(desc, aad, AAD_LEN); -- crypto_shash_update(desc, data, data_len - CMAC_TLEN); -- crypto_shash_finup(desc, zero, CMAC_TLEN, out); -+void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, -+ const u8 *data, size_t data_len, u8 *mic) -+{ -+ const u8 *addr[3]; -+ size_t len[3]; -+ u8 zero[CMAC_TLEN]; -+ + memset(zero, 0, CMAC_TLEN); + addr[0] = aad; + len[0] = AAD_LEN; -+ addr[1] = data; -+ len[1] = data_len - CMAC_TLEN; -+ addr[2] = zero; -+ len[2] = CMAC_TLEN; - + fc = (const __le16 *)aad; + if (ieee80211_is_beacon(*fc)) { + /* mask Timestamp field to zero */ +- crypto_shash_update(desc, zero, 8); +- crypto_shash_update(desc, data + 8, data_len - 8 - CMAC_TLEN); ++ addr[1] = zero; ++ len[1] = 8; ++ addr[2] = data + 8; ++ len[2] = data_len - 8 - CMAC_TLEN; ++ addr[3] = zero; ++ len[3] = CMAC_TLEN; ++ aes_cmac_vector(tfm, 4, addr, len, mic, CMAC_TLEN); + } else { +- crypto_shash_update(desc, data, data_len - CMAC_TLEN); ++ addr[1] = data; ++ len[1] = data_len - CMAC_TLEN; ++ addr[2] = zero; ++ len[2] = CMAC_TLEN; ++ aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); + } +- crypto_shash_finup(desc, zero, CMAC_TLEN, out); +- - memcpy(mic, out, CMAC_TLEN); -+ aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); } -void ieee80211_aes_cmac_256(struct crypto_shash *tfm, const u8 *aad, @@ -119,25 +134,41 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> const u8 *data, size_t data_len, u8 *mic) { - SHASH_DESC_ON_STACK(desc, tfm); -+ const u8 *addr[3]; -+ size_t len[3]; ++ const u8 *addr[4]; ++ size_t len[4]; + u8 zero[CMAC_TLEN_256]; -+ -+ memset(zero, 0, CMAC_TLEN_256); -+ addr[0] = aad; -+ len[0] = AAD_LEN; -+ addr[1] = data; -+ len[1] = data_len - CMAC_TLEN_256; -+ addr[2] = zero; -+ len[2] = CMAC_TLEN_256; + const __le16 *fc; - desc->tfm = tfm; - - crypto_shash_init(desc); - crypto_shash_update(desc, aad, AAD_LEN); -- crypto_shash_update(desc, data, data_len - CMAC_TLEN_256); ++ memset(zero, 0, CMAC_TLEN_256); ++ addr[0] = aad; ++ len[0] = AAD_LEN; ++ addr[1] = data; + fc = (const __le16 *)aad; + if (ieee80211_is_beacon(*fc)) { + /* mask Timestamp field to zero */ +- crypto_shash_update(desc, zero, 8); +- crypto_shash_update(desc, data + 8, +- data_len - 8 - CMAC_TLEN_256); ++ addr[1] = zero; ++ len[1] = 8; ++ addr[2] = data + 8; ++ len[2] = data_len - 8 - CMAC_TLEN_256; ++ addr[3] = zero; ++ len[3] = CMAC_TLEN_256; ++ aes_cmac_vector(tfm, 4, addr, len, mic, CMAC_TLEN_256); + } else { +- crypto_shash_update(desc, data, data_len - CMAC_TLEN_256); ++ addr[1] = data; ++ len[1] = data_len - CMAC_TLEN_256; ++ addr[2] = zero; ++ len[2] = CMAC_TLEN_256; ++ aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN_256); + } - crypto_shash_finup(desc, zero, CMAC_TLEN_256, mic); -+ aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN_256); } -struct crypto_shash *ieee80211_aes_cmac_key_setup(const u8 key[], @@ -188,7 +219,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> #endif /* AES_CMAC_H */ --- a/net/mac80211/key.h +++ b/net/mac80211/key.h -@@ -93,7 +93,7 @@ struct ieee80211_key { +@@ -94,7 +94,7 @@ struct ieee80211_key { } ccmp; struct { u8 rx_pn[IEEE80211_CMAC_PN_LEN]; diff --git a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch index 668064cfa8..84cfaea8a4 100644 --- a/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch +++ b/package/kernel/mac80211/patches/subsys/140-tweak-TSQ-setting.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -4113,6 +4113,12 @@ out: +@@ -4119,6 +4119,12 @@ out: netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev) { diff --git a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch index ebc1ef489e..2f515be8f0 100644 --- a/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/subsys/150-disable_addr_notifier.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -314,7 +314,7 @@ void ieee80211_restart_hw(struct ieee802 +@@ -316,7 +316,7 @@ void ieee80211_restart_hw(struct ieee802 } EXPORT_SYMBOL(ieee80211_restart_hw); @@ -9,7 +9,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -373,7 +373,7 @@ static int ieee80211_ifa_changed(struct +@@ -375,7 +375,7 @@ static int ieee80211_ifa_changed(struct } #endif @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1273,14 +1273,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1292,14 +1292,14 @@ int ieee80211_register_hw(struct ieee802 rtnl_unlock(); @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1289,13 +1289,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1308,13 +1308,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif wiphy_unregister(local->hw.wiphy); -@@ -1323,10 +1323,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1342,10 +1342,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch index 8c019530d1..13fb2fd077 100644 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch +++ b/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch @@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1786,6 +1786,9 @@ int ieee80211_tx_control_port(struct wip +@@ -1801,6 +1801,9 @@ int ieee80211_tx_control_port(struct wip const u8 *dest, __be16 proto, bool unencrypted); int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, const u8 *buf, size_t len); @@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -829,6 +829,11 @@ void ieee80211_tx_monitor(struct ieee802 +@@ -828,6 +828,11 @@ void ieee80211_tx_monitor(struct ieee802 struct net_device *prev_dev = NULL; int rtap_len; @@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -1936,37 +1936,53 @@ static bool ieee80211_tx(struct ieee8021 +@@ -1937,37 +1937,53 @@ static bool ieee80211_tx(struct ieee8021 } /* device xmit handlers */ @@ -123,7 +123,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> wiphy_debug(local->hw.wiphy, "failed to reallocate TX buffer\n"); return -ENOMEM; -@@ -1982,18 +1998,8 @@ void ieee80211_xmit(struct ieee80211_sub +@@ -1983,18 +1999,8 @@ void ieee80211_xmit(struct ieee80211_sub struct ieee80211_local *local = sdata->local; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr; @@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ieee80211_free_txskb(&local->hw, skb); return; } -@@ -2795,29 +2801,13 @@ static struct sk_buff *ieee80211_build_h +@@ -2796,29 +2802,13 @@ static struct sk_buff *ieee80211_build_h } skb_pull(skb, skip_header_bytes); @@ -179,7 +179,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } if (encaps_data) -@@ -3432,7 +3422,6 @@ static bool ieee80211_xmit_fast(struct i +@@ -3433,7 +3423,6 @@ static bool ieee80211_xmit_fast(struct i struct ieee80211_local *local = sdata->local; u16 ethertype = (skb->data[12] << 8) | skb->data[13]; int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); @@ -187,7 +187,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> struct ethhdr eth; struct ieee80211_tx_info *info; struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; -@@ -3484,10 +3473,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3485,10 +3474,7 @@ static bool ieee80211_xmit_fast(struct i * as the may-encrypt argument for the resize to not account for * more room than we already have in 'extra_head' */ diff --git a/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch b/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch index 64ae487be2..10d8ad8d71 100644 --- a/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch +++ b/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch @@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -338,6 +338,7 @@ struct sta_info *sta_info_alloc(struct i +@@ -339,6 +339,7 @@ struct sta_info *sta_info_alloc(struct i INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); mutex_init(&sta->ampdu_mlme.mtx); diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch deleted file mode 100644 index 16108c83f3..0000000000 --- a/package/kernel/mac80211/patches/subsys/305-mac80211-fix-tx-status-for-no-ack-cases.patch +++ /dev/null @@ -1,82 +0,0 @@ -From: Markus Theil <markus.theil@tu-ilmenau.de> -Date: Wed, 18 Dec 2019 15:27:36 +0100 -Subject: [PATCH] mac80211: fix tx status for no ack cases - -Before this patch, frames which where successfully transmitted without -requiring acks where accounted as lost frames. - -Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> -Link: https://lore.kernel.org/r/20191218142736.15843-1-markus.theil@tu-ilmenau.de -Signed-off-by: Johannes Berg <johannes.berg@intel.com> ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -895,6 +895,7 @@ static void __ieee80211_tx_status(struct - int rates_idx; - bool send_to_cooked; - bool acked; -+ bool noack_success; - struct ieee80211_bar *bar; - int shift = 0; - int tid = IEEE80211_NUM_TIDS; -@@ -913,6 +914,8 @@ static void __ieee80211_tx_status(struct - clear_sta_flag(sta, WLAN_STA_SP); - - acked = !!(info->flags & IEEE80211_TX_STAT_ACK); -+ noack_success = !!(info->flags & -+ IEEE80211_TX_STAT_NOACK_TRANSMITTED); - - /* mesh Peer Service Period support */ - if (ieee80211_vif_is_mesh(&sta->sdata->vif) && -@@ -977,12 +980,12 @@ static void __ieee80211_tx_status(struct - ieee80211_handle_filtered_frame(local, sta, skb); - return; - } else { -- if (!acked) -+ if (!acked && !noack_success) - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; - - if (ieee80211_is_data_present(fc)) { -- if (!acked) -+ if (!acked && !noack_success) - sta->status_stats.msdu_failed[tid]++; - - sta->status_stats.msdu_retries[tid] += -@@ -1020,7 +1023,7 @@ static void __ieee80211_tx_status(struct - } - - if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { -- if (info->flags & IEEE80211_TX_STAT_ACK) { -+ if (acked) { - if (sta->status_stats.lost_packets) - sta->status_stats.lost_packets = 0; - -@@ -1028,6 +1031,8 @@ static void __ieee80211_tx_status(struct - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) - sta->status_stats.last_tdls_pkt_time = - jiffies; -+ } else if (noack_success) { -+ /* nothing to do here, do not account as lost */ - } else { - ieee80211_lost_packet(sta, info); - } -@@ -1148,7 +1153,7 @@ void ieee80211_tx_status_ext(struct ieee - - sta = container_of(pubsta, struct sta_info, sta); - -- if (!acked) -+ if (!acked && !noack_success) - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; - -@@ -1163,6 +1168,8 @@ void ieee80211_tx_status_ext(struct ieee - sta->status_stats.last_tdls_pkt_time = jiffies; - } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { - return; -+ } else if (noack_success) { -+ /* nothing to do here, do not account as lost */ - } else { - ieee80211_lost_packet(sta, info); - } diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 151ca25d18..f4573f124a 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3458,6 +3458,7 @@ struct cfg80211_update_owe_info { +@@ -3552,6 +3552,7 @@ struct cfg80211_update_owe_info { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -3773,6 +3774,7 @@ struct cfg80211_ops { +@@ -3874,6 +3875,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -18,7 +18,7 @@ const u8 *addr); --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1501,6 +1501,7 @@ enum ieee80211_smps_mode { +@@ -1504,6 +1504,7 @@ enum ieee80211_smps_mode { * * @power_level: requested transmit power (in dBm), backward compatibility * value only that is set to the minimum of all interfaces @@ -26,7 +26,7 @@ * * @chandef: the channel definition to tune to * @radar_enabled: whether radar detection is enabled -@@ -1521,6 +1522,7 @@ enum ieee80211_smps_mode { +@@ -1524,6 +1525,7 @@ enum ieee80211_smps_mode { struct ieee80211_conf { u32 flags; int power_level, dynamic_ps_timeout; @@ -36,9 +36,9 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2400,6 +2400,9 @@ enum nl80211_commands { - * @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key - * (u16). +@@ -2470,6 +2470,9 @@ enum nl80211_commands { + * no roaming occurs between the reauth threshold and PMK expiration, + * disassociation is still forced. * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. @@ -46,9 +46,9 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2864,6 +2867,8 @@ enum nl80211_attrs { - - NL80211_ATTR_VLAN_ID, +@@ -2945,6 +2948,8 @@ enum nl80211_attrs { + NL80211_ATTR_PMK_LIFETIME, + NL80211_ATTR_PMK_REAUTH_THRESHOLD, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -4017,6 +4030,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4004,6 +4017,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -87,7 +87,7 @@ CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1376,6 +1376,7 @@ struct ieee80211_local { +@@ -1380,6 +1380,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ @@ -106,7 +106,7 @@ u32 offchannel_flag; offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; -@@ -150,6 +150,12 @@ static u32 ieee80211_hw_conf_chan(struct +@@ -152,6 +152,12 @@ static u32 ieee80211_hw_conf_chan(struct } rcu_read_unlock(); @@ -119,7 +119,7 @@ if (local->hw.conf.power_level != power) { changed |= IEEE80211_CONF_CHANGE_POWER; local->hw.conf.power_level = power; -@@ -639,6 +645,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -656,6 +662,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_ IEEE80211_RADIOTAP_MCS_HAVE_BW; local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI | IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; @@ -129,15 +129,15 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -630,6 +630,7 @@ const struct nla_policy nl80211_policy[N - [NL80211_ATTR_TWT_RESPONDER] = { .type = NLA_FLAG }, - [NL80211_ATTR_HE_OBSS_PD] = NLA_POLICY_NESTED(he_obss_pd_policy), - [NL80211_ATTR_VLAN_ID] = NLA_POLICY_RANGE(NLA_U16, 1, VLAN_N_VID - 2), +@@ -661,6 +661,7 @@ const struct nla_policy nl80211_policy[N + [NL80211_ATTR_CONTROL_PORT_NO_PREAUTH] = { .type = NLA_FLAG }, + [NL80211_ATTR_PMK_LIFETIME] = NLA_POLICY_MIN(NLA_U32, 1), + [NL80211_ATTR_PMK_REAUTH_THRESHOLD] = NLA_POLICY_RANGE(NLA_U8, 1, 100), + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -2994,6 +2995,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3132,6 +3133,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } |