Skip to content

Commit 22f3397

Browse files
committed
Merge tag 'wireless-drivers-next-2020-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for v5.7 Third set of patches for v5.7. Nothing really special this time, business as usual. When pulling this to net-next there's again a conflict in: drivers/net/wireless/intel/iwlwifi/pcie/drv.c To solve this drop these three lines from the conflict (the first hunk from "HEAD") as the whole AX200 block was moved above in the same file: IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name), IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name), IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), And keep all the __IWL_DEV_INFO() entries (the second hunk). In other words, take everything from wireless-drivers-next. When running 'git diff' after the resolution the output should be empty. Major changes: brcmfmac * add USB autosuspend support ath11k * handle RX fragments * enable PN offload * add support for HE BSS color iwlwifi * support new FW API version * support for EDCA measurements * new scan API features * enable new firmware debugging code ==================== Kalle gave me directions on how to resolve the iwlwifi conflict as follows: ==================== When pulling this to net-next there's again a conflict in: drivers/net/wireless/intel/iwlwifi/pcie/drv.c To solve this drop these three lines from the conflict (the first hunk from "HEAD") as the whole AX200 block was moved above in the same file: IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name), IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name), IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), And keep all the __IWL_DEV_INFO() entries (the second hunk). In other words, take everything from wireless-drivers-next. When running 'git diff' after the resolution the output should be empty. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 0b992b8 + 5988b8e commit 22f3397

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3354
-1215
lines changed

drivers/net/wireless/ath/ath10k/core.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ struct ath10k_skb_cb {
119119
u16 airtime_est;
120120
struct ieee80211_vif *vif;
121121
struct ieee80211_txq *txq;
122+
u32 ucast_cipher;
122123
} __packed;
123124

124125
struct ath10k_skb_rxcb {
@@ -504,6 +505,7 @@ struct ath10k_sta {
504505
struct work_struct update_wk;
505506
u64 rx_duration;
506507
struct ath10k_htt_tx_stats *tx_stats;
508+
u32 ucast_cipher;
507509

508510
#ifdef CONFIG_MAC80211_DEBUGFS
509511
/* protected by conf_mutex */

drivers/net/wireless/ath/ath10k/htt_tx.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
11631163
int len = 0;
11641164
int msdu_id = -1;
11651165
int res;
1166+
const u8 *peer_addr;
11661167
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
11671168

11681169
len += sizeof(cmd->hdr);
@@ -1178,7 +1179,16 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
11781179
ieee80211_is_deauth(hdr->frame_control) ||
11791180
ieee80211_is_disassoc(hdr->frame_control)) &&
11801181
ieee80211_has_protected(hdr->frame_control)) {
1181-
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
1182+
peer_addr = hdr->addr1;
1183+
if (is_multicast_ether_addr(peer_addr)) {
1184+
skb_put(msdu, sizeof(struct ieee80211_mmie_16));
1185+
} else {
1186+
if (skb_cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP ||
1187+
skb_cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP_256)
1188+
skb_put(msdu, IEEE80211_GCMP_MIC_LEN);
1189+
else
1190+
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
1191+
}
11821192
}
11831193

11841194
txdesc = ath10k_htc_alloc_skb(ar, len);

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

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ static int ath10k_send_key(struct ath10k_vif *arvif,
258258
case WLAN_CIPHER_SUITE_GCMP:
259259
case WLAN_CIPHER_SUITE_GCMP_256:
260260
arg.key_cipher = ar->wmi_key_cipher[WMI_CIPHER_AES_GCM];
261+
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV_MGMT;
261262
break;
262263
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
263264
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
@@ -3576,13 +3577,15 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
35763577
static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
35773578
struct ieee80211_vif *vif,
35783579
struct ieee80211_txq *txq,
3580+
struct ieee80211_sta *sta,
35793581
struct sk_buff *skb, u16 airtime)
35803582
{
35813583
struct ieee80211_hdr *hdr = (void *)skb->data;
35823584
struct ath10k_skb_cb *cb = ATH10K_SKB_CB(skb);
35833585
const struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
35843586
bool is_data = ieee80211_is_data(hdr->frame_control) ||
35853587
ieee80211_is_data_qos(hdr->frame_control);
3588+
struct ath10k_sta *arsta;
35863589

35873590
cb->flags = 0;
35883591
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
@@ -3607,6 +3610,12 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
36073610
cb->vif = vif;
36083611
cb->txq = txq;
36093612
cb->airtime_est = airtime;
3613+
if (sta) {
3614+
arsta = (struct ath10k_sta *)sta->drv_priv;
3615+
spin_lock_bh(&ar->data_lock);
3616+
cb->ucast_cipher = arsta->ucast_cipher;
3617+
spin_unlock_bh(&ar->data_lock);
3618+
}
36103619
}
36113620

