mac80211: Update toversion 5.10.85
The following patches were backported from upstream before and are not needed any more: package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
		| @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk | |||||||
|  |  | ||||||
| PKG_NAME:=mac80211 | PKG_NAME:=mac80211 | ||||||
|  |  | ||||||
| PKG_VERSION:=5.10.68-1 | PKG_VERSION:=5.10.85-1 | ||||||
| PKG_RELEASE:=3 | PKG_RELEASE:=1 | ||||||
| PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.68/ | PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.85/ | ||||||
| PKG_HASH:=bba161b0084590c677a84b80993709e388a3c478f29ed0c475d4fce1b9162968 | PKG_HASH:=0b5f2d5acf572c448f102a186aaccd8b77bda182ac5166c7b2e3217870162784 | ||||||
|  |  | ||||||
| PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz | PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz | ||||||
| PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) | PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) | ||||||
|   | |||||||
| @@ -125,9 +125,9 @@ | |||||||
|  		REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); |  		REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); | ||||||
| --- a/drivers/net/wireless/ath/ath9k/main.c | --- a/drivers/net/wireless/ath/ath9k/main.c | ||||||
| +++ b/drivers/net/wireless/ath/ath9k/main.c | +++ b/drivers/net/wireless/ath/ath9k/main.c | ||||||
| @@ -536,6 +536,11 @@ irqreturn_t ath_isr(int irq, void *dev) | @@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev) | ||||||
|  	if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) |  | ||||||
|  		return IRQ_HANDLED; |  		return IRQ_HANDLED; | ||||||
|  |  	} | ||||||
|   |   | ||||||
| +	if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) { | +	if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) { | ||||||
| +		status |= ATH9K_INT_FATAL; | +		status |= ATH9K_INT_FATAL; | ||||||
|   | |||||||
| @@ -339,7 +339,7 @@ | |||||||
|   |   | ||||||
|  static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |  static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||||||
|  			u32 queues, bool drop); |  			u32 queues, bool drop); | ||||||
| @@ -657,6 +658,7 @@ void ath_reset_work(struct work_struct * | @@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct * | ||||||
|  static int ath9k_start(struct ieee80211_hw *hw) |  static int ath9k_start(struct ieee80211_hw *hw) | ||||||
|  { |  { | ||||||
|  	struct ath_softc *sc = hw->priv; |  	struct ath_softc *sc = hw->priv; | ||||||
| @@ -347,7 +347,7 @@ | |||||||
|  	struct ath_hw *ah = sc->sc_ah; |  	struct ath_hw *ah = sc->sc_ah; | ||||||
|  	struct ath_common *common = ath9k_hw_common(ah); |  	struct ath_common *common = ath9k_hw_common(ah); | ||||||
|  	struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; |  	struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; | ||||||
| @@ -735,6 +737,11 @@ static int ath9k_start(struct ieee80211_ | @@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_ | ||||||
|  					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT); |  					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT); | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| --- a/drivers/net/wireless/ath/ath10k/mac.c | --- a/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/mac.c | +++ b/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| @@ -9709,6 +9709,21 @@ static int ath10k_mac_init_rd(struct ath | @@ -9732,6 +9732,21 @@ static int ath10k_mac_init_rd(struct ath | ||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -22,7 +22,7 @@ | |||||||
|  int ath10k_mac_register(struct ath10k *ar) |  int ath10k_mac_register(struct ath10k *ar) | ||||||
|  { |  { | ||||||
|  	static const u32 cipher_suites[] = { |  	static const u32 cipher_suites[] = { | ||||||
| @@ -10058,6 +10073,12 @@ int ath10k_mac_register(struct ath10k *a | @@ -10081,6 +10096,12 @@ int ath10k_mac_register(struct ath10k *a | ||||||
|   |   | ||||||
|  	ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; |  	ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -467,7 +467,7 @@ v13: | |||||||
|  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { |  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { | ||||||
| --- a/drivers/net/wireless/ath/ath10k/wmi.c | --- a/drivers/net/wireless/ath/ath10k/wmi.c | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/wmi.c | +++ b/drivers/net/wireless/ath/ath10k/wmi.c | ||||||
| @@ -7468,6 +7468,49 @@ ath10k_wmi_op_gen_peer_set_param(struct | @@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct | ||||||
|  	return skb; |  	return skb; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -517,7 +517,7 @@ v13: | |||||||
|  static struct sk_buff * |  static struct sk_buff * | ||||||
|  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, |  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, | ||||||
|  			     enum wmi_sta_ps_mode psmode) |  			     enum wmi_sta_ps_mode psmode) | ||||||
| @@ -9156,6 +9199,9 @@ static const struct wmi_ops wmi_ops = { | @@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = { | ||||||
|  	.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, |  	.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, | ||||||
|  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, |  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, | ||||||
|  	.gen_echo = ath10k_wmi_op_gen_echo, |  	.gen_echo = ath10k_wmi_op_gen_echo, | ||||||
| @@ -527,7 +527,7 @@ v13: | |||||||
|  	/* .gen_bcn_tmpl not implemented */ |  	/* .gen_bcn_tmpl not implemented */ | ||||||
|  	/* .gen_prb_tmpl not implemented */ |  	/* .gen_prb_tmpl not implemented */ | ||||||
|  	/* .gen_p2p_go_bcn_ie not implemented */ |  	/* .gen_p2p_go_bcn_ie not implemented */ | ||||||
| @@ -9226,6 +9272,8 @@ static const struct wmi_ops wmi_10_1_ops | @@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops | ||||||
|  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, |  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, | ||||||
|  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, |  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, | ||||||
|  	.gen_echo = ath10k_wmi_op_gen_echo, |  	.gen_echo = ath10k_wmi_op_gen_echo, | ||||||
| @@ -536,7 +536,7 @@ v13: | |||||||
|  	/* .gen_bcn_tmpl not implemented */ |  	/* .gen_bcn_tmpl not implemented */ | ||||||
|  	/* .gen_prb_tmpl not implemented */ |  	/* .gen_prb_tmpl not implemented */ | ||||||
|  	/* .gen_p2p_go_bcn_ie not implemented */ |  	/* .gen_p2p_go_bcn_ie not implemented */ | ||||||
| @@ -9298,6 +9346,8 @@ static const struct wmi_ops wmi_10_2_ops | @@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops | ||||||
|  	.gen_delba_send = ath10k_wmi_op_gen_delba_send, |  	.gen_delba_send = ath10k_wmi_op_gen_delba_send, | ||||||
|  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, |  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, | ||||||
|  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, |  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, | ||||||
| @@ -545,7 +545,7 @@ v13: | |||||||
|  	/* .gen_pdev_enable_adaptive_cca not implemented */ |  	/* .gen_pdev_enable_adaptive_cca not implemented */ | ||||||
|  }; |  }; | ||||||
|   |   | ||||||
| @@ -9369,6 +9419,8 @@ static const struct wmi_ops wmi_10_2_4_o | @@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o | ||||||
|  		ath10k_wmi_op_gen_pdev_enable_adaptive_cca, |  		ath10k_wmi_op_gen_pdev_enable_adaptive_cca, | ||||||
|  	.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, |  	.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, | ||||||
|  	.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, |  	.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, | ||||||
| @@ -554,7 +554,7 @@ v13: | |||||||
|  	/* .gen_bcn_tmpl not implemented */ |  	/* .gen_bcn_tmpl not implemented */ | ||||||
|  	/* .gen_prb_tmpl not implemented */ |  	/* .gen_prb_tmpl not implemented */ | ||||||
|  	/* .gen_p2p_go_bcn_ie not implemented */ |  	/* .gen_p2p_go_bcn_ie not implemented */ | ||||||
| @@ -9450,6 +9502,8 @@ static const struct wmi_ops wmi_10_4_ops | @@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops | ||||||
|  	.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, |  	.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, | ||||||
|  	.gen_echo = ath10k_wmi_op_gen_echo, |  	.gen_echo = ath10k_wmi_op_gen_echo, | ||||||
|  	.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, |  	.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, | ||||||
| @@ -565,7 +565,7 @@ v13: | |||||||
|  int ath10k_wmi_attach(struct ath10k *ar) |  int ath10k_wmi_attach(struct ath10k *ar) | ||||||
| --- a/drivers/net/wireless/ath/ath10k/wmi.h | --- a/drivers/net/wireless/ath/ath10k/wmi.h | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/wmi.h | +++ b/drivers/net/wireless/ath/ath10k/wmi.h | ||||||
| @@ -3027,6 +3027,41 @@ enum wmi_10_4_feature_mask { | @@ -3030,6 +3030,41 @@ enum wmi_10_4_feature_mask { | ||||||
|   |   | ||||||
|  }; |  }; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev@kresin.me> | |||||||
|  	if (ret) |  	if (ret) | ||||||
| --- a/drivers/net/wireless/ath/ath10k/mac.c | --- a/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/mac.c | +++ b/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| @@ -10075,7 +10075,7 @@ int ath10k_mac_register(struct ath10k *a | @@ -10098,7 +10098,7 @@ int ath10k_mac_register(struct ath10k *a | ||||||
|  	ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; |  	ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; | ||||||
|   |   | ||||||
|  #ifdef CPTCFG_MAC80211_LEDS |  #ifdef CPTCFG_MAC80211_LEDS | ||||||
|   | |||||||
| @@ -1,49 +0,0 @@ | |||||||
| From: Sven Eckelmann <seckelmann@datto.com> |  | ||||||
| Date: Tue, 11 Jun 2019 13:58:35 +0200 |  | ||||||
| Subject: ath10k: fix max antenna gain unit |  | ||||||
|  |  | ||||||
| Most of the txpower for the ath10k firmware is stored as twicepower (0.5 dB |  | ||||||
| steps). This isn't the case for max_antenna_gain - which is still expected |  | ||||||
| by the firmware as dB. |  | ||||||
|  |  | ||||||
| The firmware is converting it from dB to the internal (twicepower) |  | ||||||
| representation when it calculates the limits of a channel. This can be seen |  | ||||||
| in tpc_stats when configuring "12" as max_antenna_gain. Instead of the |  | ||||||
| expected 12 (6 dB), the tpc_stats shows 24 (12 dB). |  | ||||||
|  |  | ||||||
| Tested on QCA9888 and IPQ4019 with firmware 10.4-3.5.3-00057. |  | ||||||
|  |  | ||||||
| Fixes: 02256930d9b8 ("ath10k: use proper tx power unit") |  | ||||||
| Signed-off-by: Sven Eckelmann <seckelmann@datto.com> |  | ||||||
|  |  | ||||||
| Forwarded: https://patchwork.kernel.org/patch/10986723/ |  | ||||||
|  |  | ||||||
| --- a/drivers/net/wireless/ath/ath10k/mac.c |  | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/mac.c |  | ||||||
| @@ -1038,7 +1038,7 @@ static int ath10k_monitor_vdev_start(str |  | ||||||
|  	arg.channel.min_power = 0; |  | ||||||
|  	arg.channel.max_power = channel->max_power * 2; |  | ||||||
|  	arg.channel.max_reg_power = channel->max_reg_power * 2; |  | ||||||
| -	arg.channel.max_antenna_gain = channel->max_antenna_gain * 2; |  | ||||||
| +	arg.channel.max_antenna_gain = channel->max_antenna_gain; |  | ||||||
|   |  | ||||||
|  	reinit_completion(&ar->vdev_setup_done); |  | ||||||
|  	reinit_completion(&ar->vdev_delete_done); |  | ||||||
| @@ -1484,7 +1484,7 @@ static int ath10k_vdev_start_restart(str |  | ||||||
|  	arg.channel.min_power = 0; |  | ||||||
|  	arg.channel.max_power = chandef->chan->max_power * 2; |  | ||||||
|  	arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; |  | ||||||
| -	arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2; |  | ||||||
| +	arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain; |  | ||||||
|   |  | ||||||
|  	if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { |  | ||||||
|  		arg.ssid = arvif->u.ap.ssid; |  | ||||||
| @@ -3255,7 +3255,7 @@ static int ath10k_update_channel_list(st |  | ||||||
|  			ch->min_power = 0; |  | ||||||
|  			ch->max_power = channel->max_power * 2; |  | ||||||
|  			ch->max_reg_power = channel->max_reg_power * 2; |  | ||||||
| -			ch->max_antenna_gain = channel->max_antenna_gain * 2; |  | ||||||
| +			ch->max_antenna_gain = channel->max_antenna_gain; |  | ||||||
|  			ch->reg_class_id = 0; /* FIXME */ |  | ||||||
|   |  | ||||||
|  			/* FIXME: why use only legacy modes, why not any |  | ||||||
| @@ -28,7 +28,7 @@ Forwarded: no | |||||||
|  |  | ||||||
| --- a/drivers/net/wireless/ath/ath10k/mac.c | --- a/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| +++ b/drivers/net/wireless/ath/ath10k/mac.c | +++ b/drivers/net/wireless/ath/ath10k/mac.c | ||||||
| @@ -1006,6 +1006,40 @@ static inline int ath10k_vdev_setup_sync | @@ -1010,6 +1010,40 @@ static inline int ath10k_vdev_setup_sync | ||||||
|  	return ar->last_wmi_vdev_start_status; |  	return ar->last_wmi_vdev_start_status; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -69,7 +69,7 @@ Forwarded: no | |||||||
|  static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) |  static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) | ||||||
|  { |  { | ||||||
|  	struct cfg80211_chan_def *chandef = NULL; |  	struct cfg80211_chan_def *chandef = NULL; | ||||||
| @@ -1038,7 +1072,8 @@ static int ath10k_monitor_vdev_start(str | @@ -1042,7 +1076,8 @@ static int ath10k_monitor_vdev_start(str | ||||||
|  	arg.channel.min_power = 0; |  	arg.channel.min_power = 0; | ||||||
|  	arg.channel.max_power = channel->max_power * 2; |  	arg.channel.max_power = channel->max_power * 2; | ||||||
|  	arg.channel.max_reg_power = channel->max_reg_power * 2; |  	arg.channel.max_reg_power = channel->max_reg_power * 2; | ||||||
| @@ -79,7 +79,7 @@ Forwarded: no | |||||||
|   |   | ||||||
|  	reinit_completion(&ar->vdev_setup_done); |  	reinit_completion(&ar->vdev_setup_done); | ||||||
|  	reinit_completion(&ar->vdev_delete_done); |  	reinit_completion(&ar->vdev_delete_done); | ||||||
| @@ -1484,7 +1519,8 @@ static int ath10k_vdev_start_restart(str | @@ -1488,7 +1523,8 @@ static int ath10k_vdev_start_restart(str | ||||||
|  	arg.channel.min_power = 0; |  	arg.channel.min_power = 0; | ||||||
|  	arg.channel.max_power = chandef->chan->max_power * 2; |  	arg.channel.max_power = chandef->chan->max_power * 2; | ||||||
|  	arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; |  	arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; | ||||||
| @@ -89,7 +89,7 @@ Forwarded: no | |||||||
|   |   | ||||||
|  	if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { |  	if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { | ||||||
|  		arg.ssid = arvif->u.ap.ssid; |  		arg.ssid = arvif->u.ap.ssid; | ||||||
| @@ -3255,7 +3291,8 @@ static int ath10k_update_channel_list(st | @@ -3259,7 +3295,8 @@ static int ath10k_update_channel_list(st | ||||||
|  			ch->min_power = 0; |  			ch->min_power = 0; | ||||||
|  			ch->max_power = channel->max_power * 2; |  			ch->max_power = channel->max_power * 2; | ||||||
|  			ch->max_reg_power = channel->max_reg_power * 2; |  			ch->max_reg_power = channel->max_reg_power * 2; | ||||||
|   | |||||||
| @@ -439,7 +439,7 @@ | |||||||
|  } |  } | ||||||
|   |   | ||||||
|   |   | ||||||
| @@ -543,13 +542,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee | @@ -546,13 +545,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee | ||||||
|  			u8 aad[2 * AES_BLOCK_SIZE]; |  			u8 aad[2 * AES_BLOCK_SIZE]; | ||||||
|  			u8 b_0[AES_BLOCK_SIZE]; |  			u8 b_0[AES_BLOCK_SIZE]; | ||||||
|  			/* hardware didn't decrypt/verify MIC */ |  			/* hardware didn't decrypt/verify MIC */ | ||||||
| @@ -455,7 +455,7 @@ | |||||||
|  				return RX_DROP_UNUSABLE; |  				return RX_DROP_UNUSABLE; | ||||||
|  		} |  		} | ||||||
|   |   | ||||||
| @@ -646,7 +645,7 @@ static int gcmp_encrypt_skb(struct ieee8 | @@ -649,7 +648,7 @@ static int gcmp_encrypt_skb(struct ieee8 | ||||||
|  	u8 *pos; |  	u8 *pos; | ||||||
|  	u8 pn[6]; |  	u8 pn[6]; | ||||||
|  	u64 pn64; |  	u64 pn64; | ||||||
| @@ -464,7 +464,7 @@ | |||||||
|  	u8 j_0[AES_BLOCK_SIZE]; |  	u8 j_0[AES_BLOCK_SIZE]; | ||||||
|   |   | ||||||
|  	if (info->control.hw_key && |  	if (info->control.hw_key && | ||||||
| @@ -703,8 +702,10 @@ static int gcmp_encrypt_skb(struct ieee8 | @@ -706,8 +705,10 @@ static int gcmp_encrypt_skb(struct ieee8 | ||||||
|   |   | ||||||
|  	pos += IEEE80211_GCMP_HDR_LEN; |  	pos += IEEE80211_GCMP_HDR_LEN; | ||||||
|  	gcmp_special_blocks(skb, pn, j_0, aad); |  	gcmp_special_blocks(skb, pn, j_0, aad); | ||||||
| @@ -477,7 +477,7 @@ | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  ieee80211_tx_result |  ieee80211_tx_result | ||||||
| @@ -1133,9 +1134,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct | @@ -1139,9 +1140,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct | ||||||
|  	struct ieee80211_key *key = tx->key; |  	struct ieee80211_key *key = tx->key; | ||||||
|  	struct ieee80211_mmie_16 *mmie; |  	struct ieee80211_mmie_16 *mmie; | ||||||
|  	struct ieee80211_hdr *hdr; |  	struct ieee80211_hdr *hdr; | ||||||
| @@ -489,7 +489,7 @@ | |||||||
|   |   | ||||||
|  	if (WARN_ON(skb_queue_len(&tx->skbs) != 1)) |  	if (WARN_ON(skb_queue_len(&tx->skbs) != 1)) | ||||||
|  		return TX_DROP; |  		return TX_DROP; | ||||||
| @@ -1181,7 +1182,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct | @@ -1187,7 +1188,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct | ||||||
|  	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |  	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | ||||||
|  	struct ieee80211_key *key = rx->key; |  	struct ieee80211_key *key = rx->key; | ||||||
|  	struct ieee80211_mmie_16 *mmie; |  	struct ieee80211_mmie_16 *mmie; | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  |  | ||||||
| --- a/include/net/cfg80211.h | --- a/include/net/cfg80211.h | ||||||
| +++ b/include/net/cfg80211.h | +++ b/include/net/cfg80211.h | ||||||
| @@ -6410,13 +6410,15 @@ void cfg80211_abandon_assoc(struct net_d | @@ -6408,13 +6408,15 @@ void cfg80211_abandon_assoc(struct net_d | ||||||
|   * @dev: network device |   * @dev: network device | ||||||
|   * @buf: 802.11 frame (header + body) |   * @buf: 802.11 frame (header + body) | ||||||
|   * @len: length of the frame data |   * @len: length of the frame data | ||||||
|   | |||||||
| @@ -52,7 +52,7 @@ Signed-off-by: Xing Song <xing.song@mediatek.com> | |||||||
|  |  | ||||||
| --- a/net/mac80211/rx.c | --- a/net/mac80211/rx.c | ||||||
| +++ b/net/mac80211/rx.c | +++ b/net/mac80211/rx.c | ||||||
| @@ -2940,6 +2940,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 | @@ -2941,6 +2941,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 | ||||||
|  	if (!fwd_skb) |  	if (!fwd_skb) | ||||||
|  		goto out; |  		goto out; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -1,26 +0,0 @@ | |||||||
| From: Xing Song <xing.song@mediatek.com> |  | ||||||
| Date: Mon, 1 Nov 2021 10:46:57 +0800 |  | ||||||
| Subject: [PATCH] mac80211: do not access the IV when it was stripped |  | ||||||
|  |  | ||||||
| ieee80211_get_keyid() will return false value if IV has been stripped, |  | ||||||
| such as return 0 for IP/ARP frames due to LLC header, and return -EINVAL |  | ||||||
| for disassociation frames due to its length... etc. Don't try to access |  | ||||||
| it if it's not present. |  | ||||||
|  |  | ||||||
| Signed-off-by: Xing Song <xing.song@mediatek.com> |  | ||||||
| Link: https://lore.kernel.org/r/20211101024657.143026-1-xing.song@mediatek.com |  | ||||||
| Signed-off-by: Johannes Berg <johannes.berg@intel.com> |  | ||||||
| --- |  | ||||||
|  |  | ||||||
| --- a/net/mac80211/rx.c |  | ||||||
| +++ b/net/mac80211/rx.c |  | ||||||
| @@ -1945,7 +1945,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_ |  | ||||||
|  		int keyid = rx->sta->ptk_idx; |  | ||||||
|  		sta_ptk = rcu_dereference(rx->sta->ptk[keyid]); |  | ||||||
|   |  | ||||||
| -		if (ieee80211_has_protected(fc)) { |  | ||||||
| +		if (ieee80211_has_protected(fc) && |  | ||||||
| +		    !(status->flag & RX_FLAG_IV_STRIPPED)) { |  | ||||||
|  			cs = rx->sta->cipher_scheme; |  | ||||||
|  			keyid = ieee80211_get_keyid(rx->skb, cs); |  | ||||||
|   |  | ||||||
| @@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	codel_vars_init(&txqi->def_cvars); |  	codel_vars_init(&txqi->def_cvars); | ||||||
|  	codel_stats_init(&txqi->cstats); |  	codel_stats_init(&txqi->cstats); | ||||||
|  	__skb_queue_head_init(&txqi->frags); |  	__skb_queue_head_init(&txqi->frags); | ||||||
| @@ -3332,8 +3319,7 @@ static bool ieee80211_amsdu_aggregate(st | @@ -3336,8 +3323,7 @@ static bool ieee80211_amsdu_aggregate(st | ||||||
|  	 */ |  	 */ | ||||||
|   |   | ||||||
|  	tin = &txqi->tin; |  	tin = &txqi->tin; | ||||||
|   | |||||||
| @@ -306,7 +306,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  #endif |  #endif | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -3386,8 +3386,6 @@ out_recalc: | @@ -3398,8 +3398,6 @@ out_recalc: | ||||||
|  	if (head->len != orig_len) { |  	if (head->len != orig_len) { | ||||||
|  		flow->backlog += head->len - orig_len; |  		flow->backlog += head->len - orig_len; | ||||||
|  		tin->backlog_bytes += head->len - orig_len; |  		tin->backlog_bytes += head->len - orig_len; | ||||||
|   | |||||||
| @@ -183,7 +183,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; |  	enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; | ||||||
| --- a/net/mac80211/rx.c | --- a/net/mac80211/rx.c | ||||||
| +++ b/net/mac80211/rx.c | +++ b/net/mac80211/rx.c | ||||||
| @@ -4197,7 +4197,9 @@ void ieee80211_check_fast_rx(struct sta_ | @@ -4198,7 +4198,9 @@ void ieee80211_check_fast_rx(struct sta_ | ||||||
|  		.vif_type = sdata->vif.type, |  		.vif_type = sdata->vif.type, | ||||||
|  		.control_port_protocol = sdata->control_port_protocol, |  		.control_port_protocol = sdata->control_port_protocol, | ||||||
|  	}, *old, *new = NULL; |  	}, *old, *new = NULL; | ||||||
| @@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|   |   | ||||||
|  	/* use sparse to check that we don't return without updating */ |  	/* use sparse to check that we don't return without updating */ | ||||||
|  	__acquire(check_fast_rx); |  	__acquire(check_fast_rx); | ||||||
| @@ -4310,6 +4312,17 @@ void ieee80211_check_fast_rx(struct sta_ | @@ -4311,6 +4313,17 @@ void ieee80211_check_fast_rx(struct sta_ | ||||||
|  	if (assign) |  	if (assign) | ||||||
|  		new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL); |  		new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL); | ||||||
|   |   | ||||||
| @@ -211,7 +211,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	spin_lock_bh(&sta->lock); |  	spin_lock_bh(&sta->lock); | ||||||
|  	old = rcu_dereference_protected(sta->fast_rx, true); |  	old = rcu_dereference_protected(sta->fast_rx, true); | ||||||
|  	rcu_assign_pointer(sta->fast_rx, new); |  	rcu_assign_pointer(sta->fast_rx, new); | ||||||
| @@ -4356,6 +4369,108 @@ void ieee80211_check_fast_rx_iface(struc | @@ -4357,6 +4370,108 @@ void ieee80211_check_fast_rx_iface(struc | ||||||
|  	mutex_unlock(&local->sta_mtx); |  	mutex_unlock(&local->sta_mtx); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -320,7 +320,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, |  static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, | ||||||
|  				     struct ieee80211_fast_rx *fast_rx) |  				     struct ieee80211_fast_rx *fast_rx) | ||||||
|  { |  { | ||||||
| @@ -4376,9 +4491,6 @@ static bool ieee80211_invoke_fast_rx(str | @@ -4377,9 +4492,6 @@ static bool ieee80211_invoke_fast_rx(str | ||||||
|  	} addrs __aligned(2); |  	} addrs __aligned(2); | ||||||
|  	struct ieee80211_sta_rx_stats *stats = &sta->rx_stats; |  	struct ieee80211_sta_rx_stats *stats = &sta->rx_stats; | ||||||
|   |   | ||||||
| @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	/* for parallel-rx, we need to have DUP_VALIDATED, otherwise we write |  	/* for parallel-rx, we need to have DUP_VALIDATED, otherwise we write | ||||||
|  	 * to a common data structure; drivers can implement that per queue |  	 * to a common data structure; drivers can implement that per queue | ||||||
|  	 * but we don't have that information in mac80211 |  	 * but we don't have that information in mac80211 | ||||||
| @@ -4452,32 +4564,6 @@ static bool ieee80211_invoke_fast_rx(str | @@ -4453,32 +4565,6 @@ static bool ieee80211_invoke_fast_rx(str | ||||||
|  	    pskb_trim(skb, skb->len - fast_rx->icv_len)) |  	    pskb_trim(skb, skb->len - fast_rx->icv_len)) | ||||||
|  		goto drop; |  		goto drop; | ||||||
|   |   | ||||||
| @@ -363,7 +363,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	if (rx->key && !ieee80211_has_protected(hdr->frame_control)) |  	if (rx->key && !ieee80211_has_protected(hdr->frame_control)) | ||||||
|  		goto drop; |  		goto drop; | ||||||
|   |   | ||||||
| @@ -4489,12 +4575,6 @@ static bool ieee80211_invoke_fast_rx(str | @@ -4490,12 +4576,6 @@ static bool ieee80211_invoke_fast_rx(str | ||||||
|  		return true; |  		return true; | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -376,7 +376,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	/* do the header conversion - first grab the addresses */ |  	/* do the header conversion - first grab the addresses */ | ||||||
|  	ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); |  	ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); | ||||||
|  	ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); |  	ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); | ||||||
| @@ -4503,62 +4583,14 @@ static bool ieee80211_invoke_fast_rx(str | @@ -4504,62 +4584,14 @@ static bool ieee80211_invoke_fast_rx(str | ||||||
|  	/* push the addresses in front */ |  	/* push the addresses in front */ | ||||||
|  	memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs)); |  	memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs)); | ||||||
|   |   | ||||||
| @@ -443,7 +443,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	stats->dropped++; |  	stats->dropped++; | ||||||
|  	return true; |  	return true; | ||||||
|  } |  } | ||||||
| @@ -4612,6 +4644,47 @@ static bool ieee80211_prepare_and_rx_han | @@ -4613,6 +4645,47 @@ static bool ieee80211_prepare_and_rx_han | ||||||
|  	return true; |  	return true; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -491,7 +491,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  /* |  /* | ||||||
|   * This is the actual Rx frames handler. as it belongs to Rx path it must |   * This is the actual Rx frames handler. as it belongs to Rx path it must | ||||||
|   * be called with rcu_read_lock protection. |   * be called with rcu_read_lock protection. | ||||||
| @@ -4849,15 +4922,20 @@ void ieee80211_rx_list(struct ieee80211_ | @@ -4850,15 +4923,20 @@ void ieee80211_rx_list(struct ieee80211_ | ||||||
|  	 * if it was previously present. |  	 * if it was previously present. | ||||||
|  	 * Also, frames with less than 16 bytes are dropped. |  	 * Also, frames with less than 16 bytes are dropped. | ||||||
|  	 */ |  	 */ | ||||||
|   | |||||||
| @@ -69,7 +69,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  			tx->sta = sta_info_get_bss(sdata, hdr->addr1); |  			tx->sta = sta_info_get_bss(sdata, hdr->addr1); | ||||||
|  		} |  		} | ||||||
|  		if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) |  		if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) | ||||||
| @@ -5443,6 +5441,7 @@ int ieee80211_tx_control_port(struct wip | @@ -5455,6 +5453,7 @@ int ieee80211_tx_control_port(struct wip | ||||||
|  { |  { | ||||||
|  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |  	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||||||
|  	struct ieee80211_local *local = sdata->local; |  	struct ieee80211_local *local = sdata->local; | ||||||
| @@ -77,7 +77,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  	struct sk_buff *skb; |  	struct sk_buff *skb; | ||||||
|  	struct ethhdr *ehdr; |  	struct ethhdr *ehdr; | ||||||
|  	u32 ctrl_flags = 0; |  	u32 ctrl_flags = 0; | ||||||
| @@ -5465,8 +5464,7 @@ int ieee80211_tx_control_port(struct wip | @@ -5477,8 +5476,7 @@ int ieee80211_tx_control_port(struct wip | ||||||
|  	if (cookie) |  	if (cookie) | ||||||
|  		ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; |  		ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; | ||||||
|   |   | ||||||
| @@ -87,7 +87,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|   |   | ||||||
|  	skb = dev_alloc_skb(local->hw.extra_tx_headroom + |  	skb = dev_alloc_skb(local->hw.extra_tx_headroom + | ||||||
|  			    sizeof(struct ethhdr) + len); |  			    sizeof(struct ethhdr) + len); | ||||||
| @@ -5483,10 +5481,25 @@ int ieee80211_tx_control_port(struct wip | @@ -5495,10 +5493,25 @@ int ieee80211_tx_control_port(struct wip | ||||||
|  	ehdr->h_proto = proto; |  	ehdr->h_proto = proto; | ||||||
|   |   | ||||||
|  	skb->dev = dev; |  	skb->dev = dev; | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  	spin_unlock_bh(&fq->lock); |  	spin_unlock_bh(&fq->lock); | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @@ -3866,6 +3875,9 @@ bool ieee80211_txq_airtime_check(struct | @@ -3878,6 +3887,9 @@ bool ieee80211_txq_airtime_check(struct | ||||||
|  	if (!txq->sta) |  	if (!txq->sta) | ||||||
|  		return true; |  		return true; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> | |||||||
|  |  | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -4193,6 +4193,9 @@ static bool ieee80211_tx_8023(struct iee | @@ -4205,6 +4205,9 @@ static bool ieee80211_tx_8023(struct iee | ||||||
|  	unsigned long flags; |  	unsigned long flags; | ||||||
|  	int q = info->hw_queue; |  	int q = info->hw_queue; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	.rate_init = minstrel_ht_rate_init, |  	.rate_init = minstrel_ht_rate_init, | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -3953,6 +3953,29 @@ void ieee80211_txq_schedule_start(struct | @@ -3965,6 +3965,29 @@ void ieee80211_txq_schedule_start(struct | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL(ieee80211_txq_schedule_start); |  EXPORT_SYMBOL(ieee80211_txq_schedule_start); | ||||||
|   |   | ||||||
| @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  void __ieee80211_subif_start_xmit(struct sk_buff *skb, |  void __ieee80211_subif_start_xmit(struct sk_buff *skb, | ||||||
|  				  struct net_device *dev, |  				  struct net_device *dev, | ||||||
|  				  u32 info_flags, |  				  u32 info_flags, | ||||||
| @@ -3983,6 +4006,8 @@ void __ieee80211_subif_start_xmit(struct | @@ -3995,6 +4018,8 @@ void __ieee80211_subif_start_xmit(struct | ||||||
|  		skb_get_hash(skb); |  		skb_get_hash(skb); | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
| @@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  	if (sta) { |  	if (sta) { | ||||||
|  		struct ieee80211_fast_tx *fast_tx; |  		struct ieee80211_fast_tx *fast_tx; | ||||||
|   |   | ||||||
| @@ -4246,6 +4271,8 @@ static void ieee80211_8023_xmit(struct i | @@ -4258,6 +4283,8 @@ static void ieee80211_8023_xmit(struct i | ||||||
|   |   | ||||||
|  	memset(info, 0, sizeof(*info)); |  	memset(info, 0, sizeof(*info)); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | |||||||
|  	CALL_TXH(ieee80211_tx_h_michael_mic_add); |  	CALL_TXH(ieee80211_tx_h_michael_mic_add); | ||||||
|  	CALL_TXH(ieee80211_tx_h_sequence); |  	CALL_TXH(ieee80211_tx_h_sequence); | ||||||
|  	CALL_TXH(ieee80211_tx_h_fragment); |  	CALL_TXH(ieee80211_tx_h_fragment); | ||||||
| @@ -3404,15 +3405,21 @@ out: | @@ -3416,15 +3417,21 @@ out: | ||||||
|   * Can be called while the sta lock is held. Anything that can cause packets to |   * Can be called while the sta lock is held. Anything that can cause packets to | ||||||
|   * be generated will cause deadlock! |   * be generated will cause deadlock! | ||||||
|   */ |   */ | ||||||
| @@ -55,7 +55,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | |||||||
|  	if (key) |  	if (key) | ||||||
|  		info->control.hw_key = &key->conf; |  		info->control.hw_key = &key->conf; | ||||||
|   |   | ||||||
| @@ -3461,6 +3468,8 @@ static void ieee80211_xmit_fast_finish(s | @@ -3473,6 +3480,8 @@ static void ieee80211_xmit_fast_finish(s | ||||||
|  			break; |  			break; | ||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
| @@ -64,7 +64,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, |  static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, | ||||||
| @@ -3564,24 +3573,17 @@ static bool ieee80211_xmit_fast(struct i | @@ -3576,24 +3585,17 @@ static bool ieee80211_xmit_fast(struct i | ||||||
|  	tx.sta = sta; |  	tx.sta = sta; | ||||||
|  	tx.key = fast_tx->key; |  	tx.key = fast_tx->key; | ||||||
|   |   | ||||||
| @@ -97,7 +97,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | |||||||
|   |   | ||||||
|  	if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |  	if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | ||||||
|  		sdata = container_of(sdata->bss, |  		sdata = container_of(sdata->bss, | ||||||
| @@ -3692,8 +3694,12 @@ begin: | @@ -3704,8 +3706,12 @@ begin: | ||||||
|  		    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) |  		    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) | ||||||
|  			pn_offs = ieee80211_hdrlen(hdr->frame_control); |  			pn_offs = ieee80211_hdrlen(hdr->frame_control); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -81,7 +81,7 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> | |||||||
|  			tx->sta->tx_stats.last_rate = txrc.reported_rate; |  			tx->sta->tx_stats.last_rate = txrc.reported_rate; | ||||||
|  	} else if (tx->sta) |  	} else if (tx->sta) | ||||||
|  		tx->sta->tx_stats.last_rate = txrc.reported_rate; |  		tx->sta->tx_stats.last_rate = txrc.reported_rate; | ||||||
| @@ -3682,8 +3684,16 @@ begin: | @@ -3694,8 +3696,16 @@ begin: | ||||||
|  	else |  	else | ||||||
|  		info->flags &= ~IEEE80211_TX_CTL_AMPDU; |  		info->flags &= ~IEEE80211_TX_CTL_AMPDU; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | |||||||
|  		if (tid_tx) { |  		if (tid_tx) { | ||||||
|  			bool queued; |  			bool queued; | ||||||
|   |   | ||||||
| @@ -3969,29 +3999,6 @@ void ieee80211_txq_schedule_start(struct | @@ -3981,29 +4011,6 @@ void ieee80211_txq_schedule_start(struct | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL(ieee80211_txq_schedule_start); |  EXPORT_SYMBOL(ieee80211_txq_schedule_start); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -90,7 +90,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  	 * don't cast (use the static inlines below), but we keep |  	 * don't cast (use the static inlines below), but we keep | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -3909,6 +3909,8 @@ void __ieee80211_schedule_txq(struct iee | @@ -3921,6 +3921,8 @@ void __ieee80211_schedule_txq(struct iee | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL(__ieee80211_schedule_txq); |  EXPORT_SYMBOL(__ieee80211_schedule_txq); | ||||||
|   |   | ||||||
| @@ -99,7 +99,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw, |  bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw, | ||||||
|  				 struct ieee80211_txq *txq) |  				 struct ieee80211_txq *txq) | ||||||
|  { |  { | ||||||
| @@ -3918,6 +3920,9 @@ bool ieee80211_txq_airtime_check(struct | @@ -3930,6 +3932,9 @@ bool ieee80211_txq_airtime_check(struct | ||||||
|  	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) |  	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) | ||||||
|  		return true; |  		return true; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -839,7 +839,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  } |  } | ||||||
|   |   | ||||||
|  void ieee80211_txq_set_params(struct ieee80211_local *local) |  void ieee80211_txq_set_params(struct ieee80211_local *local) | ||||||
| @@ -3819,102 +3818,259 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); | @@ -3831,102 +3830,259 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); | ||||||
|  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) |  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) | ||||||
|  { |  { | ||||||
|  	struct ieee80211_local *local = hw_to_local(hw); |  	struct ieee80211_local *local = hw_to_local(hw); | ||||||
| @@ -1161,7 +1161,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  	struct ieee80211_local *local = hw_to_local(hw); |  	struct ieee80211_local *local = hw_to_local(hw); | ||||||
|   |   | ||||||
|  	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) |  	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) | ||||||
| @@ -3929,15 +4085,12 @@ bool ieee80211_txq_airtime_check(struct | @@ -3941,15 +4097,12 @@ bool ieee80211_txq_airtime_check(struct | ||||||
|  	if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) |  	if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) | ||||||
|  		return true; |  		return true; | ||||||
|   |   | ||||||
| @@ -1179,7 +1179,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  		return true; |  		return true; | ||||||
|   |   | ||||||
|  	return false; |  	return false; | ||||||
| @@ -3947,60 +4100,59 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec | @@ -3959,60 +4112,59 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec | ||||||
|  bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw, |  bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw, | ||||||
|  				struct ieee80211_txq *txq) |  				struct ieee80211_txq *txq) | ||||||
|  { |  { | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  |  | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -3331,6 +3331,9 @@ static bool ieee80211_amsdu_aggregate(st | @@ -3335,6 +3335,9 @@ static bool ieee80211_amsdu_aggregate(st | ||||||
|  	if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) |  	if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) | ||||||
|  		return false; |  		return false; | ||||||
|   |   | ||||||
|   | |||||||
| @@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  }; |  }; | ||||||
|   |   | ||||||
|  /* |  /* | ||||||
| @@ -8094,4 +8120,70 @@ void cfg80211_update_owe_info_event(stru | @@ -8092,4 +8118,70 @@ void cfg80211_update_owe_info_event(stru | ||||||
|   */ |   */ | ||||||
|  void cfg80211_bss_flush(struct wiphy *wiphy); |  void cfg80211_bss_flush(struct wiphy *wiphy); | ||||||
|   |   | ||||||
|   | |||||||
| @@ -463,7 +463,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|   |   | ||||||
| --- a/net/mac80211/tx.c | --- a/net/mac80211/tx.c | ||||||
| +++ b/net/mac80211/tx.c | +++ b/net/mac80211/tx.c | ||||||
| @@ -4790,11 +4790,11 @@ static int ieee80211_beacon_add_tim(stru | @@ -4802,11 +4802,11 @@ static int ieee80211_beacon_add_tim(stru | ||||||
|  static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata, |  static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata, | ||||||
|  					struct beacon_data *beacon) |  					struct beacon_data *beacon) | ||||||
|  { |  { | ||||||
| @@ -477,7 +477,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|   |   | ||||||
|  	switch (sdata->vif.type) { |  	switch (sdata->vif.type) { | ||||||
|  	case NL80211_IFTYPE_AP: |  	case NL80211_IFTYPE_AP: | ||||||
| @@ -4814,21 +4814,27 @@ static void ieee80211_set_beacon_cntdwn( | @@ -4826,21 +4826,27 @@ static void ieee80211_set_beacon_cntdwn( | ||||||
|  	} |  	} | ||||||
|   |   | ||||||
|  	rcu_read_lock(); |  	rcu_read_lock(); | ||||||
| @@ -514,7 +514,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com> | |||||||
|  	} |  	} | ||||||
|  	rcu_read_unlock(); |  	rcu_read_unlock(); | ||||||
|  } |  } | ||||||
| @@ -5038,6 +5044,7 @@ __ieee80211_beacon_get(struct ieee80211_ | @@ -5050,6 +5056,7 @@ __ieee80211_beacon_get(struct ieee80211_ | ||||||
|  			if (offs) { |  			if (offs) { | ||||||
|  				offs->tim_offset = beacon->head_len; |  				offs->tim_offset = beacon->head_len; | ||||||
|  				offs->tim_length = skb->len - beacon->head_len; |  				offs->tim_length = skb->len - beacon->head_len; | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ and we should ignore this. | |||||||
|  |  | ||||||
| --- a/net/wireless/core.c | --- a/net/wireless/core.c | ||||||
| +++ b/net/wireless/core.c | +++ b/net/wireless/core.c | ||||||
| @@ -614,21 +614,6 @@ static int wiphy_verify_combinations(str | @@ -615,21 +615,6 @@ static int wiphy_verify_combinations(str | ||||||
|  				    c->limits[j].max > 1)) |  				    c->limits[j].max > 1)) | ||||||
|  				return -EINVAL; |  				return -EINVAL; | ||||||
|   |   | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Hauke Mehrtens
					Hauke Mehrtens