Skip to content

Commit dad32cf

Browse files
committed
Merge tag 'wireless-2022-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Kalle Valo says: ==================== wireless fixes for v5.18 First set of fixes for v5.18. Maintainers file updates, two compilation warning fixes, one revert for ath11k and smaller fixes to drivers and stack. All the usual stuff. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 3d25045 + fb4bccd commit dad32cf

9 files changed

Lines changed: 46 additions & 29 deletions

File tree

MAINTAINERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ F: include/net/ieee80211_radiotap.h
201201
F: include/net/iw_handler.h
202202
F: include/net/wext.h
203203
F: include/uapi/linux/nl80211.h
204+
F: include/uapi/linux/wireless.h
204205
F: net/wireless/
205206

206207
8169 10/100/1000 GIGABIT ETHERNET DRIVER
@@ -12401,7 +12402,7 @@ F: drivers/mmc/host/mtk-sd.c
1240112402

1240212403
MEDIATEK MT76 WIRELESS LAN DRIVER
1240312404
M: Felix Fietkau <nbd@nbd.name>
12404-
M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
12405+
M: Lorenzo Bianconi <lorenzo@kernel.org>
1240512406
M: Ryder Lee <ryder.lee@mediatek.com>
1240612407
R: Shayne Chen <shayne.chen@mediatek.com>
1240712408
R: Sean Wang <sean.wang@mediatek.com>
@@ -21231,10 +21232,8 @@ S: Maintained
2123121232
F: drivers/hid/hid-wiimote*
2123221233

2123321234
WILOCITY WIL6210 WIRELESS DRIVER
21234-
M: Maya Erez <merez@codeaurora.org>
2123521235
L: linux-wireless@vger.kernel.org
21236-
L: wil6210@qti.qualcomm.com
21237-
S: Supported
21236+
S: Orphan
2123821237
W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
2123921238
F: drivers/net/wireless/ath/wil6210/
2124021239

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,6 +3136,20 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
31363136
arvif->do_not_send_tmpl = true;
31373137
else
31383138
arvif->do_not_send_tmpl = false;
3139+
3140+
if (vif->bss_conf.he_support) {
3141+
ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
3142+
WMI_VDEV_PARAM_BA_MODE,
3143+
WMI_BA_MODE_BUFFER_SIZE_256);
3144+
if (ret)
3145+
ath11k_warn(ar->ab,
3146+
"failed to set BA BUFFER SIZE 256 for vdev: %d\n",
3147+
arvif->vdev_id);
3148+
else
3149+
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
3150+
"Set BA BUFFER SIZE 256 for VDEV: %d\n",
3151+
arvif->vdev_id);
3152+
}
31393153
}
31403154

31413155
if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) {
@@ -3171,14 +3185,6 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
31713185

31723186
if (arvif->is_up && vif->bss_conf.he_support &&
31733187
vif->bss_conf.he_oper.params) {
3174-
ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
3175-
WMI_VDEV_PARAM_BA_MODE,
3176-
WMI_BA_MODE_BUFFER_SIZE_256);
3177-
if (ret)
3178-
ath11k_warn(ar->ab,
3179-
"failed to set BA BUFFER SIZE 256 for vdev: %d\n",
3180-
arvif->vdev_id);
3181-
31823188
param_id = WMI_VDEV_PARAM_HEOPS_0_31;
31833189
param_value = vif->bss_conf.he_oper.params;
31843190
ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ static bool ath9k_txq_list_has_key(struct list_head *txq_list, u32 keyix)
839839
continue;
840840

841841
txinfo = IEEE80211_SKB_CB(bf->bf_mpdu);
842-
fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0];
842+
fi = (struct ath_frame_info *)&txinfo->status.status_driver_data[0];
843843
if (fi->keyix == keyix)
844844
return true;
845845
}

drivers/net/wireless/ath/ath9k/xmit.c

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
141141
{
142142
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
143143
BUILD_BUG_ON(sizeof(struct ath_frame_info) >
144-
sizeof(tx_info->rate_driver_data));
145-
return (struct ath_frame_info *) &tx_info->rate_driver_data[0];
144+
sizeof(tx_info->status.status_driver_data));
145+
return (struct ath_frame_info *) &tx_info->status.status_driver_data[0];
146146
}
147147

148148
static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
@@ -2542,6 +2542,16 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
25422542
spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
25432543
}
25442544