36123621
bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
@@ -4078,7 +4087,7 @@ int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,
40784087
}
40794088

40804089
airtime = ath10k_mac_update_airtime(ar, txq, skb);
4081-
ath10k_mac_tx_h_fill_cb(ar, vif, txq, skb, airtime);
4090+
ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);
40824091

40834092
skb_len = skb->len;
40844093
txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
@@ -4348,7 +4357,7 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
43484357
u16 airtime;
43494358

43504359
airtime = ath10k_mac_update_airtime(ar, txq, skb);
4351-
ath10k_mac_tx_h_fill_cb(ar, vif, txq, skb, airtime);
4360+
ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);
43524361

43534362
txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
43544363
txpath = ath10k_mac_tx_h_get_txpath(ar, skb, txmode);
@@ -6197,6 +6206,7 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
61976206
{
61986207
struct ath10k *ar = hw->priv;
61996208
struct ath10k_vif *arvif = (void *)vif->drv_priv;
6209+
struct ath10k_sta *arsta;
62006210
struct ath10k_peer *peer;
62016211
const u8 *peer_addr;
62026212
bool is_wep = key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
@@ -6221,12 +6231,17 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
62216231

62226232
mutex_lock(&ar->conf_mutex);
62236233

6224-
if (sta)
6234+
if (sta) {
6235+
arsta = (struct ath10k_sta *)sta->drv_priv;
62256236
peer_addr = sta->addr;
6226-
else if (arvif->vdev_type == WMI_VDEV_TYPE_STA)
6237+
spin_lock_bh(&ar->data_lock);
6238+
arsta->ucast_cipher = key->cipher;
6239+
spin_unlock_bh(&ar->data_lock);
6240+
} else if (arvif->vdev_type == WMI_VDEV_TYPE_STA) {
62276241
peer_addr = vif->bss_conf.bssid;
6228-
else
6242+
} else {
62296243
peer_addr = vif->addr;
6244+
}
62306245

62316246
key->hw_key_idx = key->keyidx;
62326247

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,6 +1926,7 @@ ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)
19261926
u32 vdev_id;
19271927
u32 buf_len = msdu->len;
19281928
u16 fc;
1929+
const u8 *peer_addr;
19291930

19301931
hdr = (struct ieee80211_hdr *)msdu->data;
19311932
fc = le16_to_cpu(hdr->frame_control);
@@ -1946,8 +1947,20 @@ ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)
19461947
ieee80211_is_deauth(hdr->frame_control) ||
19471948
ieee80211_is_disassoc(hdr->frame_control)) &&
19481949
ieee80211_has_protected(hdr->frame_control)) {
1949-
len += IEEE80211_CCMP_MIC_LEN;
1950-
buf_len += IEEE80211_CCMP_MIC_LEN;
1950+
peer_addr = hdr->addr1;
1951+
if (is_multicast_ether_addr(peer_addr)) {
1952+
len += sizeof(struct ieee80211_mmie_16);
1953+
buf_len += sizeof(struct ieee80211_mmie_16);
1954+
} else {
1955+
if (cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP ||
1956+
cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP_256) {
1957+
len += IEEE80211_GCMP_MIC_LEN;
1958+
buf_len += IEEE80211_GCMP_MIC_LEN;
1959+
} else {
1960+
len += IEEE80211_CCMP_MIC_LEN;
1961+
buf_len += IEEE80211_CCMP_MIC_LEN;
1962+
}
1963+
}
19511964
}
19521965

19531966
len = round_up(len, 4);

drivers/net/wireless/ath/ath11k/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ config ATH11K
33
tristate "Qualcomm Technologies 802.11ax chipset support"
44
depends on MAC80211 && HAS_DMA
55
depends on REMOTEPROC
6+
depends on CRYPTO_MICHAEL_MIC
67
depends on ARCH_QCOM || COMPILE_TEST
78
select ATH_COMMON
89
select QCOM_QMI_HELPERS

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ static void ath11k_ahb_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp)
458458

459459
static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
460460
{
461-
struct sk_buff *skb;
462461
int i;
463462

464463
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
@@ -468,9 +467,6 @@ static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
468467

469468
napi_synchronize(&irq_grp->napi);
470469
napi_disable(&irq_grp->napi);
471-
472-
while ((skb = __skb_dequeue(&irq_grp->pending_q)))
473-
dev_kfree_skb_any(skb);
474470
}
475471
}
476472

