Skip to content

Commit

Permalink
Merge tag 'wireless-drivers-next-2020-05-30' 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.8

Third set of patches for v5.8. Final new features before the merge
window (most likely) opens, noteworthy here is adding WPA3 support to
old drivers rt2800, b43 and b43_legacy.

Major changes:

ath10k

* SDIO and SNOC busses are not experimental anymore

ath9k

* allow receive of broadcast Action frames

ath9k_htc

* allow receive of broadcast Action frames

rt2800

* enable WPA3 support out of box

b43

* enable WPA3 support

b43_legacy

* enable WPA3 support

mwifiex

* advertise max number of clients to user space

mt76

* mt7663: add remain-on-channel support

* mt7915: add spatial reuse support

* add support for mt7611n hardware

iwlwifi

* add ACPI DSM support

* support enabling 5.2GHz bands in Indonesia via ACPI

* bump FW API version to 56
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 31, 2020
2 parents b8ded9d + e948ed0 commit d7ad141
Show file tree
Hide file tree
Showing 120 changed files with 1,634 additions and 743 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14066,7 +14066,7 @@ F: drivers/net/wireless/ath/wcn36xx/

QUANTENNA QTNFMAC WIRELESS DRIVER
M: Igor Mitsyanko <imitsyanko@quantenna.com>
M: Sergey Matyukevich <smatyukevich@quantenna.com>
R: Sergey Matyukevich <geomatsi@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/net/wireless/quantenna
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/wireless/ath/ath10k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ config ATH10K_AHB
This module adds support for AHB bus

config ATH10K_SDIO
tristate "Atheros ath10k SDIO support (EXPERIMENTAL)"
tristate "Atheros ath10k SDIO support"
depends on ATH10K && MMC
---help---
This module adds experimental support for SDIO/MMC bus. Currently
work in progress and will not fully work.
This module adds support for SDIO/MMC bus.

config ATH10K_USB
tristate "Atheros ath10k USB support (EXPERIMENTAL)"
Expand All @@ -42,7 +41,7 @@ config ATH10K_USB
work in progress and will not fully work.

config ATH10K_SNOC
tristate "Qualcomm ath10k SNOC support (EXPERIMENTAL)"
tristate "Qualcomm ath10k SNOC support"
depends on ATH10K
depends on ARCH_QCOM || COMPILE_TEST
select QCOM_QMI_HELPERS
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/ce.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct ath10k_ce_ring {
struct ce_desc_64 *shadow_base;

/* keep last */
void *per_transfer_context[0];
void *per_transfer_context[];
};

