Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
ath.git patches for v5.20. Major changes: ath10k * 802.3 frame format support
This commit is contained in:
commit
8092a0eed4
@ -33,9 +33,11 @@ EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
static unsigned int ath10k_cryptmode_param;
|
||||
static bool uart_print;
|
||||
static bool skip_otp;
|
||||
static bool rawmode;
|
||||
static bool fw_diag_log;
|
||||
|
||||
/* frame mode values are mapped as per enum ath10k_hw_txrx_mode */
|
||||
unsigned int ath10k_frame_mode = ATH10K_HW_TXRX_NATIVE_WIFI;
|
||||
|
||||
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
|
||||
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
|
||||
|
||||
@ -44,15 +46,16 @@ module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
|
||||
module_param_named(cryptmode, ath10k_cryptmode_param, uint, 0644);
|
||||
module_param(uart_print, bool, 0644);
|
||||
module_param(skip_otp, bool, 0644);
|
||||
module_param(rawmode, bool, 0644);
|
||||
module_param(fw_diag_log, bool, 0644);
|
||||
module_param_named(frame_mode, ath10k_frame_mode, uint, 0644);
|
||||
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
|
||||
|
||||
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
||||
MODULE_PARM_DESC(uart_print, "Uart target debugging");
|
||||
MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
|
||||
MODULE_PARM_DESC(cryptmode, "Crypto mode: 0-hardware, 1-software");
|
||||
MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
|
||||
MODULE_PARM_DESC(frame_mode,
|
||||
"Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
|
||||
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
|
||||
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
|
||||
|
||||
@ -2599,7 +2602,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
|
||||
ar->htt.max_num_amsdu = ATH10K_HTT_MAX_NUM_AMSDU_DEFAULT;
|
||||
ar->htt.max_num_ampdu = ATH10K_HTT_MAX_NUM_AMPDU_DEFAULT;
|
||||
|
||||
if (rawmode) {
|
||||
if (ath10k_frame_mode == ATH10K_HW_TXRX_RAW) {
|
||||
if (!test_bit(ATH10K_FW_FEATURE_RAW_MODE_SUPPORT,
|
||||
fw_file->fw_features)) {
|
||||
ath10k_err(ar, "rawmode = 1 requires support from firmware");
|
||||
|
@ -1314,6 +1314,7 @@ static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
|
||||
return false;
|
||||
}
|
||||
|
||||
extern unsigned int ath10k_frame_mode;
|
||||
extern unsigned long ath10k_coredump_mask;
|
||||
|
||||
void ath10k_core_napi_sync_disable(struct ath10k *ar);
|
||||
|
@ -3563,7 +3563,7 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar,
|
||||
threshold = MS(info1, HTT_TX_MODE_SWITCH_IND_INFO1_THRESHOLD);
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_HTT,
|
||||
"htt rx tx mode switch ind info0 0x%04hx info1 0x%04x enable %d num records %zd mode %d threshold %u\n",
|
||||
"htt rx tx mode switch ind info0 0x%04x info1 0x%04x enable %d num records %zd mode %d threshold %u\n",
|
||||
info0, info1, enable, num_records, mode, threshold);
|
||||
|
||||
len += sizeof(resp->tx_mode_switch_ind.records[0]) * num_records;
|
||||
@ -3884,6 +3884,10 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar,
|
||||
arsta->tx_info.status.rates[0].flags |=
|
||||
IEEE80211_TX_RC_80_MHZ_WIDTH;
|
||||
break;
|
||||
case RATE_INFO_BW_160:
|
||||
arsta->tx_info.status.rates[0].flags |=
|
||||
IEEE80211_TX_RC_160_MHZ_WIDTH;
|
||||
break;
|
||||
}
|
||||
|
||||
if (peer_stats->succ_pkts) {
|
||||
|
@ -1275,7 +1275,6 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
struct ath10k *ar = htt->ar;
|
||||
int res, data_len;
|
||||
struct htt_cmd_hdr *cmd_hdr;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct htt_data_tx_desc *tx_desc;
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct sk_buff *tmp_skb;
|
||||
@ -1286,11 +1285,15 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
u16 flags1 = 0;
|
||||
u16 msdu_id = 0;
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
if (!is_eth) {
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
data_len = msdu->len;
|
||||
@ -1387,7 +1390,6 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@ -1419,15 +1421,19 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_32) * msdu_id);
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
} else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
txmode == ATH10K_HW_TXRX_RAW &&
|
||||
ieee80211_has_protected(hdr->frame_control)) {
|
||||
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
if (!is_eth) {
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
} else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
txmode == ATH10K_HW_TXRX_RAW &&
|
||||
ieee80211_has_protected(hdr->frame_control)) {
|
||||
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
@ -1589,7 +1595,6 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@ -1621,15 +1626,19 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_64) * msdu_id);
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
} else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
txmode == ATH10K_HW_TXRX_RAW &&
|
||||
ieee80211_has_protected(hdr->frame_control)) {
|
||||
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
if (!is_eth) {
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
|
||||
if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
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);
|
||||
} else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
txmode == ATH10K_HW_TXRX_RAW &&
|
||||
ieee80211_has_protected(hdr->frame_control)) {
|
||||
skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
|
@ -3713,6 +3713,9 @@ ath10k_mac_tx_h_get_txmode(struct ath10k *ar,
|
||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
||||
__le16 fc = hdr->frame_control;
|
||||
|
||||
if (IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
||||
return ATH10K_HW_TXRX_ETHERNET;
|
||||
|
||||
if (!vif || vif->type == NL80211_IFTYPE_MONITOR)
|
||||
return ATH10K_HW_TXRX_RAW;
|
||||
|
||||
@ -3873,6 +3876,12 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
bool noack = false;
|
||||
|
||||
cb->flags = 0;
|
||||
|
||||
if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
||||
cb->flags |= ATH10K_SKB_F_QOS; /* Assume data frames are QoS */
|
||||
goto finish_cb_fill;
|
||||
}
|
||||
|
||||
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
|
||||
cb->flags |= ATH10K_SKB_F_NO_HWCRYPT;
|
||||
|
||||
@ -3911,6 +3920,7 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
cb->flags |= ATH10K_SKB_F_RAW_TX;
|
||||
}
|
||||
|
||||
finish_cb_fill:
|
||||
cb->vif = vif;
|
||||
cb->txq = txq;
|
||||
cb->airtime_est = airtime;
|
||||
@ -4034,7 +4044,11 @@ static int ath10k_mac_tx(struct ath10k *ar,
|
||||
ath10k_tx_h_seq_no(vif, skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_ETHERNET:
|
||||
ath10k_tx_h_8023(skb);
|
||||
/* Convert 802.11->802.3 header only if the frame was erlier
|
||||
* encapsulated to 802.11 by mac80211. Otherwise pass it as is.
|
||||
*/
|
||||
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP))
|
||||
ath10k_tx_h_8023(skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_RAW:
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags) &&
|
||||
@ -4645,12 +4659,10 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ieee80211_sta *sta = control->sta;
|
||||
struct ieee80211_txq *txq = NULL;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
enum ath10k_hw_txrx_mode txmode;
|
||||
enum ath10k_mac_tx_path txpath;
|
||||
bool is_htt;
|
||||
bool is_mgmt;
|
||||
bool is_presp;
|
||||
int ret;
|
||||
u16 airtime;
|
||||
|
||||
@ -4664,8 +4676,14 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
is_mgmt = (txpath == ATH10K_MAC_TX_HTT_MGMT);
|
||||
|
||||
if (is_htt) {
|
||||
bool is_presp = false;
|
||||
|
||||
spin_lock_bh(&ar->htt.tx_lock);
|
||||
is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
|
||||
is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
}
|
||||
|
||||
ret = ath10k_htt_tx_inc_pending(htt);
|
||||
if (ret) {
|
||||
@ -5465,6 +5483,30 @@ static int ath10k_mac_set_txbf_conf(struct ath10k_vif *arvif)
|
||||
ar->wmi.vdev_param->txbf, value);
|
||||
}
|
||||
|
||||
static void ath10k_update_vif_offload(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
||||
struct ath10k *ar = hw->priv;
|
||||
u32 vdev_param;
|
||||
int ret;
|
||||
|
||||
if (ath10k_frame_mode != ATH10K_HW_TXRX_ETHERNET ||
|
||||
ar->wmi.vdev_param->tx_encap_type == WMI_VDEV_PARAM_UNSUPPORTED ||
|
||||
(vif->type != NL80211_IFTYPE_STATION &&
|
||||
vif->type != NL80211_IFTYPE_AP))
|
||||
vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
||||
|
||||
vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
/* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
if (ret && ret != -EOPNOTSUPP) {
|
||||
ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
|
||||
@ -5674,15 +5716,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
arvif->def_wep_key_idx = -1;
|
||||
|
||||
vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
/* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
if (ret && ret != -EOPNOTSUPP) {
|
||||
ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
arvif->vdev_id, ret);
|
||||
goto err_vdev_delete;
|
||||
}
|
||||
ath10k_update_vif_offload(hw, vif);
|
||||
|
||||
/* Configuring number of spatial stream for monitor interface is causing
|
||||
* target assert in qca9888 and qca6174.
|
||||
@ -9375,6 +9409,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
||||
.stop = ath10k_stop,
|
||||
.config = ath10k_config,
|
||||
.add_interface = ath10k_add_interface,
|
||||
.update_vif_offload = ath10k_update_vif_offload,
|
||||
.remove_interface = ath10k_remove_interface,
|
||||
.configure_filter = ath10k_configure_filter,
|
||||
.bss_info_changed = ath10k_bss_info_changed,
|
||||
@ -10044,6 +10079,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map))
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA);
|
||||
|
||||
if (ath10k_frame_mode == ATH10K_HW_TXRX_ETHERNET) {
|
||||
if (ar->wmi.vdev_param->tx_encap_type !=
|
||||
WMI_VDEV_PARAM_UNSUPPORTED)
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_ENCAP_OFFLOAD);
|
||||
}
|
||||
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
ar->hw->wiphy->max_remain_on_channel_duration = 5000;
|
||||
@ -10229,7 +10270,8 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
ar->hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_AP_VLAN);
|
||||
}
|
||||
|
||||
if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
|
||||
if (!ath_is_world_regd(&ar->ath_common.reg_world_copy) &&
|
||||
!ath_is_world_regd(&ar->ath_common.regulatory)) {
|
||||
ret = regulatory_hint(ar->hw->wiphy,
|
||||
ar->ath_common.regulatory.alpha2);
|
||||
if (ret)
|
||||
|
@ -590,12 +590,12 @@ static int ath10k_qmi_cap_send_sync_msg(struct ath10k_qmi *qmi)
|
||||
|
||||
if (resp->fw_version_info_valid) {
|
||||
qmi->fw_version = resp->fw_version_info.fw_version;
|
||||
strlcpy(qmi->fw_build_timestamp, resp->fw_version_info.fw_build_timestamp,
|
||||
strscpy(qmi->fw_build_timestamp, resp->fw_version_info.fw_build_timestamp,
|
||||
sizeof(qmi->fw_build_timestamp));
|
||||
}
|
||||
|
||||
if (resp->fw_build_id_valid)
|
||||
strlcpy(qmi->fw_build_id, resp->fw_build_id,
|
||||
strscpy(qmi->fw_build_id, resp->fw_build_id,
|
||||
MAX_BUILD_ID_LEN + 1);
|
||||
|
||||
if (!test_bit(ATH10K_SNOC_FLAG_REGISTERED, &ar_snoc->flags)) {
|
||||
|
@ -1249,13 +1249,12 @@ static void ath10k_snoc_init_napi(struct ath10k *ar)
|
||||
static int ath10k_snoc_request_irq(struct ath10k *ar)
|
||||
{
|
||||
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
|
||||
int irqflags = IRQF_TRIGGER_RISING;
|
||||
int ret, id;
|
||||
|
||||
for (id = 0; id < CE_COUNT_MAX; id++) {
|
||||
ret = request_irq(ar_snoc->ce_irqs[id].irq_line,
|
||||
ath10k_snoc_per_engine_handler,
|
||||
irqflags, ce_name[id], ar);
|
||||
ath10k_snoc_per_engine_handler, 0,
|
||||
ce_name[id], ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar,
|
||||
"failed to register IRQ handler for CE %d: %d\n",
|
||||
|
@ -43,6 +43,7 @@ out:
|
||||
int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
const struct htt_tx_done *tx_done)
|
||||
{
|
||||
struct ieee80211_tx_status status;
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
struct ieee80211_tx_info *info;
|
||||
@ -128,7 +129,19 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
|
||||
}
|
||||
|
||||
ieee80211_tx_status(htt->ar->hw, msdu);
|
||||
memset(&status, 0, sizeof(status));
|
||||
status.skb = msdu;
|
||||
status.info = info;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
if (txq)
|
||||
status.sta = txq->sta;
|
||||
|
||||
ieee80211_tx_status_ext(htt->ar->hw, &status);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
/* we do not own the msdu anymore */
|
||||
|
||||
return 0;
|
||||
|
@ -976,11 +976,11 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
|
||||
ab->hw_rev = hw_rev;
|
||||
platform_set_drvdata(pdev, ab);
|
||||
|
||||
ret = ath11k_ahb_setup_resources(ab);
|
||||
ret = ath11k_core_pre_init(ab);
|
||||
if (ret)
|
||||
goto err_core_free;
|
||||
|
||||
ret = ath11k_core_pre_init(ab);
|
||||
ret = ath11k_ahb_setup_resources(ab);
|
||||
if (ret)
|
||||
goto err_core_free;
|
||||
|
||||
|
@ -1225,23 +1225,23 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = ath11k_mac_register(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret);
|
||||
goto err_pdev_debug;
|
||||
}
|
||||
|
||||
ret = ath11k_dp_pdev_alloc(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed to attach DP pdev: %d\n", ret);
|
||||
goto err_mac_unregister;
|
||||
goto err_pdev_debug;
|
||||
}
|
||||
|
||||
ret = ath11k_mac_register(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret);
|
||||
goto err_dp_pdev_free;
|
||||
}
|
||||
|
||||
ret = ath11k_thermal_register(ab);
|
||||
if (ret) {
|
||||
ath11k_err(ab, "could not register thermal device: %d\n",
|
||||
ret);
|
||||
goto err_dp_pdev_free;
|
||||
goto err_mac_unregister;
|
||||
}
|
||||
|
||||
ret = ath11k_spectral_init(ab);
|
||||
@ -1254,10 +1254,10 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)
|
||||
|
||||
err_thermal_unregister:
|
||||
ath11k_thermal_unregister(ab);
|
||||
err_dp_pdev_free:
|
||||
ath11k_dp_pdev_free(ab);
|
||||
err_mac_unregister:
|
||||
ath11k_mac_unregister(ab);
|
||||
err_dp_pdev_free:
|
||||
ath11k_dp_pdev_free(ab);
|
||||
err_pdev_debug:
|
||||
ath11k_debugfs_pdev_destroy(ab);
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/rhashtable.h>
|
||||
#include <linux/average.h>
|
||||
#include "qmi.h"
|
||||
#include "htc.h"
|
||||
#include "wmi.h"
|
||||
@ -464,6 +465,8 @@ struct ath11k_per_ppdu_tx_stats {
|
||||
u32 retry_bytes;
|
||||
};
|
||||
|
||||
DECLARE_EWMA(avg_rssi, 10, 8)
|
||||
|
||||
struct ath11k_sta {
|
||||
struct ath11k_vif *arvif;
|
||||
|
||||
@ -482,6 +485,7 @@ struct ath11k_sta {
|
||||
u64 rx_duration;
|
||||
u64 tx_duration;
|
||||
u8 rssi_comb;
|
||||
struct ewma_avg_rssi avg_rssi;
|
||||
s8 rssi_beacon;
|
||||
s8 chain_signal[IEEE80211_MAX_CHAINS];
|
||||
struct ath11k_htt_tx_stats *tx_stats;
|
||||
@ -578,8 +582,6 @@ struct ath11k {
|
||||
struct ath11k_pdev_wmi *wmi;
|
||||
struct ath11k_pdev_dp dp;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
u32 ht_cap_info;
|
||||
u32 vht_cap_info;
|
||||
struct ath11k_he ar_he;
|
||||
enum ath11k_state state;
|
||||
bool supports_6ghz;
|
||||
|
@ -23,8 +23,8 @@ enum ath11k_debug_mask {
|
||||
ATH11K_DBG_TESTMODE = 0x00000400,
|
||||
ATH11k_DBG_HAL = 0x00000800,
|
||||
ATH11K_DBG_PCI = 0x00001000,
|
||||
ATH11K_DBG_DP_TX = 0x00001000,
|
||||
ATH11K_DBG_DP_RX = 0x00002000,
|
||||
ATH11K_DBG_DP_TX = 0x00002000,
|
||||
ATH11K_DBG_DP_RX = 0x00004000,
|
||||
ATH11K_DBG_ANY = 0xffffffff,
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/vmalloc.h>
|
||||
@ -1403,6 +1404,8 @@ htt_print_tx_selfgen_ax_stats_tlv(const void *tag_buf,
|
||||
htt_stats_buf->ax_mu_mimo_brpoll_7);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_basic_trigger = %u\n",
|
||||
htt_stats_buf->ax_basic_trigger);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_ulmumimo_trigger = %u\n",
|
||||
htt_stats_buf->ax_ulmumimo_trigger);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_bsr_trigger = %u\n",
|
||||
htt_stats_buf->ax_bsr_trigger);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_mu_bar_trigger = %u\n",
|
||||
@ -1485,6 +1488,8 @@ htt_print_tx_selfgen_ax_err_stats_tlv(const void *tag_buf,
|
||||
htt_stats_buf->ax_mu_mimo_brp7_err);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_basic_trigger_err = %u\n",
|
||||
htt_stats_buf->ax_basic_trigger_err);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_ulmumimo_trigger_err = %u\n",
|
||||
htt_stats_buf->ax_ulmumimo_trigger_err);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_bsr_trigger_err = %u\n",
|
||||
htt_stats_buf->ax_bsr_trigger_err);
|
||||
len += scnprintf(buf + len, buf_len - len, "ax_mu_bar_trigger_err = %u\n",
|
||||
@ -1519,6 +1524,16 @@ htt_print_tx_pdev_mu_mimo_sch_stats_tlv(const void *tag_buf,
|
||||
len += scnprintf(buf + len, buf_len - len, "mu_mimo_ppdu_posted = %u\n\n",
|
||||
htt_stats_buf->mu_mimo_ppdu_posted);
|
||||
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS; i++)
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ac_mu_mimo_sch_posted_per_group_index %u = %u\n",
|
||||
i, htt_stats_buf->ac_mu_mimo_sch_posted_per_grp_sz[i]);
|
||||
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS; i++)
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_mu_mimo_sch_posted_per_group_index %u = %u\n",
|
||||
i, htt_stats_buf->ax_mu_mimo_sch_posted_per_grp_sz[i]);
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "11ac MU_MIMO SCH STATS:\n");
|
||||
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS; i++)
|
||||
@ -1535,10 +1550,34 @@ htt_print_tx_pdev_mu_mimo_sch_stats_tlv(const void *tag_buf,
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "\n11ax OFDMA SCH STATS:\n");
|
||||
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS; i++)
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS; i++) {
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ofdma_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ofdma_sch_nusers[i]);
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_ofdma_basic_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_ofdma_basic_sch_nusers[i]);
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_ofdma_bsr_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_ofdma_bsr_sch_nusers[i]);
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_ofdma_sch_bar_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_ofdma_bar_sch_nusers[i]);
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_ofdma_brp_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_ofdma_brp_sch_nusers[i]);
|
||||
}
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "\n11ax UL MUMIO SCH STATS:\n");
|
||||
|
||||
for (i = 0; i < HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS; i++) {
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_mumimo_basic_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_mumimo_basic_sch_nusers[i]);
|
||||
len += scnprintf(buf + len, buf_len - len,
|
||||
"ax_ul_mumimo_brp_sch_nusers_%u = %u\n",
|
||||
i, htt_stats_buf->ax_ul_mumimo_brp_sch_nusers[i]);
|
||||
}
|
||||
|
||||
if (len >= buf_len)
|
||||
buf[buf_len - 1] = 0;
|
||||
@ -2933,6 +2972,21 @@ static inline void htt_print_rx_pdev_rate_stats_tlv(const void *tag_buf,
|
||||
len += scnprintf(buf + len, buf_len - len, "txbf = %u\n",
|
||||
htt_stats_buf->txbf);
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "\nrx_su_ndpa = %u",
|
||||
htt_stats_buf->rx_su_ndpa);
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_su_txbf_mcs,
|
||||
"rx_11ax_su_txbf_mcs", HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS,
|
||||
"\n");
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "\nrx_mu_ndpa = %u",
|
||||
htt_stats_buf->rx_mu_ndpa);
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_mu_txbf_mcs,
|
||||
"rx_11ax_mu_txbf_mcs", HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS,
|
||||
"\n");
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "\nrx_br_poll = %u",
|
||||
htt_stats_buf->rx_br_poll);
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_legacy_cck_rate,
|
||||
"rx_legacy_cck_rate",
|
||||
HTT_RX_PDEV_STATS_NUM_LEGACY_CCK_STATS, "\n");
|
||||
@ -2995,6 +3049,38 @@ static inline void htt_print_rx_pdev_rate_stats_tlv(const void *tag_buf,
|
||||
len += scnprintf(buf + len, buf_len - len, "\n");
|
||||
}
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulofdma_non_data_nusers,
|
||||
"rx_ulofdma_non_data_nusers", HTT_RX_PDEV_MAX_OFDMA_NUM_USER,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulofdma_data_nusers,
|
||||
"rx_ulofdma_data_nusers", HTT_RX_PDEV_MAX_OFDMA_NUM_USER,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_dl_ofdma_mcs,
|
||||
"rx_11ax_dl_ofdma_mcs", HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_dl_ofdma_ru,
|
||||
"rx_11ax_dl_ofdma_ru", HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulmumimo_non_data_ppdu,
|
||||
"rx_ulmumimo_non_data_ppdu", HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulmumimo_data_ppdu,
|
||||
"rx_ulmumimo_data_ppdu", HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulmumimo_mpdu_ok,
|
||||
"rx_ulmumimo_mpdu_ok", HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER,
|
||||
"\n");
|
||||
|
||||
PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_ulmumimo_mpdu_fail,
|
||||
"rx_ulmumimo_mpdu_fail", HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER,
|
||||
"\n");
|
||||
|
||||
len += scnprintf(buf + len, buf_len - len, "per_chain_rssi_pkt_type = %#x\n",
|
||||
htt_stats_buf->per_chain_rssi_pkt_type);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
/*
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef DEBUG_HTT_STATS_H
|
||||
@ -682,6 +683,7 @@ struct htt_tx_selfgen_ax_stats_tlv {
|
||||
u32 ax_bsr_trigger;
|
||||
u32 ax_mu_bar_trigger;
|
||||
u32 ax_mu_rts_trigger;
|
||||
u32 ax_ulmumimo_trigger;
|
||||
};
|
||||
|
||||
struct htt_tx_selfgen_ac_err_stats_tlv {
|
||||
@ -712,12 +714,14 @@ struct htt_tx_selfgen_ax_err_stats_tlv {
|
||||
u32 ax_bsr_trigger_err;
|
||||
u32 ax_mu_bar_trigger_err;
|
||||
u32 ax_mu_rts_trigger_err;
|
||||
u32 ax_ulmumimo_trigger_err;
|
||||
};
|
||||
|
||||
/* == TX MU STATS == */
|
||||
#define HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS 4
|
||||
#define HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS 8
|
||||
#define HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS 74
|
||||
#define HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS 8
|
||||
|
||||
struct htt_tx_pdev_mu_mimo_sch_stats_tlv {
|
||||
/* mu-mimo sw sched cmd stats */
|
||||
@ -734,6 +738,24 @@ struct htt_tx_pdev_mu_mimo_sch_stats_tlv {
|
||||
u32 ac_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
|
||||
u32 ax_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
|
||||
u32 ax_ofdma_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
|
||||
u32 ax_ul_ofdma_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
|
||||
u32 ax_ul_ofdma_bsr_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
|
||||
u32 ax_ul_ofdma_bar_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
|
||||
u32 ax_ul_ofdma_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS];
|
||||
|
||||
/* UL MU-MIMO */
|
||||
/* ax_ul_mumimo_basic_sch_nusers[i] is the number of basic triggers sent
|
||||
* for (i+1) users
|
||||
*/
|
||||
u32 ax_ul_mumimo_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
|
||||
|
||||
/* ax_ul_mumimo_brp_sch_nusers[i] is the number of brp triggers sent
|
||||
* for (i+1) users
|
||||
*/
|
||||
u32 ax_ul_mumimo_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS];
|
||||
|
||||
u32 ac_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS];
|
||||
u32 ax_mu_mimo_sch_posted_per_grp_sz[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS];
|
||||
};
|
||||
|
||||
struct htt_tx_pdev_mu_mimo_mpdu_stats_tlv {
|
||||
@ -1297,6 +1319,8 @@ struct htt_tx_pdev_rate_stats_tlv {
|
||||
#define HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT
|
||||
#define HTT_RX_PDEV_MAX_OFDMA_NUM_USER 8
|
||||
#define HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS 16
|
||||
#define HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS 6
|
||||
#define HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER 8
|
||||
|
||||
struct htt_rx_pdev_rate_stats_tlv {
|
||||
u32 mac_id__word;
|
||||
@ -1375,6 +1399,21 @@ struct htt_rx_pdev_rate_stats_tlv {
|
||||
u32 per_chain_rssi_pkt_type;
|
||||
s8 rx_per_chain_rssi_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]
|
||||
[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS];
|
||||
|
||||
u32 rx_su_ndpa;
|
||||
u32 rx_11ax_su_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
|
||||
u32 rx_mu_ndpa;
|
||||
u32 rx_11ax_mu_txbf_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
|
||||
u32 rx_br_poll;
|
||||
u32 rx_11ax_dl_ofdma_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS];
|
||||
u32 rx_11ax_dl_ofdma_ru[HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS];
|
||||
|
||||
u32 rx_ulmumimo_non_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
|
||||
u32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
|
||||
u32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
|
||||
u32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER];
|
||||
u32 rx_ulofdma_non_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
|
||||
u32 rx_ulofdma_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
|
||||
};
|
||||
|
||||
/* == RX PDEV/SOC STATS == */
|
||||
|
@ -835,8 +835,9 @@ void ath11k_peer_rx_tid_delete(struct ath11k *ar,
|
||||
HAL_REO_CMD_UPDATE_RX_QUEUE, &cmd,
|
||||
ath11k_dp_rx_tid_del_func);
|
||||
if (ret) {
|
||||
ath11k_err(ar->ab, "failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n",
|
||||
tid, ret);
|
||||
if (ret != -ESHUTDOWN)
|
||||
ath11k_err(ar->ab, "failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n",
|
||||
tid, ret);
|
||||
dma_unmap_single(ar->ab->dev, rx_tid->paddr, rx_tid->size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
kfree(rx_tid->vaddr);
|
||||
@ -2765,6 +2766,9 @@ static void ath11k_dp_rx_update_peer_stats(struct ath11k_sta *arsta,
|
||||
if (!rx_stats)
|
||||
return;
|
||||
|
||||
arsta->rssi_comb = ppdu_info->rssi_comb;
|
||||
ewma_avg_rssi_add(&arsta->avg_rssi, ppdu_info->rssi_comb);
|
||||
|
||||
num_msdu = ppdu_info->tcp_msdu_count + ppdu_info->tcp_ack_msdu_count +
|
||||
ppdu_info->udp_msdu_count + ppdu_info->other_msdu_count;
|
||||
|
||||
|
@ -757,7 +757,7 @@ void ath11k_hal_reo_qdesc_setup(void *vaddr, int tid, u32 ba_window_size,
|
||||
|
||||
/* TODO: HW queue descriptors are currently allocated for max BA
|
||||
* window size for all QOS TIDs so that same descriptor can be used
|
||||
* later when ADDBA request is recevied. This should be changed to
|
||||
* later when ADDBA request is received. This should be changed to
|
||||
* allocate HW queue descriptors based on BA window size being
|
||||
* negotiated (0 for non BA cases), and reallocate when BA window
|
||||
* size changes and also send WMI message to FW to change the REO
|
||||
|
@ -258,8 +258,10 @@ void ath11k_htc_tx_completion_handler(struct ath11k_base *ab,
|
||||
u8 eid;
|
||||
|
||||
eid = ATH11K_SKB_CB(skb)->eid;
|
||||
if (eid >= ATH11K_HTC_EP_COUNT)
|
||||
if (eid >= ATH11K_HTC_EP_COUNT) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
ep = &htc->endpoint[eid];
|
||||
spin_lock_bh(&htc->tx_lock);
|
||||
|
@ -4479,6 +4479,7 @@ static int ath11k_mac_station_add(struct ath11k *ar,
|
||||
}
|
||||
}
|
||||
|
||||
ewma_avg_rssi_init(&arsta->avg_rssi);
|
||||
return 0;
|
||||
|
||||
free_tx_stats:
|
||||
@ -7799,6 +7800,7 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct ath11k_vif *arvif = (void *)vif->drv_priv;
|
||||
struct cfg80211_chan_def def;
|
||||
struct ath11k_pdev_cap *cap;
|
||||
struct ath11k *ar = arvif->ar;
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
@ -7819,10 +7821,11 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
|
||||
return -EPERM;
|
||||
|
||||
band = def.chan->band;
|
||||
cap = &ar->pdev->cap;
|
||||
ht_mcs_mask = mask->control[band].ht_mcs;
|
||||
vht_mcs_mask = mask->control[band].vht_mcs;
|
||||
he_mcs_mask = mask->control[band].he_mcs;
|
||||
ldpc = !!(ar->ht_cap_info & WMI_HT_CAP_LDPC);
|
||||
ldpc = !!(cap->band[band].ht_cap_info & WMI_HT_CAP_TX_LDPC);
|
||||
|
||||
sgi = mask->control[band].gi;
|
||||
if (sgi == NL80211_TXRATE_FORCE_LGI)
|
||||
@ -7832,7 +7835,7 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
|
||||
he_ltf = mask->control[band].he_ltf;
|
||||
|
||||
/* mac80211 doesn't support sending a fixed HT/VHT MCS alone, rather it
|
||||
* requires passing atleast one of used basic rates along with them.
|
||||
* requires passing at least one of used basic rates along with them.
|
||||
* Fixed rate setting across different preambles(legacy, HT, VHT) is
|
||||
* not supported by the FW. Hence use of FIXED_RATE vdev param is not
|
||||
* suitable for setting single HT/VHT rates.
|
||||
@ -8161,6 +8164,10 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
sinfo->signal = db2dbm ? signal : signal + ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
|
||||
}
|
||||
|
||||
sinfo->signal_avg = ewma_avg_rssi_read(&arsta->avg_rssi) +
|
||||
ATH11K_DEFAULT_NOISE_FLOOR;
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
@ -8297,11 +8304,15 @@ static int ath11k_mac_op_set_bios_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar)
|
||||
{
|
||||
struct ath11k *ar = hw->priv;
|
||||
const struct cfg80211_sar_sub_specs *sspec = sar->sub_specs;
|
||||
const struct cfg80211_sar_sub_specs *sspec;
|
||||
int ret, index;
|
||||
u8 *sar_tbl;
|
||||
u32 i;
|
||||
|
||||
if (!sar || sar->type != NL80211_SAR_TYPE_POWER ||
|
||||
sar->num_sub_specs == 0)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (!test_bit(WMI_TLV_SERVICE_BIOS_SAR_SUPPORT, ar->ab->wmi_ab.svc_map) ||
|
||||
@ -8310,12 +8321,6 @@ static int ath11k_mac_op_set_bios_sar_specs(struct ieee80211_hw *hw,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!sar || sar->type != NL80211_SAR_TYPE_POWER ||
|
||||
sar->num_sub_specs == 0) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = ath11k_wmi_pdev_set_bios_geo_table_param(ar);
|
||||
if (ret) {
|
||||
ath11k_warn(ar->ab, "failed to set geo table: %d\n", ret);
|
||||
@ -8328,6 +8333,7 @@ static int ath11k_mac_op_set_bios_sar_specs(struct ieee80211_hw *hw,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
sspec = sar->sub_specs;
|
||||
for (i = 0; i < sar->num_sub_specs; i++) {
|
||||
if (sspec->freq_range_index >= (BIOS_SAR_TABLE_LEN >> 1)) {
|
||||
ath11k_warn(ar->ab, "Ignore bad frequency index %u, max allowed %u\n",
|
||||
|
@ -920,7 +920,9 @@ qmi_fail:
|
||||
static void ath11k_pci_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
struct ath11k_base *ab = pci_get_drvdata(pdev);
|
||||
struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
|
||||
|
||||
ath11k_pci_set_irq_affinity_hint(ab_pci, NULL);
|
||||
ath11k_pci_power_down(ab);
|
||||
}
|
||||
|
||||
|
@ -2229,13 +2229,13 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
||||
|
||||
if (resp.fw_version_info_valid) {
|
||||
ab->qmi.target.fw_version = resp.fw_version_info.fw_version;
|
||||
strlcpy(ab->qmi.target.fw_build_timestamp,
|
||||
strscpy(ab->qmi.target.fw_build_timestamp,
|
||||
resp.fw_version_info.fw_build_timestamp,
|
||||
sizeof(ab->qmi.target.fw_build_timestamp));
|
||||
}
|
||||
|
||||
if (resp.fw_build_id_valid)
|
||||
strlcpy(ab->qmi.target.fw_build_id, resp.fw_build_id,
|
||||
strscpy(ab->qmi.target.fw_build_id, resp.fw_build_id,
|
||||
sizeof(ab->qmi.target.fw_build_id));
|
||||
|
||||
if (resp.eeprom_read_timeout_valid) {
|
||||
@ -2659,7 +2659,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
|
||||
req->host_version_valid = 1;
|
||||
strlcpy(req->host_version, ATH11K_HOST_VERSION_STRING,
|
||||
strscpy(req->host_version, ATH11K_HOST_VERSION_STRING,
|
||||
sizeof(req->host_version));
|
||||
|
||||
req->tgt_cfg_valid = 1;
|
||||
|
@ -6563,7 +6563,7 @@ static int ath11k_reg_chan_list_event(struct ath11k_base *ab, struct sk_buff *sk
|
||||
|
||||
fallback:
|
||||
/* Fallback to older reg (by sending previous country setting
|
||||
* again if fw has succeded and we failed to process here.
|
||||
* again if fw has succeeded and we failed to process here.
|
||||
* The Regdomain should be uniform across driver and fw. Since the
|
||||
* FW has processed the command and sent a success status, we expect
|
||||
* this function to succeed as well. If it doesn't, CTRY needs to be
|
||||
|
@ -3136,7 +3136,7 @@ ath5k_combine_pwr_to_pdadc_curves(struct ath5k_hw *ah,
|
||||
pdadc_n = gain_boundaries[pdg] + pd_gain_overlap - pwr_min[pdg];
|
||||
/* Limit it to be inside pwr range */
|
||||
table_size = pwr_max[pdg] - pwr_min[pdg];
|
||||
max_idx = (pdadc_n < table_size) ? pdadc_n : table_size;
|
||||
max_idx = min(pdadc_n, table_size);
|
||||
|
||||
/* Fill pdadc_out table */
|
||||
while (pdadc_0 < max_idx && pdadc_i < 128)
|
||||
|
@ -1278,7 +1278,7 @@ struct wmi_snr_threshold_params_cmd {
|
||||
/* "alpha" */
|
||||
u8 weight;
|
||||
|
||||
/* lowest of uppper */
|
||||
/* lowest of upper */
|
||||
u8 thresh_above1_val;
|
||||
|
||||
u8 thresh_above2_val;
|
||||
|
@ -246,7 +246,7 @@ ath9k_postprocess_radar_event(struct ath_softc *sc,
|
||||
DFS_STAT_INC(sc, dc_phy_errors);
|
||||
|
||||
/* when both are present use stronger one */
|
||||
rssi = (ard->rssi < ard->ext_rssi) ? ard->ext_rssi : ard->rssi;
|
||||
rssi = max(ard->rssi, ard->ext_rssi);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user