Skip to content

Commit

Permalink
Merge tag 'wireless-drivers-next-2020-03-27' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…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 <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 27, 2020
2 parents 0b992b8 + 5988b8e commit 22f3397
Show file tree
Hide file tree
Showing 73 changed files with 3,354 additions and 1,215 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/ath/ath10k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ struct ath10k_skb_cb {
u16 airtime_est;
struct ieee80211_vif *vif;
struct ieee80211_txq *txq;
u32 ucast_cipher;
} __packed;

struct ath10k_skb_rxcb {
Expand Down Expand Up @@ -504,6 +505,7 @@ struct ath10k_sta {
struct work_struct update_wk;
u64 rx_duration;
struct ath10k_htt_tx_stats *tx_stats;
u32 ucast_cipher;

#ifdef CONFIG_MAC80211_DEBUGFS
/* protected by conf_mutex */
Expand Down
12 changes: 11 additions & 1 deletion drivers/net/wireless/ath/ath10k/htt_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,7 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
int len = 0;
int msdu_id = -1;
int res;
const u8 *peer_addr;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;

len += sizeof(cmd->hdr);
Expand All @@ -1178,7 +1179,16 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
ieee80211_is_deauth(hdr->frame_control) ||
ieee80211_is_disassoc(hdr->frame_control)) &&
ieee80211_has_protected(hdr->frame_control)) {
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
peer_addr = hdr->addr1;
if (is_multicast_ether_addr(peer_addr)) {
skb_put(msdu, sizeof(struct ieee80211_mmie_16));
} else {
if (skb_cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP ||
skb_cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP_256)
skb_put(msdu, IEEE80211_GCMP_MIC_LEN);
else
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
}
}

txdesc = ath10k_htc_alloc_skb(ar, len);
Expand Down
25 changes: 20 additions & 5 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ static int ath10k_send_key(struct ath10k_vif *arvif,
case WLAN_CIPHER_SUITE_GCMP:
case WLAN_CIPHER_SUITE_GCMP_256:
arg.key_cipher = ar->wmi_key_cipher[WMI_CIPHER_AES_GCM];
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV_MGMT;
break;
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
Expand Down Expand Up @@ -3576,13 +3577,15 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar,
static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
struct ieee80211_vif *vif,
struct ieee80211_txq *txq,
struct ieee80211_sta *sta,
struct sk_buff *skb, u16 airtime)
{
struct ieee80211_hdr *hdr = (void *)skb->data;
struct ath10k_skb_cb *cb = ATH10K_SKB_CB(skb);
const struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
bool is_data = ieee80211_is_data(hdr->frame_control) ||
ieee80211_is_data_qos(hdr->frame_control);
struct ath10k_sta *arsta;

cb->flags = 0;
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
Expand All @@ -3607,6 +3610,12 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
cb->vif = vif;
cb->txq = txq;
cb->airtime_est = airtime;
if (sta) {
arsta = (struct ath10k_sta *)sta->drv_priv;
spin_lock_bh(&ar->data_lock);
cb->ucast_cipher = arsta->ucast_cipher;
spin_unlock_bh(&ar->data_lock);
}
}

bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
Expand Down Expand Up @@ -4078,7 +4087,7 @@ int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,
}

airtime = ath10k_mac_update_airtime(ar, txq, skb);
ath10k_mac_tx_h_fill_cb(ar, vif, txq, skb, airtime);
ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);

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

airtime = ath10k_mac_update_airtime(ar, txq, skb);
ath10k_mac_tx_h_fill_cb(ar, vif, txq, skb, airtime);
ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);

txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
txpath = ath10k_mac_tx_h_get_txpath(ar, skb, txmode);
Expand Down Expand Up @@ -6197,6 +6206,7 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
{
struct ath10k *ar = hw->priv;
struct ath10k_vif *arvif = (void *)vif->drv_priv;
struct ath10k_sta *arsta;
struct ath10k_peer *peer;
const u8 *peer_addr;
bool is_wep = key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
Expand All @@ -6221,12 +6231,17 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,

mutex_lock(&ar->conf_mutex);

if (sta)
if (sta) {
arsta = (struct ath10k_sta *)sta->drv_priv;
peer_addr = sta->addr;
else if (arvif->vdev_type == WMI_VDEV_TYPE_STA)
spin_lock_bh(&ar->data_lock);
arsta->ucast_cipher = key->cipher;
spin_unlock_bh(&ar->data_lock);
} else if (arvif->vdev_type == WMI_VDEV_TYPE_STA) {
peer_addr = vif->bss_conf.bssid;
else
} else {
peer_addr = vif->addr;
}

key->hw_key_idx = key->keyidx;

Expand Down
17 changes: 15 additions & 2 deletions drivers/net/wireless/ath/ath10k/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,7 @@ ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)
u32 vdev_id;
u32 buf_len = msdu->len;
u16 fc;
const u8 *peer_addr;

