Skip to content

Commit

Permalink
Merge ath-next from ath.git
Browse files Browse the repository at this point in the history
Major changes:

ath10k

* support Manegement Frame Protection (MFP)
* add thermal throttling support for 10.4 firmware
* add support for pktlog in QCA99X0
* add debugfs file to enable Bluetooth coexistence feature
* use firmware's native mesh interface type instead of raw mode
  • Loading branch information
Kalle Valo committed Dec 3, 2015
2 parents b31fa55 + 9e100c4 commit f1b4b51
Show file tree
Hide file tree
Showing 20 changed files with 782 additions and 239 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath10k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ config ATH10K
tristate "Atheros 802.11ac wireless cards support"
depends on MAC80211 && HAS_DMA
select ATH_COMMON
select CRC32
---help---
This module adds support for wireless adapters based on
Atheros IEEE 802.11ac family of chipsets.
Expand Down
16 changes: 13 additions & 3 deletions drivers/net/wireless/ath/ath10k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
.hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.fw = {
.dir = QCA988X_HW_2_0_FW_DIR,
.fw = QCA988X_HW_2_0_FW_FILE,
Expand All @@ -75,6 +76,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
.hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.fw = {
.dir = QCA6174_HW_2_1_FW_DIR,
.fw = QCA6174_HW_2_1_FW_FILE,
Expand All @@ -92,6 +94,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
.hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.fw = {
.dir = QCA6174_HW_3_0_FW_DIR,
.fw = QCA6174_HW_3_0_FW_FILE,
Expand All @@ -109,6 +112,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
.hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.fw = {
/* uses same binaries as hw3.0 */
.dir = QCA6174_HW_3_0_FW_DIR,
Expand All @@ -128,6 +132,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.continuous_frag_desc = true,
.channel_counters_freq_hz = 150000,
.max_probe_resp_desc_thres = 24,
.hw_4addr_pad = ATH10K_HW_4ADDR_PAD_BEFORE,
.fw = {
.dir = QCA99X0_HW_2_0_FW_DIR,
.fw = QCA99X0_HW_2_0_FW_FILE,
Expand Down Expand Up @@ -167,6 +172,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
[ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT] = "skip-clock-init",
[ATH10K_FW_FEATURE_RAW_MODE_SUPPORT] = "raw-mode",
[ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA] = "adaptive-cca",
[ATH10K_FW_FEATURE_MFP_SUPPORT] = "mfp",
};

static unsigned int ath10k_core_get_fw_feature_str(char *buf,
Expand Down Expand Up @@ -843,7 +849,7 @@ static int ath10k_core_fetch_board_data_api_n(struct ath10k *ar,
if (!ar->board_data || !ar->board_len) {
ath10k_err(ar,
"failed to fetch board data for %s from %s/%s\n",
ar->hw_params.fw.dir, boardname, filename);
boardname, ar->hw_params.fw.dir, filename);
ret = -ENODATA;
goto err;
}
Expand Down Expand Up @@ -1745,9 +1751,11 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
goto err_power_down;
}

ath10k_debug_print_hwfw_info(ar);

ret = ath10k_core_get_board_id_from_otp(ar);
if (ret && ret != -EOPNOTSUPP) {
ath10k_err(ar, "failed to get board id from otp for qca99x0: %d\n",
ath10k_err(ar, "failed to get board id from otp: %d\n",
ret);
return ret;
}
Expand All @@ -1758,6 +1766,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
goto err_free_firmware_files;
}

ath10k_debug_print_board_info(ar);

ret = ath10k_core_init_firmware_features(ar);
if (ret) {
ath10k_err(ar, "fatal problem with firmware features: %d\n",
Expand All @@ -1780,7 +1790,7 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
goto err_unlock;
}

ath10k_print_driver_info(ar);
ath10k_debug_print_boot_info(ar);
ath10k_core_stop(ar);

mutex_unlock(&ar->conf_mutex);
Expand Down
38 changes: 21 additions & 17 deletions drivers/net/wireless/ath/ath10k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,20 @@ static inline const char *ath10k_bus_str(enum ath10k_bus bus)
return "unknown";
}

enum ath10k_skb_flags {
ATH10K_SKB_F_NO_HWCRYPT = BIT(0),
ATH10K_SKB_F_DTIM_ZERO = BIT(1),
ATH10K_SKB_F_DELIVER_CAB = BIT(2),
ATH10K_SKB_F_MGMT = BIT(3),
ATH10K_SKB_F_QOS = BIT(4),
};

struct ath10k_skb_cb {
dma_addr_t paddr;
u8 flags;
u8 eid;
u8 vdev_id;
enum ath10k_hw_txrx_mode txmode;
bool is_protected;

struct {
u8 tid;
u16 freq;
bool is_offchan;
bool nohwcrypt;
struct ath10k_htt_txbuf *txbuf;
u32 txbuf_paddr;
} __packed htt;

struct {
bool dtim_zero;
bool deliver_cab;
} bcn;
u16 msdu_id;
struct ieee80211_vif *vif;
} __packed;

struct ath10k_skb_rxcb {
Expand Down Expand Up @@ -151,6 +145,7 @@ struct ath10k_wmi {
struct wmi_vdev_param_map *vdev_param;
struct wmi_pdev_param_map *pdev_param;
const struct wmi_ops *ops;
const struct wmi_peer_flags_map *peer_flags;

u32 num_mem_chunks;
u32 rx_decap_mode;
Expand Down Expand Up @@ -512,6 +507,9 @@ enum ath10k_fw_features {
/* Firmware Supports Adaptive CCA*/
ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA = 11,

/* Firmware supports management frame protection */
ATH10K_FW_FEATURE_MFP_SUPPORT = 12,

/* keep last */
ATH10K_FW_FEATURE_COUNT,
};
Expand All @@ -534,6 +532,9 @@ enum ath10k_dev_flags {

/* Disable HW crypto engine */
ATH10K_FLAG_HW_CRYPTO_DISABLED,

/* Bluetooth coexistance enabled */
ATH10K_FLAG_BTCOEX,
};

enum ath10k_cal_mode {
Expand Down Expand Up @@ -661,6 +662,9 @@ struct ath10k {
*/
u32 max_probe_resp_desc_thres;

/* The padding bytes's location is different on various chips */
enum ath10k_hw_4addr_pad hw_4addr_pad;

struct ath10k_hw_params_fw {
const char *dir;
const char *fw;
Expand Down
Loading

0 comments on commit f1b4b51

Please sign in to comment.