@@ -681,6 +677,9 @@ static irqreturn_t ath11k_ahb_ce_interrupt_handler(int irq, void *arg)
681677
{
682678
struct ath11k_ce_pipe *ce_pipe = arg;
683679

680+
/* last interrupt received for this CE */
681+
ce_pipe->timestamp = jiffies;
682+
684683
ath11k_ahb_ce_irq_disable(ce_pipe->ab, ce_pipe->pipe_num);
685684

686685
tasklet_schedule(&ce_pipe->intr_tq);
@@ -712,6 +711,9 @@ static irqreturn_t ath11k_ahb_ext_interrupt_handler(int irq, void *arg)
712711
{
713712
struct ath11k_ext_irq_grp *irq_grp = arg;
714713

714+
/* last interrupt received for this group */
715+
irq_grp->timestamp = jiffies;
716+
715717
ath11k_ahb_ext_grp_disable(irq_grp);
716718

717719
napi_schedule(&irq_grp->napi);
@@ -734,7 +736,6 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *ab)
734736
init_dummy_netdev(&irq_grp->napi_ndev);
735737
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
736738
ath11k_ahb_ext_grp_napi_poll, NAPI_POLL_WEIGHT);
737-
__skb_queue_head_init(&irq_grp->pending_q);
738739

739740
for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) {
740741
if (ath11k_tx_ring_mask[i] & BIT(j)) {

drivers/net/wireless/ath/ath11k/ce.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ struct ath11k_ce_pipe {
161161
struct ath11k_ce_ring *src_ring;
162162
struct ath11k_ce_ring *dest_ring;
163163
struct ath11k_ce_ring *status_ring;
164+
u64 timestamp;
164165
};
165166

166167
struct ath11k_ce {

drivers/net/wireless/ath/ath11k/core.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ struct ath11k_skb_rxcb {
7777
u8 err_code;
7878
u8 mac_id;
7979
u8 unmapped;
80+
u8 is_frag;
81+
u8 tid;
8082
};
8183

8284
enum ath11k_hw_rev {
@@ -109,12 +111,9 @@ struct ath11k_ext_irq_grp {
109111
u32 irqs[ATH11K_EXT_IRQ_NUM_MAX];
110112
u32 num_irq;
111113
u32 grp_id;
114+
u64 timestamp;
112115
struct napi_struct napi;
113116
struct net_device napi_ndev;
114-
/* Queue of pending packets, not expected to be accessed concurrently
115-
* to avoid locking overhead.
116-
*/
117-
struct sk_buff_head pending_q;
118117
};
119118

120119
#define HEHANDLE_CAP_PHYINFO_SIZE 3
@@ -332,6 +331,7 @@ struct ath11k_sta {
332331
u32 bw;
333332
u32 nss;
334333
u32 smps;
334+
enum hal_pn_type pn_type;
335335

336336
struct work_struct update_wk;
337337
struct rate_info txrate;

drivers/net/wireless/ath/ath11k/debug.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ enum ath11k_dbg_htt_ext_stats_type {
5353
ATH11K_DBG_HTT_EXT_STATS_TWT_SESSIONS = 20,
5454
ATH11K_DBG_HTT_EXT_STATS_REO_RESOURCE_STATS = 21,
5555
ATH11K_DBG_HTT_EXT_STATS_TX_SOUNDING_INFO = 22,
56+
ATH11K_DBG_HTT_EXT_STATS_PDEV_OBSS_PD_STATS = 23,
57+
ATH11K_DBG_HTT_EXT_STATS_RING_BACKPRESSURE_STATS = 24,
5658

5759
/* keep this last */
5860
ATH11K_DBG_HTT_NUM_EXT_STATS,

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3854,6 +3854,47 @@ htt_print_pdev_obss_pd_stats_tlv_v(const void *tag_buf,
38543854
stats_req->buf_len = len;
38553855
}
38563856

3857+
static inline void htt_print_backpressure_stats_tlv_v(const u32 *tag_buf,
3858+
u8 *data)
3859+
{
3860+
struct debug_htt_stats_req *stats_req =
3861+
(struct debug_htt_stats_req *)data;
3862+
struct htt_ring_backpressure_stats_tlv *htt_stats_buf =
3863+
(struct htt_ring_backpressure_stats_tlv *)tag_buf;
3864+
int i;
3865+
u8 *buf = stats_req->buf;
3866+
u32 len = stats_req->buf_len;
3867+
u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
3868+
3869+
len += HTT_DBG_OUT(buf + len, buf_len - len, "pdev_id = %u",
3870+
htt_stats_buf->pdev_id);
3871+
len += HTT_DBG_OUT(buf + len, buf_len - len, "current_head_idx = %u",
3872+
htt_stats_buf->current_head_idx);
3873+
len += HTT_DBG_OUT(buf + len, buf_len - len, "current_tail_idx = %u",
3874+
htt_stats_buf->current_tail_idx);
3875+
len += HTT_DBG_OUT(buf + len, buf_len - len, "num_htt_msgs_sent = %u",
3876+
htt_stats_buf->num_htt_msgs_sent);
3877+
len += HTT_DBG_OUT(buf + len, buf_len - len,
3878+
"backpressure_time_ms = %u",
3879+
htt_stats_buf->backpressure_time_ms);
3880+
3881+
for (i = 0; i < 5; i++)
3882+
len += HTT_DBG_OUT(buf + len, buf_len - len,
3883+
"backpressure_hist_%u = %u",
3884+
i + 1, htt_stats_buf->backpressure_hist[i]);
3885+
3886+
len += HTT_DBG_OUT(buf + len, buf_len - len,
3887+
"============================");
3888+
3889+
if (len >= buf_len) {
3890+
buf[buf_len - 1] = 0;
3891+
stats_req->buf_len = buf_len - 1;
3892+
} else {
3893+
buf[len] = 0;
3894+
stats_req->buf_len = len;
3895+
}
3896+
}
3897+
38573898
static inline void htt_htt_stats_debug_dump(const u32 *tag_buf,
38583899
struct debug_htt_stats_req *stats_req)
38593900
{
@@ -4246,6 +4287,9 @@ static int ath11k_dbg_htt_ext_stats_parse(struct ath11k_base *ab,
42464287
case HTT_STATS_PDEV_OBSS_PD_TAG:
42474288
htt_print_pdev_obss_pd_stats_tlv_v(tag_buf, stats_req);
42484289
break;
4290+
case HTT_STATS_RING_BACKPRESSURE_STATS_TAG:
4291+
htt_print_backpressure_stats_tlv_v(tag_buf, user_data);
4292+
break;
42494293
default:
42504294
break;
42514295
}

drivers/net/wireless/ath/ath11k/debug_htt_stats.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ enum htt_tlv_tag_t {
100100
HTT_STATS_SCHED_TXQ_SCHED_ORDER_SU_TAG = 86,
101101
HTT_STATS_SCHED_TXQ_SCHED_INELIGIBILITY_TAG = 87,
102102
HTT_STATS_PDEV_OBSS_PD_TAG = 88,
103+
HTT_STATS_HW_WAR_TAG = 89,
104+
HTT_STATS_RING_BACKPRESSURE_STATS_TAG = 90,
103105

104106
HTT_STATS_MAX_TAG,
105107
};
@@ -1659,4 +1661,30 @@ struct htt_pdev_obss_pd_stats_tlv {
16591661
};
16601662

16611663
void ath11k_debug_htt_stats_init(struct ath11k *ar);
1664+
1665+
struct htt_ring_backpressure_stats_tlv {
1666+
u32 pdev_id;
1667+
u32 current_head_idx;
1668+
u32 current_tail_idx;
1669+
u32 num_htt_msgs_sent;
1670+
/* Time in milliseconds for which the ring has been in
1671+
* its current backpressure condition
1672+
*/
1673+
u32 backpressure_time_ms;
1674+
/* backpressure_hist - histogram showing how many times
1675+
* different degrees of backpressure duration occurred:
1676+
* Index 0 indicates the number of times ring was
1677+
* continuously in backpressure state for 100 - 200ms.
1678+
* Index 1 indicates the number of times ring was
1679+
* continuously in backpressure state for 200 - 300ms.
1680+
* Index 2 indicates the number of times ring was
1681+
* continuously in backpressure state for 300 - 400ms.
1682+
* Index 3 indicates the number of times ring was
1683+
* continuously in backpressure state for 400 - 500ms.
1684+
* Index 4 indicates the number of times ring was
1685+
* continuously in backpressure state beyond 500ms.
1686+
*/
1687+
u32 backpressure_hist[5];
1688+
};
1689+
16621690
#endif

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ static ssize_t ath11k_dbg_sta_dump_tx_stats(struct file *file,
219219
const int size = 2 * 4096;
220220
char *buf;
221221

222+
if (!arsta->tx_stats)
223+
return -ENOENT;
224+
222225
buf = kzalloc(size, GFP_KERNEL);
223226
if (!buf)
224227
return -ENOMEM;

0 commit comments

Comments
 (0)