hdr = (struct ieee80211_hdr *)msdu->data;
fc = le16_to_cpu(hdr->frame_control);
Expand All @@ -1946,8 +1947,20 @@ ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)
ieee80211_is_deauth(hdr->frame_control) ||
ieee80211_is_disassoc(hdr->frame_control)) &&
ieee80211_has_protected(hdr->frame_control)) {
len += IEEE80211_CCMP_MIC_LEN;
buf_len += IEEE80211_CCMP_MIC_LEN;
peer_addr = hdr->addr1;
if (is_multicast_ether_addr(peer_addr)) {
len += sizeof(struct ieee80211_mmie_16);
buf_len += sizeof(struct ieee80211_mmie_16);
} else {
if (cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP ||
cb->ucast_cipher == WLAN_CIPHER_SUITE_GCMP_256) {
len += IEEE80211_GCMP_MIC_LEN;
buf_len += IEEE80211_GCMP_MIC_LEN;
} else {
len += IEEE80211_CCMP_MIC_LEN;
buf_len += IEEE80211_CCMP_MIC_LEN;
}
}
}

len = round_up(len, 4);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath11k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config ATH11K
tristate "Qualcomm Technologies 802.11ax chipset support"
depends on MAC80211 && HAS_DMA
depends on REMOTEPROC
depends on CRYPTO_MICHAEL_MIC
depends on ARCH_QCOM || COMPILE_TEST
select ATH_COMMON
select QCOM_QMI_HELPERS
Expand Down
11 changes: 6 additions & 5 deletions drivers/net/wireless/ath/ath11k/ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ static void ath11k_ahb_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp)

static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
{
struct sk_buff *skb;
int i;

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

napi_synchronize(&irq_grp->napi);
napi_disable(&irq_grp->napi);

while ((skb = __skb_dequeue(&irq_grp->pending_q)))
dev_kfree_skb_any(skb);
}
}

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

/* last interrupt received for this CE */
ce_pipe->timestamp = jiffies;

ath11k_ahb_ce_irq_disable(ce_pipe->ab, ce_pipe->pipe_num);

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

/* last interrupt received for this group */
irq_grp->timestamp = jiffies;

ath11k_ahb_ext_grp_disable(irq_grp);

napi_schedule(&irq_grp->napi);
Expand All @@ -734,7 +736,6 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *ab)
init_dummy_netdev(&irq_grp->napi_ndev);
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
ath11k_ahb_ext_grp_napi_poll, NAPI_POLL_WEIGHT);
__skb_queue_head_init(&irq_grp->pending_q);

