ath10k: implement wmi-tlv backend

Latest main firmware branch introduced a new WMI
ABI called wmi-tlv. It is not a tlv strictly
speaking but something that resembles it because
it is ordered and may have duplicate id entries.

This prepares ath10k to support new hw.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
Michal Kazior 2014-12-03 10:11:32 +02:00 committed by Kalle Valo
parent 0226d60258
commit ca996ec566
8 changed files with 3701 additions and 1 deletions

View File

@ -8,6 +8,7 @@ ath10k_core-y += mac.o \
htt_tx.o \
txrx.o \
wmi.o \
wmi-tlv.o \
bmi.o
ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o

View File

@ -1093,6 +1093,8 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
BUILD_BUG_ON(2*TARGET_10X_NUM_MSDU_DESC >
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
BUILD_BUG_ON(2*TARGET_TLV_NUM_MSDU_DESC >
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
ce_state->ar = ar;
ce_state->id = ce_id;

View File

@ -915,6 +915,11 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
ar->max_num_stations = TARGET_10X_NUM_STATIONS;
ar->htt.max_num_pending_tx = TARGET_10X_NUM_MSDU_DESC;
break;
case ATH10K_FW_WMI_OP_VERSION_TLV:
ar->max_num_peers = TARGET_TLV_NUM_PEERS;
ar->max_num_stations = TARGET_TLV_NUM_STATIONS;
ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC;
break;
case ATH10K_FW_WMI_OP_VERSION_UNSET:
case ATH10K_FW_WMI_OP_VERSION_MAX:
WARN_ON(1);

View File

@ -71,6 +71,7 @@ enum ath10k_fw_wmi_op_version {
ATH10K_FW_WMI_OP_VERSION_MAIN = 1,
ATH10K_FW_WMI_OP_VERSION_10_1 = 2,
ATH10K_FW_WMI_OP_VERSION_10_2 = 3,
ATH10K_FW_WMI_OP_VERSION_TLV = 4,
/* keep last */
ATH10K_FW_WMI_OP_VERSION_MAX,
@ -178,6 +179,15 @@ struct ath10k_pktlog_hdr {
#define TARGET_10X_NUM_MSDU_DESC (1024 + 400)
#define TARGET_10X_MAX_FRAG_ENTRIES 0
/* Target specific defines for WMI-TLV firmware */
#define TARGET_TLV_NUM_VDEVS 3
#define TARGET_TLV_NUM_STATIONS 32
#define TARGET_TLV_NUM_PEERS ((TARGET_TLV_NUM_STATIONS) + \
(TARGET_TLV_NUM_VDEVS) + \
2)
#define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2)
#define TARGET_TLV_NUM_MSDU_DESC (1024 + 32)
/* Number of Copy Engines supported */
#define CE_COUNT 8

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@
#include "htc.h"
#include "debug.h"
#include "wmi.h"
#include "wmi-tlv.h"
#include "mac.h"
#include "testmode.h"
#include "wmi-ops.h"
@ -2735,13 +2736,14 @@ void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb)
}
ath10k_dbg(ar, ATH10K_DBG_WMI,
"wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x num_mem_reqs 0x%08x\n",
"wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x fw_build 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x num_mem_reqs 0x%08x\n",
__le32_to_cpu(arg.min_tx_power),
__le32_to_cpu(arg.max_tx_power),
__le32_to_cpu(arg.ht_cap),
__le32_to_cpu(arg.vht_cap),
__le32_to_cpu(arg.sw_ver0),
__le32_to_cpu(arg.sw_ver1),
__le32_to_cpu(arg.fw_build),
__le32_to_cpu(arg.phy_capab),
__le32_to_cpu(arg.num_rf_chains),
__le32_to_cpu(arg.eeprom_rd),
@ -4762,6 +4764,9 @@ int ath10k_wmi_attach(struct ath10k *ar)
ar->wmi.vdev_param = &wmi_vdev_param_map;
ar->wmi.pdev_param = &wmi_pdev_param_map;
break;
case ATH10K_FW_WMI_OP_VERSION_TLV:
ath10k_wmi_tlv_attach(ar);
break;
case ATH10K_FW_WMI_OP_VERSION_UNSET:
case ATH10K_FW_WMI_OP_VERSION_MAX:
ath10k_err(ar, "unsupported WMI op version: %d\n",

View File

@ -109,6 +109,45 @@ enum wmi_service {
WMI_SERVICE_BURST,
WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
WMI_SERVICE_ROAM_SCAN_OFFLOAD,
WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
WMI_SERVICE_EARLY_RX,
WMI_SERVICE_STA_SMPS,
WMI_SERVICE_FWTEST,
WMI_SERVICE_STA_WMMAC,
WMI_SERVICE_TDLS,
WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE,
WMI_SERVICE_ADAPTIVE_OCS,
WMI_SERVICE_BA_SSN_SUPPORT,
WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
WMI_SERVICE_WLAN_HB,
WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,
WMI_SERVICE_BATCH_SCAN,
WMI_SERVICE_QPOWER,
WMI_SERVICE_PLMREQ,
WMI_SERVICE_THERMAL_MGMT,
WMI_SERVICE_RMC,
WMI_SERVICE_MHF_OFFLOAD,
WMI_SERVICE_COEX_SAR,
WMI_SERVICE_BCN_TXRATE_OVERRIDE,
WMI_SERVICE_NAN,
WMI_SERVICE_L1SS_STAT,
WMI_SERVICE_ESTIMATE_LINKSPEED,
WMI_SERVICE_OBSS_SCAN,
WMI_SERVICE_TDLS_OFFCHAN,
WMI_SERVICE_TDLS_UAPSD_BUFFER_STA,
WMI_SERVICE_TDLS_UAPSD_SLEEP_STA,
WMI_SERVICE_IBSS_PWRSAVE,
WMI_SERVICE_LPASS,
WMI_SERVICE_EXTSCAN,
WMI_SERVICE_D0WOW,
WMI_SERVICE_HSOFFLOAD,
WMI_SERVICE_ROAM_HO_OFFLOAD,
WMI_SERVICE_RX_FULL_REORDER,
WMI_SERVICE_DHCP_OFFLOAD,
WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT,
WMI_SERVICE_MDNS_OFFLOAD,
WMI_SERVICE_SAP_AUTH_OFFLOAD,
/* keep last */
WMI_SERVICE_MAX,
@ -215,6 +254,45 @@ static inline char *wmi_service_name(int service_id)
SVCSTR(WMI_SERVICE_BURST);
SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
SVCSTR(WMI_SERVICE_EARLY_RX);
SVCSTR(WMI_SERVICE_STA_SMPS);
SVCSTR(WMI_SERVICE_FWTEST);
SVCSTR(WMI_SERVICE_STA_WMMAC);
SVCSTR(WMI_SERVICE_TDLS);
SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
SVCSTR(WMI_SERVICE_WLAN_HB);
SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
SVCSTR(WMI_SERVICE_BATCH_SCAN);
SVCSTR(WMI_SERVICE_QPOWER);
SVCSTR(WMI_SERVICE_PLMREQ);
SVCSTR(WMI_SERVICE_THERMAL_MGMT);
SVCSTR(WMI_SERVICE_RMC);
SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
SVCSTR(WMI_SERVICE_COEX_SAR);
SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
SVCSTR(WMI_SERVICE_NAN);
SVCSTR(WMI_SERVICE_L1SS_STAT);
SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
SVCSTR(WMI_SERVICE_OBSS_SCAN);
SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
SVCSTR(WMI_SERVICE_LPASS);
SVCSTR(WMI_SERVICE_EXTSCAN);
SVCSTR(WMI_SERVICE_D0WOW);
SVCSTR(WMI_SERVICE_HSOFFLOAD);
SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
default:
return NULL;
}
@ -4626,6 +4704,7 @@ struct wmi_svc_rdy_ev_arg {
__le32 vht_cap;
__le32 sw_ver0;
__le32 sw_ver1;
__le32 fw_build;
__le32 phy_capab;
__le32 num_rf_chains;
__le32 eeprom_rd;