Skip to content

Commit 0225191

Browse files
committed
Merge tag 'wireless-2023-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Johannes Berg says: ==================== * add (and fix) certificate for regdb handover to Chen-Yu Tsai * fix rfkill GPIO handling * a few driver (iwlwifi, mt76) crash fixes * logic fixes in the stack * tag 'wireless-2023-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211: fix certs build to not depend on file order wifi: mt76: fix crash with WED rx support enabled wifi: iwlwifi: pcie: avoid a NULL pointer dereference wifi: mac80211: mesh_plink: fix matches_local logic wifi: mac80211: mesh: check element parsing succeeded wifi: mac80211: check defragmentation succeeded wifi: mac80211: don't re-add debugfs during reconfig net: rfkill: gpio: set GPIO direction wifi: mac80211: check if the existing link config remains unchanged wifi: cfg80211: Add my certificate wifi: iwlwifi: pcie: add another missing bh-disable for rxq->lock wifi: ieee80211: don't require protected vendor action frames ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents e9b797d + 3c2a8eb commit 0225191

File tree

10 files changed

+125
-19
lines changed

10 files changed

+125
-19
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
13851385
* if it is true then one of the handlers took the page.
13861386
*/
13871387

1388-
if (reclaim) {
1388+
if (reclaim && txq) {
13891389
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
13901390
int index = SEQ_TO_INDEX(sequence);
13911391
int cmd_index = iwl_txq_get_cmd_index(txq, index);

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,7 @@ static u32 iwl_trans_pcie_dump_rbs(struct iwl_trans *trans,
31063106
struct iwl_rxq *rxq = &trans_pcie->rxq[0];
31073107
u32 i, r, j, rb_len = 0;
31083108

3109-
spin_lock(&rxq->lock);
3109+
spin_lock_bh(&rxq->lock);
31103110

31113111
r = iwl_get_closed_rb_stts(trans, rxq);
31123112

@@ -3130,7 +3130,7 @@ static u32 iwl_trans_pcie_dump_rbs(struct iwl_trans *trans,
31303130
*data = iwl_fw_error_next_data(*data);
31313131
}
31323132

3133-
spin_unlock(&rxq->lock);
3133+
spin_unlock_bh(&rxq->lock);
31343134

31353135
return rb_len;
31363136
}

drivers/net/wireless/mediatek/mt76/dma.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
783783

784784
static void
785785
mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data,
786-
int len, bool more, u32 info)
786+
int len, bool more, u32 info, bool allow_direct)
787787
{
788788
struct sk_buff *skb = q->rx_head;
789789
struct skb_shared_info *shinfo = skb_shinfo(skb);
@@ -795,7 +795,7 @@ mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data,
795795

796796
skb_add_rx_frag(skb, nr_frags, page, offset, len, q->buf_size);
797797
} else {
798-
mt76_put_page_pool_buf(data, true);
798+
mt76_put_page_pool_buf(data, allow_direct);
799799
}
800800

801801
if (more)
@@ -815,6 +815,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
815815
struct sk_buff *skb;
816816
unsigned char *data;
817817
bool check_ddone = false;
818+
bool allow_direct = !mt76_queue_is_wed_rx(q);
818819
bool more;
819820

820821
if (IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED) &&
@@ -855,7 +856,8 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
855856
}
856857

857858
if (q->rx_head) {
858-
mt76_add_fragment(dev, q, data, len, more, info);
859+
mt76_add_fragment(dev, q, data, len, more, info,
860+
allow_direct);
859861
continue;
860862
}
861863

@@ -884,7 +886,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
884886
continue;
885887

886888
free_frag:
887-
mt76_put_page_pool_buf(data, true);
889+
mt76_put_page_pool_buf(data, allow_direct);
888890
}
889891

890892
mt76_dma_rx_fill(dev, q, true);

include/linux/ieee80211.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4447,7 +4447,8 @@ ieee80211_is_protected_dual_of_public_action(struct sk_buff *skb)
44474447
action != WLAN_PUB_ACTION_LOC_TRACK_NOTI &&
44484448
action != WLAN_PUB_ACTION_FTM_REQUEST &&
44494449
action != WLAN_PUB_ACTION_FTM_RESPONSE &&
4450-
action != WLAN_PUB_ACTION_FILS_DISCOVERY;
4450+
action != WLAN_PUB_ACTION_FILS_DISCOVERY &&
4451+
action != WLAN_PUB_ACTION_VENDOR_SPECIFIC;
44514452
}
44524453