for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) {
if (ath11k_tx_ring_mask[i] & BIT(j)) {
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath11k/ce.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ struct ath11k_ce_pipe {
struct ath11k_ce_ring *src_ring;
struct ath11k_ce_ring *dest_ring;
struct ath11k_ce_ring *status_ring;
u64 timestamp;
};

struct ath11k_ce {
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/ath11k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ struct ath11k_skb_rxcb {
u8 err_code;
u8 mac_id;
u8 unmapped;
u8 is_frag;
u8 tid;
};

enum ath11k_hw_rev {
Expand Down Expand Up @@ -109,12 +111,9 @@ struct ath11k_ext_irq_grp {
u32 irqs[ATH11K_EXT_IRQ_NUM_MAX];
u32 num_irq;
u32 grp_id;
u64 timestamp;
struct napi_struct napi;
struct net_device napi_ndev;
/* Queue of pending packets, not expected to be accessed concurrently
* to avoid locking overhead.
*/
struct sk_buff_head pending_q;
};

#define HEHANDLE_CAP_PHYINFO_SIZE 3
Expand Down Expand Up @@ -332,6 +331,7 @@ struct ath11k_sta {
u32 bw;
u32 nss;
u32 smps;
enum hal_pn_type pn_type;

struct work_struct update_wk;
struct rate_info txrate;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/ath/ath11k/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ enum ath11k_dbg_htt_ext_stats_type {
ATH11K_DBG_HTT_EXT_STATS_TWT_SESSIONS = 20,
ATH11K_DBG_HTT_EXT_STATS_REO_RESOURCE_STATS = 21,
ATH11K_DBG_HTT_EXT_STATS_TX_SOUNDING_INFO = 22,
ATH11K_DBG_HTT_EXT_STATS_PDEV_OBSS_PD_STATS = 23,
ATH11K_DBG_HTT_EXT_STATS_RING_BACKPRESSURE_STATS = 24,

/* keep this last */
ATH11K_DBG_HTT_NUM_EXT_STATS,
Expand Down
44 changes: 44 additions & 0 deletions drivers/net/wireless/ath/ath11k/debug_htt_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -3854,6 +3854,47 @@ htt_print_pdev_obss_pd_stats_tlv_v(const void *tag_buf,
stats_req->buf_len = len;
}

static inline void htt_print_backpressure_stats_tlv_v(const u32 *tag_buf,
u8 *data)
{
struct debug_htt_stats_req *stats_req =
(struct debug_htt_stats_req *)data;
struct htt_ring_backpressure_stats_tlv *htt_stats_buf =
(struct htt_ring_backpressure_stats_tlv *)tag_buf;
int i;
u8 *buf = stats_req->buf;
u32 len = stats_req->buf_len;
u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;

len += HTT_DBG_OUT(buf + len, buf_len - len, "pdev_id = %u",
htt_stats_buf->pdev_id);
len += HTT_DBG_OUT(buf + len, buf_len - len, "current_head_idx = %u",
htt_stats_buf->current_head_idx);
len += HTT_DBG_OUT(buf + len, buf_len - len, "current_tail_idx = %u",
htt_stats_buf->current_tail_idx);
len += HTT_DBG_OUT(buf + len, buf_len - len, "num_htt_msgs_sent = %u",
htt_stats_buf->num_htt_msgs_sent);
len += HTT_DBG_OUT(buf + len, buf_len - len,
"backpressure_time_ms = %u",
htt_stats_buf->backpressure_time_ms);

for (i = 0; i < 5; i++)
len += HTT_DBG_OUT(buf + len, buf_len - len,
"backpressure_hist_%u = %u",
i + 1, htt_stats_buf->backpressure_hist[i]);

len += HTT_DBG_OUT(buf + len, buf_len - len,
"============================");

if (len >= buf_len) {
buf[buf_len - 1] = 0;
stats_req->buf_len = buf_len - 1;
} else {
buf[len] = 0;
stats_req->buf_len = len;
}
}

static inline void htt_htt_stats_debug_dump(const u32 *tag_buf,
struct debug_htt_stats_req *stats_req)
{
Expand Down Expand Up @@ -4246,6 +4287,9 @@ static int ath11k_dbg_htt_ext_stats_parse(struct ath11k_base *ab,
case HTT_STATS_PDEV_OBSS_PD_TAG:
htt_print_pdev_obss_pd_stats_tlv_v(tag_buf, stats_req);
break;
case HTT_STATS_RING_BACKPRESSURE_STATS_TAG:
htt_print_backpressure_stats_tlv_v(tag_buf, user_data);
break;
default:
break;
}
Expand Down
28 changes: 28 additions & 0 deletions drivers/net/wireless/ath/ath11k/debug_htt_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ enum htt_tlv_tag_t {
HTT_STATS_SCHED_TXQ_SCHED_ORDER_SU_TAG = 86,
HTT_STATS_SCHED_TXQ_SCHED_INELIGIBILITY_TAG = 87,
HTT_STATS_PDEV_OBSS_PD_TAG = 88,
HTT_STATS_HW_WAR_TAG = 89,
HTT_STATS_RING_BACKPRESSURE_STATS_TAG = 90,

HTT_STATS_MAX_TAG,
};
Expand Down Expand Up @@ -1659,4 +1661,30 @@ struct htt_pdev_obss_pd_stats_tlv {
};

void ath11k_debug_htt_stats_init(struct ath11k *ar);

struct htt_ring_backpressure_stats_tlv {
u32 pdev_id;
u32 current_head_idx;
u32 current_tail_idx;
u32 num_htt_msgs_sent;
/* Time in milliseconds for which the ring has been in
* its current backpressure condition
*/
u32 backpressure_time_ms;
/* backpressure_hist - histogram showing how many times
* different degrees of backpressure duration occurred:
* Index 0 indicates the number of times ring was
* continuously in backpressure state for 100 - 200ms.
* Index 1 indicates the number of times ring was
* continuously in backpressure state for 200 - 300ms.
* Index 2 indicates the number of times ring was
* continuously in backpressure state for 300 - 400ms.
* Index 3 indicates the number of times ring was
* continuously in backpressure state for 400 - 500ms.
* Index 4 indicates the number of times ring was
* continuously in backpressure state beyond 500ms.
*/
u32 backpressure_hist[5];
};

#endif
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath11k/debugfs_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ static ssize_t ath11k_dbg_sta_dump_tx_stats(struct file *file,
const int size = 2 * 4096;
char *buf;

if (!arsta->tx_stats)
return -ENOENT;

buf = kzalloc(size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
Expand Down
Loading

0 comments on commit 22f3397

Please sign in to comment.