Skip to content

Commit

Permalink
Merge tag 'wireless-next-2022-08-26-v2' of git://git.kernel.org/pub/s…
Browse files Browse the repository at this point in the history
…cm/linux/kernel/git/wireless/wireless-next

Johannes berg says:

====================
Various updates:
 * rtw88: operation, locking, warning, and code style fixes
 * rtw89: small updates
 * cfg80211/mac80211: more EHT/MLO (802.11be, WiFi 7) work
 * brcmfmac: a couple of fixes
 * misc cleanups etc.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 26, 2022
2 parents 76d7df9 + 4ffb4d2 commit 643952f
Show file tree
Hide file tree
Showing 75 changed files with 1,851 additions and 696 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ properties:

reg: true

spi-max-frequency: true

interrupts:
maxItems: 1

Expand Down Expand Up @@ -51,7 +49,10 @@ required:
- compatible
- interrupts

additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
Expand Down
15 changes: 5 additions & 10 deletions Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ description: >
Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for more
information.
For SPI:
In add of the properties below, please consult
Documentation/devicetree/bindings/spi/spi-controller.yaml for optional SPI
related properties.
properties:
compatible:
items:
Expand All @@ -52,8 +46,6 @@ properties:
bindings.
maxItems: 1

spi-max-frequency: true

interrupts:
description: The interrupt line. Should be IRQ_TYPE_EDGE_RISING. When SPI is
used, this property is required. When SDIO is used, the "in-band"
Expand Down Expand Up @@ -84,12 +76,15 @@ properties:

mac-address: true

additionalProperties: false

required:
- compatible
- reg

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
Expand Down
32 changes: 16 additions & 16 deletions Documentation/devicetree/bindings/net/wireless/ti,wlcore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ properties:
This is required when connected via SPI, and optional when connected via
SDIO.

spi-max-frequency: true

interrupts:
minItems: 1
maxItems: 2
Expand Down Expand Up @@ -69,20 +67,22 @@ required:
- compatible
- interrupts

if:
properties:
compatible:
contains:
enum:
- ti,wl1271
- ti,wl1273
- ti,wl1281
- ti,wl1283
then:
required:
- ref-clock-frequency

additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if:
properties:
compatible:
contains:
enum:
- ti,wl1271
- ti,wl1273
- ti,wl1281
- ti,wl1283
then:
required:
- ref-clock-frequency

unevaluatedProperties: false

examples:
- |
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
}

static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_index, bool pairwise,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr,
struct key_params *params)
{
Expand Down Expand Up @@ -1249,7 +1249,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
}

static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_index, bool pairwise,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr)
{
struct ath6kl *ar = ath6kl_priv(ndev);
Expand Down Expand Up @@ -1279,7 +1279,7 @@ static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
}

static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_index, bool pairwise,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr, void *cookie,
void (*callback) (void *cookie,
struct key_params *))
Expand Down Expand Up @@ -1314,7 +1314,7 @@ static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
}

