Skip to content

Commit 1a86605

Browse files
committed
Merge tag 'wireless-2023-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Johannes Berg says: ==================== Two fixes: - reorder buffer filter checks can cause bad shift/UBSAN warning with newer HW, avoid the check (mac80211) - add Kconfig dependency for iwlwifi for PTP clock usage * tag 'wireless-2023-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: limit reorder_buf_filtered to avoid UBSAN warning wifi: iwlwifi: mvm: add dependency for PTP clock ==================== Link: https://lore.kernel.org/r/20230822124206.43926-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 44f0fb8 + b98c161 commit 1a86605

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

drivers/net/wireless/intel/iwlwifi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ config IWLMVM
6666
tristate "Intel Wireless WiFi MVM Firmware support"
6767
select WANT_DEV_COREDUMP
6868
depends on MAC80211
69+
depends on PTP_1588_CLOCK_OPTIONAL
6970
help
7071
This is the driver that supports the MVM firmware. The list
7172
of the devices that use this firmware is available here:

include/net/mac80211.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6612,6 +6612,7 @@ void ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, u16 ba_rx_bitmap,
66126612
* marks frames marked in the bitmap as having been filtered. Afterwards, it
66136613
* checks if any frames in the window starting from @ssn can now be released
66146614
* (in case they were only waiting for frames that were filtered.)
6615+
* (Only work correctly if @max_rx_aggregation_subframes <= 64 frames)
66156616
*/
66166617
void ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *pubsta, u8 tid,
66176618
u16 ssn, u64 filtered,

net/mac80211/rx.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,8 @@ static inline bool ieee80211_rx_reorder_ready(struct tid_ampdu_rx *tid_agg_rx,
10831083
struct sk_buff *tail = skb_peek_tail(frames);
10841084
struct ieee80211_rx_status *status;
10851085

1086-
if (tid_agg_rx->reorder_buf_filtered & BIT_ULL(index))
1086+
if (tid_agg_rx->reorder_buf_filtered &&
1087+
tid_agg_rx->reorder_buf_filtered & BIT_ULL(index))
10871088
return true;
10881089

10891090
if (!tail)
@@ -1124,7 +1125,8 @@ static void ieee80211_release_reorder_frame(struct ieee80211_sub_if_data *sdata,
11241125
}
11251126

11261127
no_frame:
1127-
tid_agg_rx->reorder_buf_filtered &= ~BIT_ULL(index);
1128+
if (tid_agg_rx->reorder_buf_filtered)
1129+
tid_agg_rx->reorder_buf_filtered &= ~BIT_ULL(index);
11281130
tid_agg_rx->head_seq_num = ieee80211_sn_inc(tid_agg_rx->head_seq_num);
11291131
}
11301132

@@ -4264,6 +4266,7 @@ void ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *pubsta, u8 tid,
42644266
u16 ssn, u64 filtered,
42654267
u16 received_mpdus)
42664268
{
4269+
struct ieee80211_local *local;
42674270
struct sta_info *sta;
42684271
struct tid_ampdu_rx *tid_agg_rx;
42694272
struct sk_buff_head frames;
@@ -4281,6 +4284,11 @@ void ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *pubsta, u8 tid,
42814284

42824285
sta = container_of(pubsta, struct sta_info, sta);
42834286

4287+
local = sta->sdata->local;
4288+
WARN_ONCE(local->hw.max_rx_aggregation_subframes > 64,
4289+
"RX BA marker can't support max_rx_aggregation_subframes %u > 64\n",
4290+
local->hw.max_rx_aggregation_subframes);
4291+
42844292
if (!ieee80211_rx_data_set_sta(&rx, sta, -1))
42854293
return;
42864294

0 commit comments

Comments
 (0)