44534454
/**

net/mac80211/cfg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,10 +1788,10 @@ static int sta_link_apply_parameters(struct ieee80211_local *local,
17881788
lockdep_is_held(&local->hw.wiphy->mtx));
17891789

17901790
/*
1791-
* If there are no changes, then accept a link that doesn't exist,
1791+
* If there are no changes, then accept a link that exist,
17921792
* unless it's a new link.
17931793
*/
1794-
if (params->link_id < 0 && !new_link &&
1794+
if (params->link_id >= 0 && !new_link &&
17951795
!params->link_mac && !params->txpwr_set &&
17961796
!params->supported_rates_len &&
17971797
!params->ht_capa && !params->vht_capa &&

net/mac80211/driver-ops.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
33
* Copyright 2015 Intel Deutschland GmbH
4-
* Copyright (C) 2022 Intel Corporation
4+
* Copyright (C) 2022-2023 Intel Corporation
55
*/
66
#include <net/mac80211.h>
77
#include "ieee80211_i.h"
@@ -589,6 +589,10 @@ int drv_change_sta_links(struct ieee80211_local *local,
589589
if (ret)
590590
return ret;
591591

592+
/* during reconfig don't add it to debugfs again */
593+
if (local->in_reconfig)
594+
return 0;
595+
592596
for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) {
593597
link_sta = rcu_dereference_protected(info->link[link_id],
594598
lockdep_is_held(&local->hw.wiphy->mtx));

net/mac80211/mesh_plink.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,18 +1068,18 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,
10681068
case WLAN_SP_MESH_PEERING_OPEN:
10691069
if (!matches_local)
10701070
event = OPN_RJCT;
1071-
if (!mesh_plink_free_count(sdata) ||
1072-
(sta->mesh->plid && sta->mesh->plid != plid))
1071+
else if (!mesh_plink_free_count(sdata) ||
1072+
(sta->mesh->plid && sta->mesh->plid != plid))
10731073
event = OPN_IGNR;
10741074
else
10751075
event = OPN_ACPT;
10761076
break;
10771077
case WLAN_SP_MESH_PEERING_CONFIRM:
10781078
if (!matches_local)
10791079
event = CNF_RJCT;
1080-
if (!mesh_plink_free_count(sdata) ||
1081-
sta->mesh->llid != llid ||
1082-
(sta->mesh->plid && sta->mesh->plid != plid))
1080+
else if (!mesh_plink_free_count(sdata) ||
1081+
sta->mesh->llid != llid ||
1082+
(sta->mesh->plid && sta->mesh->plid != plid))
10831083
event = CNF_IGNR;
10841084
else
10851085
event = CNF_ACPT;
@@ -1247,6 +1247,8 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
12471247
return;
12481248
}
12491249
elems = ieee802_11_parse_elems(baseaddr, len - baselen, true, NULL);
1250-
mesh_process_plink_frame(sdata, mgmt, elems, rx_status);
1251-
kfree(elems);
1250+
if (elems) {
1251+
mesh_process_plink_frame(sdata, mgmt, elems, rx_status);
1252+
kfree(elems);
1253+
}
12521254
}

net/mac80211/mlme.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5782,7 +5782,7 @@ static void ieee80211_ml_reconfiguration(struct ieee80211_sub_if_data *sdata,
57825782
{
57835783
const struct ieee80211_multi_link_elem *ml;
57845784
const struct element *sub;
5785-
size_t ml_len;
5785+
ssize_t ml_len;
57865786
unsigned long removed_links = 0;
57875787
u16 link_removal_timeout[IEEE80211_MLD_MAX_NUM_LINKS] = {};
57885788
u8 link_id;
@@ -5798,6 +5798,8 @@ static void ieee80211_ml_reconfiguration(struct ieee80211_sub_if_data *sdata,
57985798
elems->scratch + elems->scratch_len -
57995799
elems->scratch_pos,
58005800
WLAN_EID_FRAGMENT);
5801+
if (ml_len < 0)
5802+
return;
58015803

58025804
elems->ml_reconf = (const void *)elems->scratch_pos;
58035805
elems->ml_reconf_len = ml_len;

net/rfkill/rfkill-gpio.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
126126
return -EINVAL;
127127
}
128128

129+
ret = gpiod_direction_output(rfkill->reset_gpio, true);
130+
if (ret)
131+
return ret;
132+
133+
ret = gpiod_direction_output(rfkill->shutdown_gpio, true);
134+
if (ret)
135+
return ret;
136+
129137
rfkill->rfkill_dev = rfkill_alloc(rfkill->name, &pdev->dev,
130138
rfkill->type, &rfkill_gpio_ops,
131139
rfkill);

net/wireless/certs/wens.hex

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/* Chen-Yu Tsai's regdb certificate */
2+
0x30, 0x82, 0x02, 0xa7, 0x30, 0x82, 0x01, 0x8f,
3+
0x02, 0x14, 0x61, 0xc0, 0x38, 0x65, 0x1a, 0xab,
4+
0xdc, 0xf9, 0x4b, 0xd0, 0xac, 0x7f, 0xf0, 0x6c,
5+
0x72, 0x48, 0xdb, 0x18, 0xc6, 0x00, 0x30, 0x0d,
6+
0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
7+
0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x0f, 0x31,
8+
0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03,
9+
0x0c, 0x04, 0x77, 0x65, 0x6e, 0x73, 0x30, 0x20,
10+
0x17, 0x0d, 0x32, 0x33, 0x31, 0x32, 0x30, 0x31,
11+
0x30, 0x37, 0x34, 0x31, 0x31, 0x34, 0x5a, 0x18,
12+
0x0f, 0x32, 0x31, 0x32, 0x33, 0x31, 0x31, 0x30,
13+
0x37, 0x30, 0x37, 0x34, 0x31, 0x31, 0x34, 0x5a,
14+
0x30, 0x0f, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03,
15+
0x55, 0x04, 0x03, 0x0c, 0x04, 0x77, 0x65, 0x6e,
16+
0x73, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06,
17+
0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
18+
0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f,
19+
0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01,
20+
0x01, 0x00, 0xa9, 0x7a, 0x2c, 0x78, 0x4d, 0xa7,
21+
0x19, 0x2d, 0x32, 0x52, 0xa0, 0x2e, 0x6c, 0xef,
22+
0x88, 0x7f, 0x15, 0xc5, 0xb6, 0x69, 0x54, 0x16,
23+
0x43, 0x14, 0x79, 0x53, 0xb7, 0xae, 0x88, 0xfe,
24+
0xc0, 0xb7, 0x5d, 0x47, 0x8e, 0x1a, 0xe1, 0xef,
25+
0xb3, 0x90, 0x86, 0xda, 0xd3, 0x64, 0x81, 0x1f,
26+
0xce, 0x5d, 0x9e, 0x4b, 0x6e, 0x58, 0x02, 0x3e,
27+
0xb2, 0x6f, 0x5e, 0x42, 0x47, 0x41, 0xf4, 0x2c,
28+
0xb8, 0xa8, 0xd4, 0xaa, 0xc0, 0x0e, 0xe6, 0x48,
29+
0xf0, 0xa8, 0xce, 0xcb, 0x08, 0xae, 0x37, 0xaf,
30+
0xf6, 0x40, 0x39, 0xcb, 0x55, 0x6f, 0x5b, 0x4f,
31+
0x85, 0x34, 0xe6, 0x69, 0x10, 0x50, 0x72, 0x5e,
32+
0x4e, 0x9d, 0x4c, 0xba, 0x38, 0x36, 0x0d, 0xce,
33+
0x73, 0x38, 0xd7, 0x27, 0x02, 0x2a, 0x79, 0x03,
34+
0xe1, 0xac, 0xcf, 0xb0, 0x27, 0x85, 0x86, 0x93,
35+
0x17, 0xab, 0xec, 0x42, 0x77, 0x37, 0x65, 0x8a,
36+
0x44, 0xcb, 0xd6, 0x42, 0x93, 0x92, 0x13, 0xe3,
37+
0x39, 0x45, 0xc5, 0x6e, 0x00, 0x4a, 0x7f, 0xcb,
38+
0x42, 0x17, 0x2b, 0x25, 0x8c, 0xb8, 0x17, 0x3b,
39+
0x15, 0x36, 0x59, 0xde, 0x42, 0xce, 0x21, 0xe6,
40+
0xb6, 0xc7, 0x6e, 0x5e, 0x26, 0x1f, 0xf7, 0x8a,
41+
0x57, 0x9e, 0xa5, 0x96, 0x72, 0xb7, 0x02, 0x32,
42+
0xeb, 0x07, 0x2b, 0x73, 0xe2, 0x4f, 0x66, 0x58,
43+
0x9a, 0xeb, 0x0f, 0x07, 0xb6, 0xab, 0x50, 0x8b,
44+
0xc3, 0x8f, 0x17, 0xfa, 0x0a, 0x99, 0xc2, 0x16,
45+
0x25, 0xbf, 0x2d, 0x6b, 0x1a, 0xaa, 0xe6, 0x3e,
46+
0x5f, 0xeb, 0x6d, 0x9b, 0x5d, 0x4d, 0x42, 0x83,
47+
0x2d, 0x39, 0xb8, 0xc9, 0xac, 0xdb, 0x3a, 0x91,
48+
0x50, 0xdf, 0xbb, 0xb1, 0x76, 0x6d, 0x15, 0x73,
49+
0xfd, 0xc6, 0xe6, 0x6b, 0x71, 0x9e, 0x67, 0x36,
50+
0x22, 0x83, 0x79, 0xb1, 0xd6, 0xb8, 0x84, 0x52,
51+
0xaf, 0x96, 0x5b, 0xc3, 0x63, 0x02, 0x4e, 0x78,
52+
0x70, 0x57, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30,
53+
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
54+
0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82,
55+
0x01, 0x01, 0x00, 0x24, 0x28, 0xee, 0x22, 0x74,
56+
0x7f, 0x7c, 0xfa, 0x6c, 0x1f, 0xb3, 0x18, 0xd1,
57+
0xc2, 0x3d, 0x7d, 0x29, 0x42, 0x88, 0xad, 0x82,
58+
0xa5, 0xb1, 0x8a, 0x05, 0xd0, 0xec, 0x5c, 0x91,
59+
0x20, 0xf6, 0x82, 0xfd, 0xd5, 0x67, 0x60, 0x5f,
60+
0x31, 0xf5, 0xbd, 0x88, 0x91, 0x70, 0xbd, 0xb8,
61+
0xb9, 0x8c, 0x88, 0xfe, 0x53, 0xc9, 0x54, 0x9b,
62+
0x43, 0xc4, 0x7a, 0x43, 0x74, 0x6b, 0xdd, 0xb0,
63+
0xb1, 0x3b, 0x33, 0x45, 0x46, 0x78, 0xa3, 0x1c,
64+
0xef, 0x54, 0x68, 0xf7, 0x85, 0x9c, 0xe4, 0x51,
65+
0x6f, 0x06, 0xaf, 0x81, 0xdb, 0x2a, 0x7b, 0x7b,
66+
0x6f, 0xa8, 0x9c, 0x67, 0xd8, 0xcb, 0xc9, 0x91,
67+
0x40, 0x00, 0xae, 0xd9, 0xa1, 0x9f, 0xdd, 0xa6,
68+
0x43, 0x0e, 0x28, 0x7b, 0xaa, 0x1b, 0xe9, 0x84,
69+
0xdb, 0x76, 0x64, 0x42, 0x70, 0xc9, 0xc0, 0xeb,
70+
0xae, 0x84, 0x11, 0x16, 0x68, 0x4e, 0x84, 0x9e,
71+
0x7e, 0x92, 0x36, 0xee, 0x1c, 0x3b, 0x08, 0x63,
72+
0xeb, 0x79, 0x84, 0x15, 0x08, 0x9d, 0xaf, 0xc8,
73+
0x9a, 0xc7, 0x34, 0xd3, 0x94, 0x4b, 0xd1, 0x28,
74+
0x97, 0xbe, 0xd1, 0x45, 0x75, 0xdc, 0x35, 0x62,
75+
0xac, 0x1d, 0x1f, 0xb7, 0xb7, 0x15, 0x87, 0xc8,
76+
0x98, 0xc0, 0x24, 0x31, 0x56, 0x8d, 0xed, 0xdb,
77+
0x06, 0xc6, 0x46, 0xbf, 0x4b, 0x6d, 0xa6, 0xd5,
78+
0xab, 0xcc, 0x60, 0xfc, 0xe5, 0x37, 0xb6, 0x53,
79+
0x7d, 0x58, 0x95, 0xa9, 0x56, 0xc7, 0xf7, 0xee,
80+
0xc3, 0xa0, 0x76, 0xf7, 0x65, 0x4d, 0x53, 0xfa,
81+
0xff, 0x5f, 0x76, 0x33, 0x5a, 0x08, 0xfa, 0x86,
82+
0x92, 0x5a, 0x13, 0xfa, 0x1a, 0xfc, 0xf2, 0x1b,
83+
0x8c, 0x7f, 0x42, 0x6d, 0xb7, 0x7e, 0xb7, 0xb4,
84+
0xf0, 0xc7, 0x83, 0xbb, 0xa2, 0x81, 0x03, 0x2d,
85+
0xd4, 0x2a, 0x63, 0x3f, 0xf7, 0x31, 0x2e, 0x40,
86+
0x33, 0x5c, 0x46, 0xbc, 0x9b, 0xc1, 0x05, 0xa5,
87+
0x45, 0x4e, 0xc3,

0 commit comments

Comments
 (0)