static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
struct net_device *ndev, int link_id,
u8 key_index, bool unicast,
bool multicast)
{
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/ath/wil6210/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ static void wil_del_rx_key(u8 key_index, enum wmi_key_usage key_usage,
}

static int wil_cfg80211_add_key(struct wiphy *wiphy,
struct net_device *ndev,
struct net_device *ndev, int link_id,
u8 key_index, bool pairwise,
const u8 *mac_addr,
struct key_params *params)
Expand Down Expand Up @@ -1696,7 +1696,7 @@ static int wil_cfg80211_add_key(struct wiphy *wiphy,
}

static int wil_cfg80211_del_key(struct wiphy *wiphy,
struct net_device *ndev,
struct net_device *ndev, int link_id,
u8 key_index, bool pairwise,
const u8 *mac_addr)
{
Expand All @@ -1723,7 +1723,7 @@ static int wil_cfg80211_del_key(struct wiphy *wiphy,

/* Need to be present or wiphy_new() will WARN */
static int wil_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
struct net_device *ndev, int link_id,
u8 key_index, bool unicast,
bool multicast)
{
Expand Down Expand Up @@ -2072,8 +2072,8 @@ void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
key_params.key = vif->gtk;
key_params.key_len = vif->gtk_len;
key_params.seq_len = IEEE80211_GCMP_PN_LEN;
rc = wil_cfg80211_add_key(wiphy, ndev, vif->gtk_index, false,
NULL, &key_params);
rc = wil_cfg80211_add_key(wiphy, ndev, -1, vif->gtk_index,
false, NULL, &key_params);
if (rc)
wil_err(wil, "vif %d recovery add key failed (%d)\n",
i, rc);
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp,

/* await txstatus signal for firmware if active */
if (brcmf_fws_fc_active(bcdc->fws)) {
if (!success)
brcmf_fws_bustxfail(bcdc->fws, txp);
brcmf_fws_bustxcomplete(bcdc->fws, txp, success);
} else {
if (brcmf_proto_bcdc_hdrpull(bus_if->drvr, false, txp, &ifp))
brcmu_pkt_buf_free_skb(txp);
Expand Down
23 changes: 14 additions & 9 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,8 @@ brcmf_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,

static s32
brcmf_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_idx, bool unicast, bool multicast)
int link_id, u8 key_idx, bool unicast,
bool multicast)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_pub *drvr = ifp->drvr;
Expand Down Expand Up @@ -2395,7 +2396,8 @@ brcmf_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *ndev,

static s32
brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_idx, bool pairwise, const u8 *mac_addr)
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_wsec_key *key;
Expand Down Expand Up @@ -2432,8 +2434,8 @@ brcmf_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,

static s32
brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
u8 key_idx, bool pairwise, const u8 *mac_addr,
struct key_params *params)
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr, struct key_params *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
Expand All @@ -2457,8 +2459,8 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
}

if (params->key_len == 0)
return brcmf_cfg80211_del_key(wiphy, ndev, key_idx, pairwise,
mac_addr);
return brcmf_cfg80211_del_key(wiphy, ndev, -1, key_idx,
pairwise, mac_addr);

if (params->key_len > sizeof(key->data)) {
bphy_err(drvr, "Too long key length (%u)\n", params->key_len);
Expand Down Expand Up @@ -2553,8 +2555,9 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
}

static s32
brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_idx,
bool pairwise, const u8 *mac_addr, void *cookie,
brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
int link_id, u8 key_idx, bool pairwise,
const u8 *mac_addr, void *cookie,
void (*callback)(void *cookie,
struct key_params *params))
{
Expand Down Expand Up @@ -2610,7 +2613,8 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_idx,

static s32
brcmf_cfg80211_config_default_mgmt_key(struct wiphy *wiphy,
struct net_device *ndev, u8 key_idx)
struct net_device *ndev, int link_id,
u8 key_idx)
{
struct brcmf_if *ifp = netdev_priv(ndev);

Expand Down Expand Up @@ -6431,6 +6435,7 @@ static void wl_deinit_priv(struct brcmf_cfg80211_info *cfg)
cfg->dongle_up = false; /* dongle down */
brcmf_abort_scanning(cfg);
brcmf_deinit_priv_mem(cfg);
brcmf_clear_assoc_ies(cfg);
}

static void init_vif_event(struct brcmf_cfg80211_vif_event *event)
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,8 +1480,10 @@ int brcmf_netdev_wait_pend8021x(struct brcmf_if *ifp)
!brcmf_get_pend_8021x_cnt(ifp),
MAX_WAIT_FOR_8021X_TX);

if (!err)
if (!err) {
bphy_err(drvr, "Timed out waiting for no pending 802.1x packets\n");
atomic_set(&ifp->pend_8021x_cnt, 0);
}

return !err;
}
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ void brcmf_flowring_configure_addr_mode(struct brcmf_flowring *flow, int ifidx,
flowid = flow->hash[i].flowid;
if (flow->rings[flowid]->status != RING_OPEN)
continue;
flow->rings[flowid]->status = RING_CLOSING;
brcmf_msgbuf_delete_flowring(drvr, flowid);
}
}
Expand Down Expand Up @@ -458,10 +457,8 @@ void brcmf_flowring_delete_peer(struct brcmf_flowring *flow, int ifidx,
if ((sta || (memcmp(hash[i].mac, peer, ETH_ALEN) == 0)) &&
(hash[i].ifidx == ifidx)) {
flowid = flow->hash[i].flowid;
if (flow->rings[flowid]->status == RING_OPEN) {
flow->rings[flowid]->status = RING_CLOSING;
if (flow->rings[flowid]->status == RING_OPEN)
brcmf_msgbuf_delete_flowring(drvr, flowid);
}
}
}