2545+
static void ath_clear_tx_status(struct ieee80211_tx_info *tx_info)
2546+
{
2547+
void *ptr = &tx_info->status;
2548+
2549+
memset(ptr + sizeof(tx_info->status.rates), 0,
2550+
sizeof(tx_info->status) -
2551+
sizeof(tx_info->status.rates) -
2552+
sizeof(tx_info->status.status_driver_data));
2553+
}
2554+
25452555
static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25462556
struct ath_tx_status *ts, int nframes, int nbad,
25472557
int txok)
@@ -2553,6 +2563,8 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25532563
struct ath_hw *ah = sc->sc_ah;
25542564
u8 i, tx_rateindex;
25552565

2566+
ath_clear_tx_status(tx_info);
2567+
25562568
if (txok)
25572569
tx_info->status.ack_signal = ts->ts_rssi;
25582570

@@ -2567,6 +2579,13 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25672579
tx_info->status.ampdu_len = nframes;
25682580
tx_info->status.ampdu_ack_len = nframes - nbad;
25692581

2582+
tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
2583+
2584+
for (i = tx_rateindex + 1; i < hw->max_rates; i++) {
2585+
tx_info->status.rates[i].count = 0;
2586+
tx_info->status.rates[i].idx = -1;
2587+
}
2588+
25702589
if ((ts->ts_status & ATH9K_TXERR_FILT) == 0 &&
25712590
(tx_info->flags & IEEE80211_TX_CTL_NO_ACK) == 0) {
25722591
/*
@@ -2588,16 +2607,6 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25882607
tx_info->status.rates[tx_rateindex].count =
25892608
hw->max_rate_tries;
25902609
}
2591-
2592-
for (i = tx_rateindex + 1; i < hw->max_rates; i++) {
2593-
tx_info->status.rates[i].count = 0;
2594-
tx_info->status.rates[i].idx = -1;
2595-
}
2596-
2597-
tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
2598-
2599-
/* we report airtime in ath_tx_count_airtime(), don't report twice */
2600-
tx_info->status.tx_time = 0;
26012610
}
26022611

26032612
static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype {
557557
BRCMF_SDIO_FT_SUB,
558558
};
559559

560-
#define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu))
560+
#define SDIOD_DRVSTR_KEY(chip, pmu) (((unsigned int)(chip) << 16) | (pmu))
561561

562562
/* SDIO Pad drive strength to select value mappings */
563563
struct sdiod_drive_str {

drivers/net/wireless/mediatek/mt76/mt76x2/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
8080
mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9);
8181

8282
/* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */
83-
mt76_rmw_field(dev, 0x15a0c, 0xf << 28, 0xf);
83+
mt76_rmw_field(dev, 0x15a0c, 0xfU << 28, 0xf);
8484

8585
/* RG_SSUSB_CDR_BR_PE1D = 0x3 */
8686
mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3);

net/mac80211/debugfs_sta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
441441
#define PRINT_HT_CAP(_cond, _str) \
442442
do { \
443443
if (_cond) \
444-
p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \
444+
p += scnprintf(p, bufsz + buf - p, "\t" _str "\n"); \
445445
} while (0)
446446
char *buf, *p;
447447
int i;

net/wireless/nl80211.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
528528
.len = IEEE80211_MAX_MESH_ID_LEN },
529529
[NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT,
530530

531-
[NL80211_ATTR_REG_ALPHA2] = { .type = NLA_STRING, .len = 2 },
531+
/* allow 3 for NUL-termination, we used to declare this NLA_STRING */
532+
[NL80211_ATTR_REG_ALPHA2] = NLA_POLICY_RANGE(NLA_BINARY, 2, 3),
532533
[NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED },
533534

534535
[NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 },

net/wireless/scan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,11 +2018,13 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
20182018
/* this is a nontransmitting bss, we need to add it to
20192019
* transmitting bss' list if it is not there
20202020
*/
2021+
spin_lock_bh(&rdev->bss_lock);
20212022
if (cfg80211_add_nontrans_list(non_tx_data->tx_bss,
20222023
&res->pub)) {
20232024
if (__cfg80211_unlink_bss(rdev, res))
20242025
rdev->bss_generation++;
20252026
}
2027+
spin_unlock_bh(&rdev->bss_lock);
20262028
}
20272029

20282030
trace_cfg80211_return_bss(&res->pub);

0 commit comments

Comments
 (0)