struct ath10k_ce_pipe {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ struct ath10k {
int coex_gpio_pin;

/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
u8 drv_priv[] __aligned(sizeof(void *));
};

static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath10k/coredump.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct ath10k_dump_file_data {
u8 unused[128];

/* struct ath10k_tlv_dump_data + more */
u8 data[0];
u8 data[];
} __packed;

struct ath10k_dump_ram_data_hdr {
Expand All @@ -100,7 +100,7 @@ struct ath10k_dump_ram_data_hdr {
/* length of payload data, not including this header */
__le32 length;

u8 data[0];
u8 data[];
};

/* magic number to fill the holes not copied due to sections in regions */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct ath10k_pktlog_hdr {
__le16 log_type; /* Type of log information foll this header */
__le16 size; /* Size of variable length log information in bytes */
__le32 timestamp;
u8 payload[0];
u8 payload[];
} __packed;

/* FIXME: How to calculate the buffer size sanely? */
Expand Down
42 changes: 21 additions & 21 deletions drivers/net/wireless/ath/ath10k/htt.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ struct htt_rx_ring_setup_hdr {

struct htt_rx_ring_setup_32 {
struct htt_rx_ring_setup_hdr hdr;
struct htt_rx_ring_setup_ring32 rings[0];
struct htt_rx_ring_setup_ring32 rings[];
} __packed;

struct htt_rx_ring_setup_64 {
struct htt_rx_ring_setup_hdr hdr;
struct htt_rx_ring_setup_ring64 rings[0];
struct htt_rx_ring_setup_ring64 rings[];
} __packed;

/*
Expand Down Expand Up @@ -732,7 +732,7 @@ struct htt_rx_indication {
* %mpdu_ranges starts after &%prefix + roundup(%fw_rx_desc_bytes, 4)
* and has %num_mpdu_ranges elements.
*/
struct htt_rx_indication_mpdu_range mpdu_ranges[0];
struct htt_rx_indication_mpdu_range mpdu_ranges[];
} __packed;

/* High latency version of the RX indication */
Expand All @@ -741,7 +741,7 @@ struct htt_rx_indication_hl {
struct htt_rx_indication_ppdu ppdu;
struct htt_rx_indication_prefix prefix;
struct fw_rx_desc_hl fw_desc;
struct htt_rx_indication_mpdu_range mpdu_ranges[0];
struct htt_rx_indication_mpdu_range mpdu_ranges[];
} __packed;

struct htt_hl_rx_desc {
Expand Down Expand Up @@ -908,7 +908,7 @@ struct htt_append_retries {
struct htt_data_tx_completion_ext {
struct htt_append_retries a_retries;
__le32 t_stamp;
__le16 msdus_rssi[0];
__le16 msdus_rssi[];
} __packed;

/**
Expand Down Expand Up @@ -992,7 +992,7 @@ struct htt_data_tx_completion {
} __packed;
u8 num_msdus;
u8 flags2; /* HTT_TX_CMPL_FLAG_DATA_RSSI */
__le16 msdus[0]; /* variable length based on %num_msdus */
__le16 msdus[]; /* variable length based on %num_msdus */
} __packed;

#define HTT_TX_PPDU_DUR_INFO0_PEER_ID_MASK GENMASK(15, 0)
Expand All @@ -1007,7 +1007,7 @@ struct htt_data_tx_ppdu_dur {

struct htt_data_tx_compl_ppdu_dur {
__le32 info0; /* HTT_TX_COMPL_PPDU_DUR_INFO0_ */
struct htt_data_tx_ppdu_dur ppdu_dur[0];
struct htt_data_tx_ppdu_dur ppdu_dur[];
} __packed;

struct htt_tx_compl_ind_base {
Expand All @@ -1033,7 +1033,7 @@ struct htt_rc_update {
u8 addr[6];
u8 num_elems;
u8 rsvd0;
struct htt_rc_tx_done_params params[0]; /* variable length %num_elems */
struct htt_rc_tx_done_params params[]; /* variable length %num_elems */
} __packed;

/* see htt_rx_indication for similar fields and descriptions */
Expand All @@ -1050,7 +1050,7 @@ struct htt_rx_fragment_indication {
__le16 fw_rx_desc_bytes;
__le16 rsvd0;

u8 fw_msdu_rx_desc[0];
u8 fw_msdu_rx_desc[];
} __packed;

#define ATH10K_IEEE80211_EXTIV BIT(5)
Expand All @@ -1075,7 +1075,7 @@ struct htt_rx_pn_ind {
u8 seqno_end;
u8 pn_ie_count;
u8 reserved;
u8 pn_ies[0];
u8 pn_ies[];
} __packed;

struct htt_rx_offload_msdu {
Expand All @@ -1084,7 +1084,7 @@ struct htt_rx_offload_msdu {
u8 vdev_id;
u8 tid;
u8 fw_desc;
u8 payload[0];
u8 payload[];
} __packed;

struct htt_rx_offload_ind {
Expand Down Expand Up @@ -1167,7 +1167,7 @@ struct htt_rx_test {
* a) num_ints * sizeof(__le32)
* b) num_chars * sizeof(u8) aligned to 4bytes
*/
u8 payload[0];
u8 payload[];
} __packed;

static inline __le32 *htt_rx_test_get_ints(struct htt_rx_test *rx_test)
Expand Down Expand Up @@ -1201,7 +1201,7 @@ static inline u8 *htt_rx_test_get_chars(struct htt_rx_test *rx_test)
*/
struct htt_pktlog_msg {
u8 pad[3];
u8 payload[0];
u8 payload[];
} __packed;

struct htt_dbg_stats_rx_reorder_stats {
Expand Down Expand Up @@ -1490,7 +1490,7 @@ struct htt_stats_conf_item {
} __packed;
u8 pad;
__le16 length;
u8 payload[0]; /* roundup(length, 4) long */
u8 payload[]; /* roundup(length, 4) long */
} __packed;

struct htt_stats_conf {
Expand All @@ -1499,7 +1499,7 @@ struct htt_stats_conf {
__le32 cookie_msb;

/* each item has variable length! */
struct htt_stats_conf_item items[0];
struct htt_stats_conf_item items[];
} __packed;

static inline struct htt_stats_conf_item *htt_stats_conf_next_item(
Expand Down Expand Up @@ -1673,8 +1673,8 @@ struct htt_tx_fetch_ind {
__le32 token;
__le16 num_resp_ids;
__le16 num_records;
struct htt_tx_fetch_record records[0];
__le32 resp_ids[0]; /* ath10k_htt_get_tx_fetch_ind_resp_ids() */
struct htt_tx_fetch_record records[];
} __packed;

static inline void *
Expand All @@ -1689,13 +1689,13 @@ struct htt_tx_fetch_resp {
__le16 fetch_seq_num;
__le16 num_records;
__le32 token;
struct htt_tx_fetch_record records[0];
struct htt_tx_fetch_record records[];
} __packed;

struct htt_tx_fetch_confirm {
u8 pad0;
__le16 num_resp_ids;
__le32 resp_ids[0];
__le32 resp_ids[];
} __packed;

enum htt_tx_mode_switch_mode {
Expand Down Expand Up @@ -1727,7 +1727,7 @@ struct htt_tx_mode_switch_ind {
__le16 info0; /* HTT_TX_MODE_SWITCH_IND_INFO0_ */
__le16 info1; /* HTT_TX_MODE_SWITCH_IND_INFO1_ */
u8 pad1[2];
struct htt_tx_mode_switch_record records[0];
struct htt_tx_mode_switch_record records[];
} __packed;

struct htt_channel_change {
Expand Down Expand Up @@ -1757,7 +1757,7 @@ struct htt_peer_tx_stats {
u8 num_ppdu;
u8 ppdu_len;
u8 version;
u8 payload[0];
u8 payload[];
} __packed;

#define ATH10K_10_2_TX_STATS_OFFSET 136
Expand Down Expand Up @@ -2206,7 +2206,7 @@ struct htt_rx_desc {
struct rx_ppdu_end ppdu_end;
} __packed;
u8 rx_hdr_status[RX_HTT_HDR_STATUS_LEN];
u8 msdu_payload[0];
u8 msdu_payload[];
};

#define HTT_RX_DESC_HL_INFO_SEQ_NUM_MASK 0x00000fff
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ enum qca9377_chip_id_rev {
struct ath10k_fw_ie {
__le32 id;
__le32 len;
u8 data[0];
u8 data[];
};

enum ath10k_fw_ie_type {
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3967,6 +3967,9 @@ void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work)
if (ret) {
ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n",
ret);
/* remove this msdu from idr tracking */
ath10k_wmi_cleanup_mgmt_tx_send(ar, skb);

dma_unmap_single(ar->dev, paddr, skb->len,
DMA_TO_DEVICE);
ieee80211_free_txskb(ar->hw, skb);
Expand Down
9 changes: 5 additions & 4 deletions drivers/net/wireless/ath/ath10k/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,16 @@ struct ath10k_pci {
*/
u32 (*targ_cpu_to_ce_addr)(struct ath10k *ar, u32 addr);

struct ce_attr *attr;
struct ce_pipe_config *pipe_config;
struct ce_service_to_pipe *serv_to_pipe;

/* Keep this entry in the last, memory for struct ath10k_ahb is
* allocated (ahb support enabled case) in the continuation of
* this struct.
*/
struct ath10k_ahb ahb[0];
struct ath10k_ahb ahb[];

struct ce_attr *attr;
struct ce_pipe_config *pipe_config;
struct ce_service_to_pipe *serv_to_pipe;
};

static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
Expand Down
13 changes: 12 additions & 1 deletion drivers/net/wireless/ath/ath10k/qmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,16 @@ static void ath10k_qmi_del_server(struct qmi_handle *qmi_hdl,
container_of(qmi_hdl, struct ath10k_qmi, qmi_hdl);

qmi->fw_ready = false;
ath10k_qmi_driver_event_post(qmi, ATH10K_QMI_EVENT_SERVER_EXIT, NULL);

/*
* The del_server event is to be processed only if coming from
* the qmi server. The qmi infrastructure sends del_server, when
* any client releases the qmi handle. In this case do not process
* this del_server event.
*/
if (qmi->state == ATH10K_QMI_STATE_INIT_DONE)
ath10k_qmi_driver_event_post(qmi, ATH10K_QMI_EVENT_SERVER_EXIT,
NULL);
}

static struct qmi_ops ath10k_qmi_ops = {
Expand Down Expand Up @@ -1046,6 +1055,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
if (ret)
goto err_qmi_lookup;

qmi->state = ATH10K_QMI_STATE_INIT_DONE;
return 0;

err_qmi_lookup:
Expand All @@ -1064,6 +1074,7 @@ int ath10k_qmi_deinit(struct ath10k *ar)
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
struct ath10k_qmi *qmi = ar_snoc->qmi;

qmi->state = ATH10K_QMI_STATE_DEINIT;
qmi_handle_release(&qmi->qmi_hdl);
cancel_work_sync(&qmi->event_work);
destroy_workqueue(qmi->event_wq);
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/wireless/ath/ath10k/qmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ struct ath10k_qmi_driver_event {
void *data;
};

enum ath10k_qmi_state {
ATH10K_QMI_STATE_INIT_DONE,
ATH10K_QMI_STATE_DEINIT,
};

struct ath10k_qmi {
struct ath10k *ar;
struct qmi_handle qmi_hdl;
Expand All @@ -102,14 +107,14 @@ struct ath10k_qmi {
char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
bool msa_fixed_perm;
enum ath10k_qmi_state state;
};

int ath10k_qmi_wlan_enable(struct ath10k *ar,
struct ath10k_qmi_wlan_enable_cfg *config,
enum wlfw_driver_mode_enum_v01 mode,
const char *version);
int ath10k_qmi_wlan_disable(struct ath10k *ar);
int ath10k_qmi_register_service_notifier(struct notifier_block *nb);
int ath10k_qmi_init(struct ath10k *ar, u32 msa_size);
int ath10k_qmi_deinit(struct ath10k *ar);
int ath10k_qmi_set_fw_log_mode(struct ath10k *ar, u8 fw_log_mode);
Expand Down
10 changes: 10 additions & 0 deletions drivers/net/wireless/ath/ath10k/wmi-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ struct wmi_ops {
struct sk_buff *(*gen_mgmt_tx_send)(struct ath10k *ar,
struct sk_buff *skb,
dma_addr_t paddr);
int (*cleanup_mgmt_tx_send)(struct ath10k *ar, struct sk_buff *msdu);
struct sk_buff *(*gen_dbglog_cfg)(struct ath10k *ar, u64 module_enable,
u32 log_level);
struct sk_buff *(*gen_pktlog_enable)(struct ath10k *ar, u32 filter);
Expand Down Expand Up @@ -448,6 +449,15 @@ ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
return ar->wmi.ops->get_txbf_conf_scheme(ar);
}

static inline int
ath10k_wmi_cleanup_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu)
{
if (!ar->wmi.ops->cleanup_mgmt_tx_send)
return -EOPNOTSUPP;

return ar->wmi.ops->cleanup_mgmt_tx_send(ar, msdu);
}

static inline int
ath10k_wmi_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu,
dma_addr_t paddr)
Expand Down
Loading

0 comments on commit d7ad141

Please sign in to comment.