mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
Merge tag 'wireless-next-2022-08-26-v2' of git://git.kernel.org/pub/scm/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>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -2361,7 +2361,8 @@ done:
|
||||
|
||||
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;
|
||||
@@ -2395,7 +2396,8 @@ done:
|
||||
|
||||
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;
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
@@ -2553,8 +2555,9 @@ done:
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
@@ -2610,7 +2613,8 @@ done:
|
||||
|
||||
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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2475,7 +2475,8 @@ 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;
|
||||
|
||||
@@ -2483,11 +2484,14 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
|
||||
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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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) {
|
||||
|
||||
@@ -158,12 +158,12 @@ static int brcmf_pno_set_random(struct brcmf_if *ifp, struct brcmf_pno_info *pi)
|
||||
struct brcmf_pno_macaddr_le pfn_mac;
|
||||
u8 *mac_addr = NULL;
|
||||
u8 *mac_mask = NULL;
|
||||
int err, i;
|
||||
int err, i, ri;
|
||||
|
||||
for (i = 0; i < pi->n_reqs; i++)
|
||||
if (pi->reqs[i]->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
||||
mac_addr = pi->reqs[i]->mac_addr;
|
||||
mac_mask = pi->reqs[i]->mac_addr_mask;
|
||||
for (ri = 0; ri < pi->n_reqs; ri++)
|
||||
if (pi->reqs[ri]->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
||||
mac_addr = pi->reqs[ri]->mac_addr;
|
||||
mac_mask = pi->reqs[ri]->mac_addr_mask;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ static int brcmf_pno_set_random(struct brcmf_if *ifp, struct brcmf_pno_info *pi)
|
||||
pfn_mac.mac[0] |= 0x02;
|
||||
|
||||
brcmf_dbg(SCAN, "enabling random mac: reqid=%llu mac=%pM\n",
|
||||
pi->reqs[i]->reqid, pfn_mac.mac);
|
||||
pi->reqs[ri]->reqid, pfn_mac.mac);
|
||||
err = brcmf_fil_iovar_data_set(ifp, "pfn_macaddr", &pfn_mac,
|
||||
sizeof(pfn_mac));
|
||||
if (err)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
*/
|
||||
|
||||
/********************************************************************
|
||||
* Phy/Core Configuration. Defines macros to to check core phy/rev *
|
||||
* Phy/Core Configuration. Defines macros to check core phy/rev *
|
||||
* compile-time configuration. Defines default core support. *
|
||||
* ******************************************************************
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user