Expand Down
16 changes: 10 additions & 6 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2475,19 +2475,23 @@ bool brcmf_fws_fc_active(struct brcmf_fws_info *fws)
return fws->fcmode != BRCMF_FWS_FCMODE_NONE;
}

void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
void brcmf_fws_bustxcomplete(struct brcmf_fws_info *fws, struct sk_buff *skb,
bool success)
{
u32 hslot;

if (brcmf_skbcb(skb)->state == BRCMF_FWS_SKBSTATE_TIM) {
brcmu_pkt_buf_free_skb(skb);
return;
}
brcmf_fws_lock(fws);
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED, hslot, 0, 0,
1);
brcmf_fws_unlock(fws);

if (!success) {
brcmf_fws_lock(fws);
hslot = brcmf_skb_htod_tag_get_field(skb, HSLOT);
brcmf_fws_txs_process(fws, BRCMF_FWS_TXSTATUS_HOST_TOSSED, hslot,
0, 0, 1);
brcmf_fws_unlock(fws);
}
}

void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb);
void brcmf_fws_reset_interface(struct brcmf_if *ifp);
void brcmf_fws_add_interface(struct brcmf_if *ifp);
void brcmf_fws_del_interface(struct brcmf_if *ifp);
void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb);
void brcmf_fws_bustxcomplete(struct brcmf_fws_info *fws, struct sk_buff *skb,
bool success);
void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked);
void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *skb);

Expand Down
25 changes: 24 additions & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define BRCMF_MSGBUF_TRICKLE_TXWORKER_THRS 32
#define BRCMF_MSGBUF_UPDATE_RX_PTR_THRS 48

#define BRCMF_MAX_TXSTATUS_WAIT_RETRIES 10

struct msgbuf_common_hdr {
u8 msgtype;
Expand Down Expand Up @@ -806,8 +807,12 @@ static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx,
flowid = brcmf_flowring_lookup(flow, eh->h_dest, skb->priority, ifidx);
if (flowid == BRCMF_FLOWRING_INVALID_ID) {
flowid = brcmf_msgbuf_flowring_create(msgbuf, ifidx, skb);
if (flowid == BRCMF_FLOWRING_INVALID_ID)
if (flowid == BRCMF_FLOWRING_INVALID_ID) {
return -ENOMEM;
} else {
brcmf_flowring_enqueue(flow, flowid, skb);
return 0;
}
}
queue_count = brcmf_flowring_enqueue(flow, flowid, skb);
force = ((queue_count % BRCMF_MSGBUF_TRICKLE_TXWORKER_THRS) == 0);
Expand Down Expand Up @@ -1395,9 +1400,27 @@ void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid)
struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd;
struct msgbuf_tx_flowring_delete_req *delete;
struct brcmf_commonring *commonring;
struct brcmf_commonring *commonring_del = msgbuf->flowrings[flowid];
struct brcmf_flowring *flow = msgbuf->flow;
void *ret_ptr;
u8 ifidx;
int err;
int retry = BRCMF_MAX_TXSTATUS_WAIT_RETRIES;

/* make sure it is not in txflow */
brcmf_commonring_lock(commonring_del);
flow->rings[flowid]->status = RING_CLOSING;
brcmf_commonring_unlock(commonring_del);

/* wait for commonring txflow finished */
while (retry && atomic_read(&commonring_del->outstanding_tx)) {
usleep_range(5000, 10000);
retry--;
}
if (!retry) {
brcmf_err("timed out waiting for txstatus\n");
atomic_set(&commonring_del->outstanding_tx, 0);
}

/* no need to submit if firmware can not be reached */
if (drvr->bus_if->state != BRCMF_BUS_UP) {
Expand Down
Loading

0 comments on commit 643952f

Please sign in to comment.