Merge tag 'wireless-next-2022-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Johannes Berg says: ==================== A fairly large set of updates for next, highlights: ath10k * ethernet frame format support rtw89 * TDLS support cfg80211/mac80211 * airtime fairness fixes * EHT support continued, especially in AP mode * initial (and still major) rework for multi-link operation (MLO) from 802.11be/wifi 7 As usual, also many small updates/cleanups/fixes/etc. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1311,7 +1311,7 @@ static int adm8211_config(struct ieee80211_hw *dev, u32 changed)
|
||||
static void adm8211_bss_info_changed(struct ieee80211_hw *dev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct adm8211_priv *priv = dev->priv;
|
||||
|
||||
|
||||
@@ -1256,14 +1256,14 @@ static int ar5523_create_connection(struct ar5523 *ar,
|
||||
sizeof(create), 0);
|
||||
}
|
||||
|
||||
static int ar5523_write_associd(struct ar5523 *ar,
|
||||
struct ieee80211_bss_conf *bss)
|
||||
static int ar5523_write_associd(struct ar5523 *ar, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ieee80211_bss_conf *bss = &vif->bss_conf;
|
||||
struct ar5523_cmd_set_associd associd;
|
||||
|
||||
memset(&associd, 0, sizeof(associd));
|
||||
associd.defaultrateix = cpu_to_be32(0); /* XXX */
|
||||
associd.associd = cpu_to_be32(bss->aid);
|
||||
associd.associd = cpu_to_be32(vif->cfg.aid);
|
||||
associd.timoffset = cpu_to_be32(0x3b); /* XXX */
|
||||
memcpy(associd.bssid, bss->bssid, ETH_ALEN);
|
||||
return ar5523_cmd_write(ar, WDCMSG_WRITE_ASSOCID, &associd,
|
||||
@@ -1273,7 +1273,7 @@ static int ar5523_write_associd(struct ar5523 *ar,
|
||||
static void ar5523_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct ar5523 *ar = hw->priv;
|
||||
int error;
|
||||
@@ -1284,7 +1284,7 @@ static void ar5523_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (!(changed & BSS_CHANGED_ASSOC))
|
||||
goto out_unlock;
|
||||
|
||||
if (bss->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
error = ar5523_create_connection(ar, vif, bss);
|
||||
if (error) {
|
||||
ar5523_err(ar, "could not create connection\n");
|
||||
@@ -1297,7 +1297,7 @@ static void ar5523_bss_info_changed(struct ieee80211_hw *hw,
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
error = ar5523_write_associd(ar, bss);
|
||||
error = ar5523_write_associd(ar, vif);
|
||||
if (error) {
|
||||
ar5523_err(ar, "could not set association\n");
|
||||
goto out_unlock;
|
||||
|
||||
@@ -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;
|
||||
@@ -3840,7 +3840,7 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar,
|
||||
switch (txrate.flags) {
|
||||
case WMI_RATE_PREAMBLE_OFDM:
|
||||
if (arsta->arvif && arsta->arvif->vif)
|
||||
conf = rcu_dereference(arsta->arvif->vif->chanctx_conf);
|
||||
conf = rcu_dereference(arsta->arvif->vif->bss_conf.chanctx_conf);
|
||||
if (conf && conf->def.chan->band == NL80211_BAND_5GHZ)
|
||||
arsta->tx_info.status.rates[0].idx = rate_idx - 4;
|
||||
break;
|
||||
@@ -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,
|
||||
|
||||
@@ -659,7 +659,7 @@ int ath10k_mac_vif_chan(struct ieee80211_vif *vif,
|
||||
struct ieee80211_chanctx_conf *conf;
|
||||
|
||||
rcu_read_lock();
|
||||
conf = rcu_dereference(vif->chanctx_conf);
|
||||
conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (!conf) {
|
||||
rcu_read_unlock();
|
||||
return -ENOENT;
|
||||
@@ -1509,8 +1509,8 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
|
||||
arg.channel.chan_radar =
|
||||
!!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
|
||||
} else if (arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
|
||||
arg.ssid = arvif->vif->bss_conf.ssid;
|
||||
arg.ssid_len = arvif->vif->bss_conf.ssid_len;
|
||||
arg.ssid = arvif->vif->cfg.ssid;
|
||||
arg.ssid_len = arvif->vif->cfg.ssid_len;
|
||||
}
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_MAC,
|
||||
@@ -1630,7 +1630,7 @@ static int ath10k_mac_setup_bcn_tmpl(struct ath10k_vif *arvif)
|
||||
arvif->vdev_type != WMI_VDEV_TYPE_IBSS)
|
||||
return 0;
|
||||
|
||||
bcn = ieee80211_beacon_get_template(hw, vif, &offs);
|
||||
bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
|
||||
if (!bcn) {
|
||||
ath10k_warn(ar, "failed to get beacon template from mac80211\n");
|
||||
return -EPERM;
|
||||
@@ -1823,8 +1823,7 @@ static void ath10k_control_beaconing(struct ath10k_vif *arvif,
|
||||
}
|
||||
|
||||
static void ath10k_control_ibss(struct ath10k_vif *arvif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
const u8 self_peer[ETH_ALEN])
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ath10k *ar = arvif->ar;
|
||||
u32 vdev_param;
|
||||
@@ -1832,7 +1831,7 @@ static void ath10k_control_ibss(struct ath10k_vif *arvif,
|
||||
|
||||
lockdep_assert_held(&arvif->ar->conf_mutex);
|
||||
|
||||
if (!info->ibss_joined) {
|
||||
if (!vif->cfg.ibss_joined) {
|
||||
if (is_zero_ether_addr(arvif->bssid))
|
||||
return;
|
||||
|
||||
@@ -2028,7 +2027,7 @@ static void ath10k_mac_vif_ap_csa_count_down(struct ath10k_vif *arvif)
|
||||
if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
|
||||
return;
|
||||
|
||||
if (!vif->csa_active)
|
||||
if (!vif->bss_conf.csa_active)
|
||||
return;
|
||||
|
||||
if (!arvif->is_up)
|
||||
@@ -2163,7 +2162,7 @@ static void ath10k_peer_assoc_h_basic(struct ath10k *ar,
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION)
|
||||
aid = vif->bss_conf.aid;
|
||||
aid = vif->cfg.aid;
|
||||
else
|
||||
aid = sta->aid;
|
||||
|
||||
@@ -2193,7 +2192,8 @@ static void ath10k_peer_assoc_h_crypto(struct ath10k *ar,
|
||||
return;
|
||||
|
||||
bss = cfg80211_get_bss(ar->hw->wiphy, def.chan, info->bssid,
|
||||
info->ssid_len ? info->ssid : NULL, info->ssid_len,
|
||||
vif->cfg.ssid_len ? vif->cfg.ssid : NULL,
|
||||
vif->cfg.ssid_len,
|
||||
IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
|
||||
if (bss) {
|
||||
const struct cfg80211_bss_ies *ies;
|
||||
@@ -3118,11 +3118,11 @@ static void ath10k_bss_assoc(struct ieee80211_hw *hw,
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_MAC,
|
||||
"mac vdev %d up (associated) bssid %pM aid %d\n",
|
||||
arvif->vdev_id, bss_conf->bssid, bss_conf->aid);
|
||||
arvif->vdev_id, bss_conf->bssid, vif->cfg.aid);
|
||||
|
||||
WARN_ON(arvif->is_up);
|
||||
|
||||
arvif->aid = bss_conf->aid;
|
||||
arvif->aid = vif->cfg.aid;
|
||||
ether_addr_copy(arvif->bssid, bss_conf->bssid);
|
||||
|
||||
ret = ath10k_wmi_pdev_set_param(ar,
|
||||
@@ -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.
|
||||
@@ -6034,7 +6068,7 @@ static void ath10k_recalculate_mgmt_rate(struct ath10k *ar,
|
||||
static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
||||
@@ -6048,7 +6082,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (changed & BSS_CHANGED_IBSS)
|
||||
ath10k_control_ibss(arvif, info, vif->addr);
|
||||
ath10k_control_ibss(arvif, vif);
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_INT) {
|
||||
arvif->beacon_interval = info->beacon_int;
|
||||
@@ -6113,9 +6147,10 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_SSID &&
|
||||
vif->type == NL80211_IFTYPE_AP) {
|
||||
arvif->u.ap.ssid_len = info->ssid_len;
|
||||
if (info->ssid_len)
|
||||
memcpy(arvif->u.ap.ssid, info->ssid, info->ssid_len);
|
||||
arvif->u.ap.ssid_len = vif->cfg.ssid_len;
|
||||
if (vif->cfg.ssid_len)
|
||||
memcpy(arvif->u.ap.ssid, vif->cfg.ssid,
|
||||
vif->cfg.ssid_len);
|
||||
arvif->u.ap.hidden_ssid = info->hidden_ssid;
|
||||
}
|
||||
|
||||
@@ -6192,7 +6227,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
if (info->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
/* Workaround: Make sure monitor vdev is not running
|
||||
* when associating to prevent some firmware revisions
|
||||
* (e.g. 10.1 and 10.2) from crashing.
|
||||
@@ -8798,7 +8833,7 @@ ath10k_mac_change_chanctx_cnt_iter(void *data, u8 *mac,
|
||||
{
|
||||
struct ath10k_mac_change_chanctx_arg *arg = data;
|
||||
|
||||
if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
|
||||
if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
|
||||
return;
|
||||
|
||||
arg->n_vifs++;
|
||||
@@ -8811,7 +8846,7 @@ ath10k_mac_change_chanctx_fill_iter(void *data, u8 *mac,
|
||||
struct ath10k_mac_change_chanctx_arg *arg = data;
|
||||
struct ieee80211_chanctx_conf *ctx;
|
||||
|
||||
ctx = rcu_access_pointer(vif->chanctx_conf);
|
||||
ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
|
||||
if (ctx != arg->ctx)
|
||||
return;
|
||||
|
||||
@@ -8884,6 +8919,7 @@ unlock:
|
||||
static int
|
||||
ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
@@ -8963,6 +8999,7 @@ err:
|
||||
static void
|
||||
ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct ath10k *ar = hw->priv;
|
||||
@@ -9375,6 +9412,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 +10082,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 +10273,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;
|
||||
|
||||
@@ -205,7 +205,7 @@ static int ath10k_wmi_tlv_event_bcn_tx_status(struct ath10k *ar,
|
||||
}
|
||||
|
||||
arvif = ath10k_get_arvif(ar, vdev_id);
|
||||
if (arvif && arvif->is_up && arvif->vif->csa_active)
|
||||
if (arvif && arvif->is_up && arvif->vif->bss_conf.csa_active)
|
||||
ieee80211_queue_work(ar->hw, &arvif->ap_csa_work);
|
||||
|
||||
kfree(tb);
|
||||
|
||||
@@ -3882,13 +3882,13 @@ void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
|
||||
* Once CSA counter is completed stop sending beacons until
|
||||
* actual channel switch is done
|
||||
*/
|
||||
if (arvif->vif->csa_active &&
|
||||
if (arvif->vif->bss_conf.csa_active &&
|
||||
ieee80211_beacon_cntdwn_is_complete(arvif->vif)) {
|
||||
ieee80211_csa_finish(arvif->vif);
|
||||
continue;
|
||||
}
|
||||
|
||||
bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
|
||||
bcn = ieee80211_beacon_get(ar->hw, arvif->vif, 0);
|
||||
if (!bcn) {
|
||||
ath10k_warn(ar, "could not get mac80211 beacon\n");
|
||||
continue;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1165,7 +1165,7 @@ void ath11k_hal_srng_shadow_update_hp_tp(struct ath11k_base *ab,
|
||||
lockdep_assert_held(&srng->lock);
|
||||
|
||||
/* check whether the ring is emptry. Update the shadow
|
||||
* HP only when then ring isn't' empty.
|
||||
* HP only when then ring isn't empty.
|
||||
*/
|
||||
if (srng->ring_dir == HAL_SRNG_DIR_SRC &&
|
||||
*srng->u.src_ring.tp_addr != srng->u.src_ring.hp)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -505,7 +505,7 @@ static int ath11k_mac_vif_chan(struct ieee80211_vif *vif,
|
||||
struct ieee80211_chanctx_conf *conf;
|
||||
|
||||
rcu_read_lock();
|
||||
conf = rcu_dereference(vif->chanctx_conf);
|
||||
conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (!conf) {
|
||||
rcu_read_unlock();
|
||||
return -ENOENT;
|
||||
@@ -1362,7 +1362,7 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif)
|
||||
if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
|
||||
return 0;
|
||||
|
||||
bcn = ieee80211_beacon_get_template(hw, vif, &offs);
|
||||
bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
|
||||
if (!bcn) {
|
||||
ath11k_warn(ab, "failed to get beacon template from mac80211\n");
|
||||
return -EPERM;
|
||||
@@ -1398,10 +1398,10 @@ void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif)
|
||||
{
|
||||
struct ieee80211_vif *vif = arvif->vif;
|
||||
|
||||
if (!vif->color_change_active && !arvif->bcca_zero_sent)
|
||||
if (!vif->bss_conf.color_change_active && !arvif->bcca_zero_sent)
|
||||
return;
|
||||
|
||||
if (vif->color_change_active && ieee80211_beacon_cntdwn_is_complete(vif)) {
|
||||
if (vif->bss_conf.color_change_active && ieee80211_beacon_cntdwn_is_complete(vif)) {
|
||||
arvif->bcca_zero_sent = true;
|
||||
ieee80211_color_change_finish(vif);
|
||||
return;
|
||||
@@ -1409,7 +1409,7 @@ void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif)
|
||||
|
||||
arvif->bcca_zero_sent = false;
|
||||
|
||||
if (vif->color_change_active)
|
||||
if (vif->bss_conf.color_change_active)
|
||||
ieee80211_beacon_update_cntdwn(vif);
|
||||
ath11k_mac_setup_bcn_tmpl(arvif);
|
||||
}
|
||||
@@ -1539,7 +1539,7 @@ static void ath11k_peer_assoc_h_basic(struct ath11k *ar,
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION)
|
||||
aid = vif->bss_conf.aid;
|
||||
aid = vif->cfg.aid;
|
||||
else
|
||||
aid = sta->aid;
|
||||
|
||||
@@ -2749,7 +2749,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
|
||||
|
||||
WARN_ON(arvif->is_up);
|
||||
|
||||
arvif->aid = bss_conf->aid;
|
||||
arvif->aid = vif->cfg.aid;
|
||||
ether_addr_copy(arvif->bssid, bss_conf->bssid);
|
||||
|
||||
ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, arvif->aid, arvif->bssid);
|
||||
@@ -2764,7 +2764,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
|
||||
"mac vdev %d up (associated) bssid %pM aid %d\n",
|
||||
arvif->vdev_id, bss_conf->bssid, bss_conf->aid);
|
||||
arvif->vdev_id, bss_conf->bssid, vif->cfg.aid);
|
||||
|
||||
spin_lock_bh(&ar->ab->base_lock);
|
||||
|
||||
@@ -3091,7 +3091,7 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
|
||||
static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct ath11k *ar = hw->priv;
|
||||
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
||||
@@ -3185,9 +3185,10 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_SSID &&
|
||||
vif->type == NL80211_IFTYPE_AP) {
|
||||
arvif->u.ap.ssid_len = info->ssid_len;
|
||||
if (info->ssid_len)
|
||||
memcpy(arvif->u.ap.ssid, info->ssid, info->ssid_len);
|
||||
arvif->u.ap.ssid_len = vif->cfg.ssid_len;
|
||||
if (vif->cfg.ssid_len)
|
||||
memcpy(arvif->u.ap.ssid, vif->cfg.ssid,
|
||||
vif->cfg.ssid_len);
|
||||
arvif->u.ap.hidden_ssid = info->hidden_ssid;
|
||||
}
|
||||
|
||||
@@ -3275,7 +3276,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
if (info->assoc)
|
||||
if (vif->cfg.assoc)
|
||||
ath11k_bss_assoc(hw, vif, info);
|
||||
else
|
||||
ath11k_bss_disassoc(hw, vif);
|
||||
@@ -3406,14 +3407,15 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
ath11k_mac_fils_discovery(arvif, info);
|
||||
|
||||
if (changed & BSS_CHANGED_ARP_FILTER) {
|
||||
ipv4_cnt = min(info->arp_addr_cnt, ATH11K_IPV4_MAX_COUNT);
|
||||
memcpy(arvif->arp_ns_offload.ipv4_addr, info->arp_addr_list,
|
||||
ipv4_cnt = min(vif->cfg.arp_addr_cnt, ATH11K_IPV4_MAX_COUNT);
|
||||
memcpy(arvif->arp_ns_offload.ipv4_addr,
|
||||
vif->cfg.arp_addr_list,
|
||||
ipv4_cnt * sizeof(u32));
|
||||
memcpy(arvif->arp_ns_offload.mac_addr, vif->addr, ETH_ALEN);
|
||||
arvif->arp_ns_offload.ipv4_count = ipv4_cnt;
|
||||
|
||||
ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac arp_addr_cnt %d vif->addr %pM, offload_addr %pI4\n",
|
||||
info->arp_addr_cnt,
|
||||
vif->cfg.arp_addr_cnt,
|
||||
vif->addr, arvif->arp_ns_offload.ipv4_addr);
|
||||
}
|
||||
|
||||
@@ -4479,6 +4481,7 @@ static int ath11k_mac_station_add(struct ath11k *ar,
|
||||
}
|
||||
}
|
||||
|
||||
ewma_avg_rssi_init(&arsta->avg_rssi);
|
||||
return 0;
|
||||
|
||||
free_tx_stats:
|
||||
@@ -6848,7 +6851,7 @@ ath11k_mac_change_chanctx_cnt_iter(void *data, u8 *mac,
|
||||
{
|
||||
struct ath11k_mac_change_chanctx_arg *arg = data;
|
||||
|
||||
if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
|
||||
if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
|
||||
return;
|
||||
|
||||
arg->n_vifs++;
|
||||
@@ -6861,7 +6864,7 @@ ath11k_mac_change_chanctx_fill_iter(void *data, u8 *mac,
|
||||
struct ath11k_mac_change_chanctx_arg *arg = data;
|
||||
struct ieee80211_chanctx_conf *ctx;
|
||||
|
||||
ctx = rcu_access_pointer(vif->chanctx_conf);
|
||||
ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
|
||||
if (ctx != arg->ctx)
|
||||
return;
|
||||
|
||||
@@ -7069,6 +7072,7 @@ static int ath11k_start_vdev_delay(struct ieee80211_hw *hw,
|
||||
static int
|
||||
ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct ath11k *ar = hw->priv;
|
||||
@@ -7158,6 +7162,7 @@ out:
|
||||
static void
|
||||
ath11k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct ath11k *ar = hw->priv;
|
||||
@@ -7799,6 +7804,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 +7825,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 +7839,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 +8168,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 +8308,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 +8325,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 +8337,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;
|
||||
|
||||
@@ -1700,7 +1700,7 @@ int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
|
||||
cmd->vdev_id = vdev_id;
|
||||
cmd->tim_ie_offset = offs->tim_offset;
|
||||
|
||||
if (vif->csa_active) {
|
||||
if (vif->bss_conf.csa_active) {
|
||||
cmd->csa_switch_count_offset = offs->cntdwn_counter_offs[0];
|
||||
cmd->ext_csa_switch_count_offset = offs->cntdwn_counter_offs[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
|
||||
@@ -7475,7 +7475,7 @@ ath11k_wmi_process_csa_switch_count_event(struct ath11k_base *ab,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (arvif->is_up && arvif->vif->csa_active)
|
||||
if (arvif->is_up && arvif->vif->bss_conf.csa_active)
|
||||
ieee80211_csa_finish(arvif->vif);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -1946,7 +1946,7 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
goto out;
|
||||
}
|
||||
|
||||
skb = ieee80211_beacon_get(hw, vif);
|
||||
skb = ieee80211_beacon_get(hw, vif, 0);
|
||||
|
||||
if (!skb) {
|
||||
ret = -ENOMEM;
|
||||
|
||||
@@ -250,7 +250,7 @@ unlock:
|
||||
|
||||
static void
|
||||
ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf, u32 changes)
|
||||
struct ieee80211_bss_conf *bss_conf, u64 changes)
|
||||
{
|
||||
struct ath5k_vif *avf = (void *)vif->drv_priv;
|
||||
struct ath5k_hw *ah = hw->priv;
|
||||
@@ -278,9 +278,9 @@ ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
}
|
||||
|
||||
if (changes & BSS_CHANGED_ASSOC) {
|
||||
avf->assoc = bss_conf->assoc;
|
||||
if (bss_conf->assoc)
|
||||
ah->assoc = bss_conf->assoc;
|
||||
avf->assoc = vif->cfg.assoc;
|
||||
if (vif->cfg.assoc)
|
||||
ah->assoc = vif->cfg.assoc;
|
||||
else
|
||||
ah->assoc = ath5k_any_vif_assoc(ah);
|
||||
|
||||
@@ -288,11 +288,11 @@ ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
ath5k_set_beacon_filter(hw, ah->assoc);
|
||||
ath5k_hw_set_ledstate(ah, ah->assoc ?
|
||||
AR5K_LED_ASSOC : AR5K_LED_INIT);
|
||||
if (bss_conf->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
ATH5K_DBG(ah, ATH5K_DEBUG_ANY,
|
||||
"Bss Info ASSOC %d, bssid: %pM\n",
|
||||
bss_conf->aid, common->curbssid);
|
||||
common->curaid = bss_conf->aid;
|
||||
vif->cfg.aid, common->curbssid);
|
||||
common->curaid = vif->cfg.aid;
|
||||
ath5k_hw_set_bssid(ah);
|
||||
/* Once ANI is available you would start it here */
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -807,7 +807,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
|
||||
cfg80211_put_bss(ar->wiphy, bss);
|
||||
} else if (vif->sme_state == SME_CONNECTED) {
|
||||
struct cfg80211_roam_info roam_info = {
|
||||
.bss = bss,
|
||||
.links[0].bss = bss,
|
||||
.req_ie = assoc_req_ie,
|
||||
.req_ie_len = assoc_req_len,
|
||||
.resp_ie = assoc_resp_ie,
|
||||
@@ -1119,7 +1119,7 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
|
||||
NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
|
||||
|
||||
mutex_lock(&vif->wdev.mtx);
|
||||
cfg80211_ch_switch_notify(vif->ndev, &chandef);
|
||||
cfg80211_ch_switch_notify(vif->ndev, &chandef, 0);
|
||||
mutex_unlock(&vif->wdev.mtx);
|
||||
}
|
||||
|
||||
@@ -2967,7 +2967,8 @@ static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
return ath6kl_set_ies(vif, beacon);
|
||||
}
|
||||
|
||||
static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev)
|
||||
static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct ath6kl *ar = ath6kl_priv(dev);
|
||||
struct ath6kl_vif *vif = netdev_priv(dev);
|
||||
@@ -3368,6 +3369,7 @@ static int ath6kl_cfg80211_sscan_stop(struct wiphy *wiphy,
|
||||
|
||||
static int ath6kl_cfg80211_set_bitrate(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
unsigned int link_id,
|
||||
const u8 *addr,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ struct ath6kl_usb {
|
||||
u8 *diag_cmd_buffer;
|
||||
u8 *diag_resp_buffer;
|
||||
struct ath6kl *ar;
|
||||
struct workqueue_struct *wq;
|
||||
};
|
||||
|
||||
/* usb urb object */
|
||||
@@ -478,7 +479,7 @@ static void ath6kl_usb_flush_all(struct ath6kl_usb *ar_usb)
|
||||
* Flushing any pending I/O may schedule work this call will block
|
||||
* until all scheduled work runs to completion.
|
||||
*/
|
||||
flush_scheduled_work();
|
||||
flush_workqueue(ar_usb->wq);
|
||||
}
|
||||
|
||||
static void ath6kl_usb_start_recv_pipes(struct ath6kl_usb *ar_usb)
|
||||
@@ -544,7 +545,7 @@ static void ath6kl_usb_recv_complete(struct urb *urb)
|
||||
|
||||
/* note: queue implements a lock */
|
||||
skb_queue_tail(&pipe->io_comp_queue, skb);
|
||||
schedule_work(&pipe->io_complete_work);
|
||||
queue_work(pipe->ar_usb->wq, &pipe->io_complete_work);
|
||||
|
||||
cleanup_recv_urb:
|
||||
ath6kl_usb_cleanup_recv_urb(urb_context);
|
||||
@@ -579,7 +580,7 @@ static void ath6kl_usb_usb_transmit_complete(struct urb *urb)
|
||||
|
||||
/* note: queue implements a lock */
|
||||
skb_queue_tail(&pipe->io_comp_queue, skb);
|
||||
schedule_work(&pipe->io_complete_work);
|
||||
queue_work(pipe->ar_usb->wq, &pipe->io_complete_work);
|
||||
}
|
||||
|
||||
static void ath6kl_usb_io_comp_work(struct work_struct *work)
|
||||
@@ -619,6 +620,7 @@ static void ath6kl_usb_destroy(struct ath6kl_usb *ar_usb)
|
||||
|
||||
kfree(ar_usb->diag_cmd_buffer);
|
||||
kfree(ar_usb->diag_resp_buffer);
|
||||
destroy_workqueue(ar_usb->wq);
|
||||
|
||||
kfree(ar_usb);
|
||||
}
|
||||
@@ -631,9 +633,15 @@ static struct ath6kl_usb *ath6kl_usb_create(struct usb_interface *interface)
|
||||
int status = 0;
|
||||
int i;
|
||||
|
||||
/* ath6kl_usb_destroy() needs ar_usb != NULL && ar_usb->wq != NULL. */
|
||||
ar_usb = kzalloc(sizeof(struct ath6kl_usb), GFP_KERNEL);
|
||||
if (ar_usb == NULL)
|
||||
goto fail_ath6kl_usb_create;
|
||||
return NULL;
|
||||
ar_usb->wq = alloc_workqueue("ath6kl_wq", 0, 0);
|
||||
if (!ar_usb->wq) {
|
||||
kfree(ar_usb);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
usb_set_intfdata(interface, ar_usb);
|
||||
spin_lock_init(&(ar_usb->cs_lock));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -498,7 +498,7 @@ static void ar9002_hw_spectral_scan_config(struct ath_hw *ah,
|
||||
else
|
||||
REG_CLR_BIT(ah, AR_PHY_SPECTRAL_SCAN, repeat_bit);
|
||||
|
||||
/* on AR92xx, the highest bit of count will make the the chip send
|
||||
/* on AR92xx, the highest bit of count will make the chip send
|
||||
* spectral samples endlessly. Check if this really was intended,
|
||||
* and fix otherwise.
|
||||
*/
|
||||
|
||||
@@ -135,7 +135,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw,
|
||||
bf->bf_mpdu = NULL;
|
||||
}
|
||||
|
||||
skb = ieee80211_beacon_get(hw, vif);
|
||||
skb = ieee80211_beacon_get(hw, vif, 0);
|
||||
if (skb == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -362,7 +362,7 @@ static void ath9k_set_tsfadjust(struct ath_softc *sc,
|
||||
|
||||
bool ath9k_csa_is_finished(struct ath_softc *sc, struct ieee80211_vif *vif)
|
||||
{
|
||||
if (!vif || !vif->csa_active)
|
||||
if (!vif || !vif->bss_conf.csa_active)
|
||||
return false;
|
||||
|
||||
if (!ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
@@ -585,8 +585,9 @@ static void ath9k_beacon_config_adhoc(struct ath_softc *sc,
|
||||
|
||||
static void ath9k_cache_beacon_config(struct ath_softc *sc,
|
||||
struct ath_chanctx *ctx,
|
||||
struct ieee80211_bss_conf *bss_conf)
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ath_beacon_config *cur_conf = &ctx->beacon;
|
||||
|
||||
@@ -596,7 +597,7 @@ static void ath9k_cache_beacon_config(struct ath_softc *sc,
|
||||
cur_conf->beacon_interval = bss_conf->beacon_int;
|
||||
cur_conf->dtim_period = bss_conf->dtim_period;
|
||||
cur_conf->dtim_count = 1;
|
||||
cur_conf->ibss_creator = bss_conf->ibss_creator;
|
||||
cur_conf->ibss_creator = vif->cfg.ibss_creator;
|
||||
|
||||
/*
|
||||
* It looks like mac80211 may end up using beacon interval of zero in
|
||||
@@ -649,7 +650,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *main_vif,
|
||||
cur_conf->enable_beacon = beacons;
|
||||
|
||||
if (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) {
|
||||
ath9k_cache_beacon_config(sc, ctx, &main_vif->bss_conf);
|
||||
ath9k_cache_beacon_config(sc, ctx, main_vif);
|
||||
|
||||
ath9k_set_beacon(sc);
|
||||
set_bit(ATH_OP_BEACONS, &common->op_flags);
|
||||
@@ -657,7 +658,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *main_vif,
|
||||
}
|
||||
|
||||
/* Update the beacon configuration. */
|
||||
ath9k_cache_beacon_config(sc, ctx, &main_vif->bss_conf);
|
||||
ath9k_cache_beacon_config(sc, ctx, main_vif);
|
||||
|
||||
/*
|
||||
* Configure the HW beacon registers only when we have a valid
|
||||
@@ -670,7 +671,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *main_vif,
|
||||
* IBSS interface.
|
||||
*/
|
||||
if (sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC &&
|
||||
!enabled && beacons && !main_vif->bss_conf.ibss_creator) {
|
||||
!enabled && beacons && !main_vif->cfg.ibss_creator) {
|
||||
spin_lock_irqsave(&sc->sc_pm_lock, flags);
|
||||
sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
|
||||
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
|
||||
|
||||
@@ -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:
|
||||
/*
|
||||
|
||||
@@ -244,11 +244,11 @@ static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev,
|
||||
ath9k_htc_txcompletion_cb(hif_dev->htc_handle,
|
||||
skb, txok);
|
||||
if (txok) {
|
||||
TX_STAT_INC(skb_success);
|
||||
TX_STAT_ADD(skb_success_bytes, ln);
|
||||
TX_STAT_INC(hif_dev, skb_success);
|
||||
TX_STAT_ADD(hif_dev, skb_success_bytes, ln);
|
||||
}
|
||||
else
|
||||
TX_STAT_INC(skb_failed);
|
||||
TX_STAT_INC(hif_dev, skb_failed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ static void hif_usb_tx_cb(struct urb *urb)
|
||||
hif_dev->tx.tx_buf_cnt++;
|
||||
if (!(hif_dev->tx.flags & HIF_USB_TX_STOP))
|
||||
__hif_usb_tx(hif_dev); /* Check for pending SKBs */
|
||||
TX_STAT_INC(buf_completed);
|
||||
TX_STAT_INC(hif_dev, buf_completed);
|
||||
spin_unlock(&hif_dev->tx.tx_lock);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
|
||||
tx_buf->len += tx_buf->offset;
|
||||
|
||||
__skb_queue_tail(&tx_buf->skb_queue, nskb);
|
||||
TX_STAT_INC(skb_queued);
|
||||
TX_STAT_INC(hif_dev, skb_queued);
|
||||
}
|
||||
|
||||
usb_fill_bulk_urb(tx_buf->urb, hif_dev->udev,
|
||||
@@ -369,7 +369,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
|
||||
list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
|
||||
hif_dev->tx.tx_buf_cnt++;
|
||||
} else {
|
||||
TX_STAT_INC(buf_queued);
|
||||
TX_STAT_INC(hif_dev, buf_queued);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -514,7 +514,7 @@ static void hif_usb_sta_drain(void *hif_handle, u8 idx)
|
||||
ath9k_htc_txcompletion_cb(hif_dev->htc_handle,
|
||||
skb, false);
|
||||
hif_dev->tx.tx_skb_cnt--;
|
||||
TX_STAT_INC(skb_failed);
|
||||
TX_STAT_INC(hif_dev, skb_failed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,14 +585,14 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
|
||||
pkt_tag = get_unaligned_le16(ptr + index + 2);
|
||||
|
||||
if (pkt_tag != ATH_USB_RX_STREAM_MODE_TAG) {
|
||||
RX_STAT_INC(skb_dropped);
|
||||
RX_STAT_INC(hif_dev, skb_dropped);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pkt_len > 2 * MAX_RX_BUF_SIZE) {
|
||||
dev_err(&hif_dev->udev->dev,
|
||||
"ath9k_htc: invalid pkt_len (%x)\n", pkt_len);
|
||||
RX_STAT_INC(skb_dropped);
|
||||
RX_STAT_INC(hif_dev, skb_dropped);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
|
||||
goto err;
|
||||
}
|
||||
skb_reserve(nskb, 32);
|
||||
RX_STAT_INC(skb_allocated);
|
||||
RX_STAT_INC(hif_dev, skb_allocated);
|
||||
|
||||
memcpy(nskb->data, &(skb->data[chk_idx+4]),
|
||||
hif_dev->rx_transfer_len);
|
||||
@@ -639,7 +639,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
|
||||
goto err;
|
||||
}
|
||||
skb_reserve(nskb, 32);
|
||||
RX_STAT_INC(skb_allocated);
|
||||
RX_STAT_INC(hif_dev, skb_allocated);
|
||||
|
||||
memcpy(nskb->data, &(skb->data[chk_idx+4]), pkt_len);
|
||||
skb_put(nskb, pkt_len);
|
||||
@@ -649,10 +649,10 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
|
||||
|
||||
err:
|
||||
for (i = 0; i < pool_index; i++) {
|
||||
RX_STAT_ADD(skb_completed_bytes, skb_pool[i]->len);
|
||||
RX_STAT_ADD(hif_dev, skb_completed_bytes, skb_pool[i]->len);
|
||||
ath9k_htc_rx_msg(hif_dev->htc_handle, skb_pool[i],
|
||||
skb_pool[i]->len, USB_WLAN_RX_PIPE);
|
||||
RX_STAT_INC(skb_completed);
|
||||
RX_STAT_INC(hif_dev, skb_completed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -327,14 +327,18 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
|
||||
#define __STAT_SAFE(hif_dev, expr) ((hif_dev)->htc_handle->drv_priv ? (expr) : 0)
|
||||
#define CAB_STAT_INC(priv) ((priv)->debug.tx_stats.cab_queued++)
|
||||
#define TX_QSTAT_INC(priv, q) ((priv)->debug.tx_stats.queue_stats[q]++)
|
||||
|
||||
#define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
|
||||
#define TX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a)
|
||||
#define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++)
|
||||
#define RX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a)
|
||||
#define CAB_STAT_INC priv->debug.tx_stats.cab_queued++
|
||||
|
||||
#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
|
||||
#define TX_STAT_INC(hif_dev, c) \
|
||||
__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c++)
|
||||
#define TX_STAT_ADD(hif_dev, c, a) \
|
||||
__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c += a)
|
||||
#define RX_STAT_INC(hif_dev, c) \
|
||||
__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.skbrx_stats.c++)
|
||||
#define RX_STAT_ADD(hif_dev, c, a) \
|
||||
__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.skbrx_stats.c += a)
|
||||
|
||||
void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
|
||||
struct ath_rx_status *rs);
|
||||
@@ -374,13 +378,13 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,
|
||||
struct ethtool_stats *stats, u64 *data);
|
||||
#else
|
||||
|
||||
#define TX_STAT_INC(c) do { } while (0)
|
||||
#define TX_STAT_ADD(c, a) do { } while (0)
|
||||
#define RX_STAT_INC(c) do { } while (0)
|
||||
#define RX_STAT_ADD(c, a) do { } while (0)
|
||||
#define CAB_STAT_INC do { } while (0)
|
||||
#define TX_STAT_INC(hif_dev, c)
|
||||
#define TX_STAT_ADD(hif_dev, c, a)
|
||||
#define RX_STAT_INC(hif_dev, c)
|
||||
#define RX_STAT_ADD(hif_dev, c, a)
|
||||
|
||||
#define TX_QSTAT_INC(c) do { } while (0)
|
||||
#define CAB_STAT_INC(priv)
|
||||
#define TX_QSTAT_INC(priv, c)
|
||||
|
||||
static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
|
||||
struct ath_rx_status *rs)
|
||||
|
||||
@@ -215,7 +215,7 @@ static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,
|
||||
}
|
||||
|
||||
/* Get a new beacon */
|
||||
beacon = ieee80211_beacon_get(priv->hw, vif);
|
||||
beacon = ieee80211_beacon_get(priv->hw, vif, 0);
|
||||
if (!beacon) {
|
||||
spin_unlock_bh(&priv->beacon_lock);
|
||||
return;
|
||||
@@ -511,7 +511,7 @@ bool ath9k_htc_csa_is_finished(struct ath9k_htc_priv *priv)
|
||||
struct ieee80211_vif *vif;
|
||||
|
||||
vif = priv->csa_vif;
|
||||
if (!vif || !vif->csa_active)
|
||||
if (!vif || !vif->bss_conf.csa_active)
|
||||
return false;
|
||||
|
||||
if (!ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
|
||||
@@ -944,7 +944,6 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
|
||||
priv->hw = hw;
|
||||
priv->htc = htc_handle;
|
||||
priv->dev = dev;
|
||||
htc_handle->drv_priv = priv;
|
||||
SET_IEEE80211_DEV(hw, priv->dev);
|
||||
|
||||
ret = ath9k_htc_wait_for_target(priv);
|
||||
@@ -965,6 +964,8 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
|
||||
if (ret)
|
||||
goto err_init;
|
||||
|
||||
htc_handle->drv_priv = priv;
|
||||
|
||||
return 0;
|
||||
|
||||
err_init:
|
||||
|
||||
@@ -100,7 +100,7 @@ static void ath9k_htc_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
|
||||
priv->rearm_ani = true;
|
||||
}
|
||||
|
||||
if (bss_conf->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
priv->rearm_ani = true;
|
||||
priv->reconfig_beacon = true;
|
||||
}
|
||||
@@ -1488,8 +1488,8 @@ static void ath9k_htc_bss_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
|
||||
struct ath_common *common = ath9k_hw_common(priv->ah);
|
||||
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
|
||||
|
||||
if ((vif->type == NL80211_IFTYPE_STATION) && bss_conf->assoc) {
|
||||
common->curaid = bss_conf->aid;
|
||||
if ((vif->type == NL80211_IFTYPE_STATION) && vif->cfg.assoc) {
|
||||
common->curaid = vif->cfg.aid;
|
||||
common->last_rssi = ATH_RSSI_DUMMY_MARKER;
|
||||
memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
|
||||
set_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
|
||||
@@ -1509,7 +1509,7 @@ static void ath9k_htc_choose_set_bssid(struct ath9k_htc_priv *priv)
|
||||
static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct ath9k_htc_priv *priv = hw->priv;
|
||||
struct ath_hw *ah = priv->ah;
|
||||
@@ -1521,17 +1521,17 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
ath_dbg(common, CONFIG, "BSS Changed ASSOC %d\n",
|
||||
bss_conf->assoc);
|
||||
vif->cfg.assoc);
|
||||
|
||||
bss_conf->assoc ?
|
||||
vif->cfg.assoc ?
|
||||
priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--;
|
||||
|
||||
if (!bss_conf->assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
clear_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
|
||||
|
||||
if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
|
||||
ath9k_htc_choose_set_bssid(priv);
|
||||
if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1))
|
||||
if (vif->cfg.assoc && (priv->num_sta_assoc_vif == 1))
|
||||
ath9k_htc_start_ani(priv);
|
||||
else if (priv->num_sta_assoc_vif == 0)
|
||||
ath9k_htc_stop_ani(priv);
|
||||
@@ -1540,7 +1540,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_IBSS) {
|
||||
if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) {
|
||||
common->curaid = bss_conf->aid;
|
||||
common->curaid = vif->cfg.aid;
|
||||
memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
|
||||
ath9k_htc_set_bssid(priv);
|
||||
}
|
||||
|
||||
@@ -106,20 +106,20 @@ static inline enum htc_endpoint_id get_htc_epid(struct ath9k_htc_priv *priv,
|
||||
|
||||
switch (qnum) {
|
||||
case 0:
|
||||
TX_QSTAT_INC(IEEE80211_AC_VO);
|
||||
TX_QSTAT_INC(priv, IEEE80211_AC_VO);
|
||||
epid = priv->data_vo_ep;
|
||||
break;
|
||||
case 1:
|
||||
TX_QSTAT_INC(IEEE80211_AC_VI);
|
||||
TX_QSTAT_INC(priv, IEEE80211_AC_VI);
|
||||
epid = priv->data_vi_ep;
|
||||
break;
|
||||
case 2:
|
||||
TX_QSTAT_INC(IEEE80211_AC_BE);
|
||||
TX_QSTAT_INC(priv, IEEE80211_AC_BE);
|
||||
epid = priv->data_be_ep;
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
TX_QSTAT_INC(IEEE80211_AC_BK);
|
||||
TX_QSTAT_INC(priv, IEEE80211_AC_BK);
|
||||
epid = priv->data_bk_ep;
|
||||
break;
|
||||
}
|
||||
@@ -328,7 +328,7 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
|
||||
memcpy(tx_fhdr, (u8 *) &tx_hdr, sizeof(tx_hdr));
|
||||
|
||||
if (is_cab) {
|
||||
CAB_STAT_INC;
|
||||
CAB_STAT_INC(priv);
|
||||
tx_ctl->epid = priv->cab_ep;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1863,7 +1863,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
|
||||
static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
#define CHECK_ANI \
|
||||
(BSS_CHANGED_ASSOC | \
|
||||
@@ -1881,11 +1881,11 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
ath_dbg(common, CONFIG, "BSSID %pM Changed ASSOC %d\n",
|
||||
bss_conf->bssid, bss_conf->assoc);
|
||||
bss_conf->bssid, vif->cfg.assoc);
|
||||
|
||||
memcpy(avp->bssid, bss_conf->bssid, ETH_ALEN);
|
||||
avp->aid = bss_conf->aid;
|
||||
avp->assoc = bss_conf->assoc;
|
||||
avp->aid = vif->cfg.aid;
|
||||
avp->assoc = vif->cfg.assoc;
|
||||
|
||||
ath9k_calculate_summary_state(sc, avp->chanctx);
|
||||
}
|
||||
@@ -1893,7 +1893,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if ((changed & BSS_CHANGED_IBSS) ||
|
||||
(changed & BSS_CHANGED_OCB)) {
|
||||
memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
|
||||
common->curaid = bss_conf->aid;
|
||||
common->curaid = vif->cfg.aid;
|
||||
ath9k_hw_write_associd(sc->sc_ah);
|
||||
}
|
||||
|
||||
@@ -2596,6 +2596,7 @@ static void ath9k_change_chanctx(struct ieee80211_hw *hw,
|
||||
|
||||
static int ath9k_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *conf)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
@@ -2627,6 +2628,7 @@ static int ath9k_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
|
||||
static void ath9k_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *conf)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
|
||||
@@ -1032,7 +1032,7 @@ static void carl9170_op_configure_filter(struct ieee80211_hw *hw,
|
||||
static void carl9170_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct ar9170 *ar = hw->priv;
|
||||
struct ath_common *common = &ar->common;
|
||||
@@ -1115,7 +1115,7 @@ static void carl9170_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
ar->common.curaid = bss_conf->aid;
|
||||
ar->common.curaid = vif->cfg.aid;
|
||||
err = carl9170_set_beacon_timers(ar);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -1628,7 +1628,7 @@ int carl9170_update_beacon(struct ar9170 *ar, const bool submit)
|
||||
goto out_unlock;
|
||||
|
||||
skb = ieee80211_beacon_get_tim(ar->hw, carl9170_get_vif(cvif),
|
||||
NULL, NULL);
|
||||
NULL, NULL, 0);
|
||||
|
||||
if (!skb) {
|
||||
err = -ENOMEM;
|
||||
|
||||
@@ -1961,7 +1961,7 @@ struct wcn36xx_hal_config_bss_params {
|
||||
|
||||
/* HAL should update the existing BSS entry, if this flag is set.
|
||||
* UMAC will set this flag in case of reassoc, where we want to
|
||||
* resue the the old BSSID and still return success 0 = Add, 1 =
|
||||
* resue the old BSSID and still return success 0 = Add, 1 =
|
||||
* Update */
|
||||
u8 action;
|
||||
|
||||
@@ -2098,7 +2098,7 @@ struct wcn36xx_hal_config_bss_params_v1 {
|
||||
|
||||
/* HAL should update the existing BSS entry, if this flag is set.
|
||||
* UMAC will set this flag in case of reassoc, where we want to
|
||||
* resue the the old BSSID and still return success 0 = Add, 1 =
|
||||
* resue the old BSSID and still return success 0 = Add, 1 =
|
||||
* Update */
|
||||
u8 action;
|
||||
|
||||
|
||||
@@ -872,7 +872,7 @@ void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates)
|
||||
static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct wcn36xx *wcn = hw->priv;
|
||||
struct sk_buff *skb = NULL;
|
||||
@@ -880,7 +880,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
enum wcn36xx_hal_link_state link_state;
|
||||
struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
|
||||
|
||||
wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss info changed vif %p changed 0x%08x\n",
|
||||
wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss info changed vif %p changed 0x%llx\n",
|
||||
vif, changed);
|
||||
|
||||
mutex_lock(&wcn->conf_mutex);
|
||||
@@ -919,17 +919,17 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
wcn36xx_dbg(WCN36XX_DBG_MAC,
|
||||
"mac bss changed ssid\n");
|
||||
wcn36xx_dbg_dump(WCN36XX_DBG_MAC, "ssid ",
|
||||
bss_conf->ssid, bss_conf->ssid_len);
|
||||
vif->cfg.ssid, vif->cfg.ssid_len);
|
||||
|
||||
vif_priv->ssid.length = bss_conf->ssid_len;
|
||||
vif_priv->ssid.length = vif->cfg.ssid_len;
|
||||
memcpy(&vif_priv->ssid.ssid,
|
||||
bss_conf->ssid,
|
||||
bss_conf->ssid_len);
|
||||
vif->cfg.ssid,
|
||||
vif->cfg.ssid_len);
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
vif_priv->is_joining = false;
|
||||
if (bss_conf->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
struct ieee80211_sta *sta;
|
||||
struct wcn36xx_sta *sta_priv;
|
||||
|
||||
@@ -937,7 +937,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
"mac assoc bss %pM vif %pM AID=%d\n",
|
||||
bss_conf->bssid,
|
||||
vif->addr,
|
||||
bss_conf->aid);
|
||||
vif->cfg.aid);
|
||||
|
||||
vif_priv->sta_assoc = true;
|
||||
|
||||
@@ -963,7 +963,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
wcn36xx_smd_config_bss(wcn, vif, sta,
|
||||
bss_conf->bssid,
|
||||
true);
|
||||
sta_priv->aid = bss_conf->aid;
|
||||
sta_priv->aid = vif->cfg.aid;
|
||||
/*
|
||||
* config_sta must be called from because this is the
|
||||
* place where AID is available.
|
||||
@@ -977,7 +977,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
"disassociated bss %pM vif %pM AID=%d\n",
|
||||
bss_conf->bssid,
|
||||
vif->addr,
|
||||
bss_conf->aid);
|
||||
vif->cfg.aid);
|
||||
vif_priv->sta_assoc = false;
|
||||
wcn36xx_smd_set_link_st(wcn,
|
||||
bss_conf->bssid,
|
||||
@@ -1010,7 +1010,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
wcn36xx_smd_config_bss(wcn, vif, NULL,
|
||||
vif->addr, false);
|
||||
skb = ieee80211_beacon_get_tim(hw, vif, &tim_off,
|
||||
&tim_len);
|
||||
&tim_len, 0);
|
||||
if (!skb) {
|
||||
wcn36xx_err("failed to alloc beacon skb\n");
|
||||
goto out;
|
||||
|
||||
@@ -3005,7 +3005,7 @@ int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif,
|
||||
msg_body.host_offload_params.enable =
|
||||
WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE;
|
||||
memcpy(&msg_body.host_offload_params.u,
|
||||
&vif->bss_conf.arp_addr_list[0], sizeof(__be32));
|
||||
&vif->cfg.arp_addr_list[0], sizeof(__be32));
|
||||
}
|
||||
msg_body.ns_offload_params.bss_index = vif_priv->bss_index;
|
||||
|
||||
|
||||
@@ -2098,8 +2098,8 @@ static int wil_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||
bcon->tail_len))
|
||||
privacy = 1;
|
||||
|
||||
memcpy(vif->ssid, wdev->ssid, wdev->ssid_len);
|
||||
vif->ssid_len = wdev->ssid_len;
|
||||
memcpy(vif->ssid, wdev->u.ap.ssid, wdev->u.ap.ssid_len);
|
||||
vif->ssid_len = wdev->u.ap.ssid_len;
|
||||
|
||||
/* in case privacy has changed, need to restart the AP */
|
||||
if (vif->privacy != privacy) {
|
||||
@@ -2108,7 +2108,7 @@ static int wil_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||
|
||||
rc = _wil_cfg80211_start_ap(wiphy, ndev, vif->ssid,
|
||||
vif->ssid_len, privacy,
|
||||
wdev->beacon_interval,
|
||||
wdev->links[0].ap.beacon_interval,
|
||||
vif->channel,
|
||||
vif->wmi_edmg_channel, bcon,
|
||||
vif->hidden_ssid,
|
||||
@@ -2186,7 +2186,8 @@ static int wil_cfg80211_start_ap(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
static int wil_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
struct net_device *ndev)
|
||||
struct net_device *ndev,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||
struct wil6210_vif *vif = ndev_to_vif(ndev);
|
||||
|
||||
@@ -1822,8 +1822,8 @@ wmi_evt_reassoc_status(struct wil6210_vif *vif, int id, void *d, int len)
|
||||
freq = ieee80211_channel_to_frequency(ch, NL80211_BAND_60GHZ);
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.channel = ieee80211_get_channel(wiphy, freq);
|
||||
info.bss = vif->bss;
|
||||
info.links[0].channel = ieee80211_get_channel(wiphy, freq);
|
||||
info.links[0].bss = vif->bss;
|
||||
info.req_ie = assoc_req_ie;
|
||||
info.req_ie_len = assoc_req_ie_len;
|
||||
info.resp_ie = assoc_resp_ie;
|
||||
|
||||
@@ -2033,7 +2033,7 @@ static int at76_config(struct ieee80211_hw *hw, u32 changed)
|
||||
static void at76_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct at76_priv *priv = hw->priv;
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ static int b43_wireless_core_start(struct b43_wldev *dev);
|
||||
static void b43_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
u32 changed);
|
||||
u64 changed);
|
||||
|
||||
static int b43_ratelimit(struct b43_wl *wl)
|
||||
{
|
||||
@@ -1832,7 +1832,7 @@ static void b43_update_templates(struct b43_wl *wl)
|
||||
* the TIM field, but that would probably require resizing and
|
||||
* moving of data within the beacon template.
|
||||
* Simply request a new beacon and let mac80211 do the hard work. */
|
||||
beacon = ieee80211_beacon_get(wl->hw, wl->vif);
|
||||
beacon = ieee80211_beacon_get(wl->hw, wl->vif, 0);
|
||||
if (unlikely(!beacon))
|
||||
return;
|
||||
|
||||
@@ -4097,7 +4097,7 @@ static void b43_update_basic_rates(struct b43_wldev *dev, u32 brates)
|
||||
static void b43_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct b43_wl *wl = hw_to_b43_wl(hw);
|
||||
struct b43_wldev *dev;
|
||||
|
||||
@@ -1241,7 +1241,7 @@ static void b43legacy_update_templates(struct b43legacy_wl *wl)
|
||||
* field, but that would probably require resizing and moving of data
|
||||
* within the beacon template. Simply request a new beacon and let
|
||||
* mac80211 do the hard work. */
|
||||
beacon = ieee80211_beacon_get(wl->hw, wl->vif);
|
||||
beacon = ieee80211_beacon_get(wl->hw, wl->vif, 0);
|
||||
if (unlikely(!beacon))
|
||||
return;
|
||||
|
||||
@@ -2806,7 +2806,7 @@ static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates
|
||||
static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
|
||||
struct b43legacy_wldev *dev;
|
||||
|
||||
@@ -4965,7 +4965,8 @@ exit:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
||||
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
@@ -5302,6 +5303,7 @@ exit:
|
||||
|
||||
static int brcmf_cfg80211_get_channel(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
unsigned int link_id,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
@@ -6015,8 +6017,8 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
|
||||
done:
|
||||
kfree(buf);
|
||||
|
||||
roam_info.channel = notify_channel;
|
||||
roam_info.bssid = profile->bssid;
|
||||
roam_info.links[0].channel = notify_channel;
|
||||
roam_info.links[0].bssid = profile->bssid;
|
||||
roam_info.req_ie = conn_info->req_ie;
|
||||
roam_info.req_ie_len = conn_info->req_ie_len;
|
||||
roam_info.resp_ie = conn_info->resp_ie;
|
||||
@@ -6059,7 +6061,7 @@ brcmf_bss_connect_done(struct brcmf_cfg80211_info *cfg,
|
||||
} else {
|
||||
conn_params.status = WLAN_STATUS_AUTH_TIMEOUT;
|
||||
}
|
||||
conn_params.bssid = profile->bssid;
|
||||
conn_params.links[0].bssid = profile->bssid;
|
||||
conn_params.req_ie = conn_info->req_ie;
|
||||
conn_params.req_ie_len = conn_info->req_ie_len;
|
||||
conn_params.resp_ie = conn_info->resp_ie;
|
||||
|
||||
@@ -507,7 +507,7 @@ brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
brcms_c_start_station(wl->wlc, vif->addr);
|
||||
else if (vif->type == NL80211_IFTYPE_AP)
|
||||
brcms_c_start_ap(wl->wlc, vif->addr, vif->bss_conf.bssid,
|
||||
vif->bss_conf.ssid, vif->bss_conf.ssid_len);
|
||||
vif->cfg.ssid, vif->cfg.ssid_len);
|
||||
else if (vif->type == NL80211_IFTYPE_ADHOC)
|
||||
brcms_c_start_adhoc(wl->wlc, vif->addr);
|
||||
spin_unlock_bh(&wl->lock);
|
||||
@@ -582,7 +582,7 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
|
||||
static void
|
||||
brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info, u32 changed)
|
||||
struct ieee80211_bss_conf *info, u64 changed)
|
||||
{
|
||||
struct brcms_info *wl = hw->priv;
|
||||
struct bcma_device *core = wl->wlc->hw->d11core;
|
||||
@@ -592,9 +592,9 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
* also implies a change in the AID.
|
||||
*/
|
||||
brcms_err(core, "%s: %s: %sassociated\n", KBUILD_MODNAME,
|
||||
__func__, info->assoc ? "" : "dis");
|
||||
__func__, vif->cfg.assoc ? "" : "dis");
|
||||
spin_lock_bh(&wl->lock);
|
||||
brcms_c_associate_upd(wl->wlc, info->assoc);
|
||||
brcms_c_associate_upd(wl->wlc, vif->cfg.assoc);
|
||||
spin_unlock_bh(&wl->lock);
|
||||
}
|
||||
if (changed & BSS_CHANGED_ERP_SLOT) {
|
||||
@@ -669,7 +669,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (changed & BSS_CHANGED_SSID) {
|
||||
/* BSSID changed, for whatever reason (IBSS and managed mode) */
|
||||
spin_lock_bh(&wl->lock);
|
||||
brcms_c_set_ssid(wl->wlc, info->ssid, info->ssid_len);
|
||||
brcms_c_set_ssid(wl->wlc, vif->cfg.ssid, vif->cfg.ssid_len);
|
||||
spin_unlock_bh(&wl->lock);
|
||||
}
|
||||
if (changed & BSS_CHANGED_BEACON) {
|
||||
@@ -678,7 +678,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
u16 tim_offset = 0;
|
||||
|
||||
spin_lock_bh(&wl->lock);
|
||||
beacon = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL);
|
||||
beacon = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL, 0);
|
||||
brcms_c_set_new_beacon(wl->wlc, beacon, tim_offset,
|
||||
info->dtim_period);
|
||||
spin_unlock_bh(&wl->lock);
|
||||
@@ -715,13 +715,13 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (changed & BSS_CHANGED_IBSS) {
|
||||
/* IBSS join status changed */
|
||||
brcms_err(core, "%s: IBSS joined: %s (implement)\n",
|
||||
__func__, info->ibss_joined ? "true" : "false");
|
||||
__func__, vif->cfg.ibss_joined ? "true" : "false");
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ARP_FILTER) {
|
||||
/* Hardware ARP filter address list or state changed */
|
||||
brcms_err(core, "%s: arp filtering: %d addresses"
|
||||
" (implement)\n", __func__, info->arp_addr_cnt);
|
||||
" (implement)\n", __func__, vif->cfg.arp_addr_cnt);
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_QOS) {
|
||||
@@ -950,7 +950,7 @@ static int brcms_ops_beacon_set_tim(struct ieee80211_hw *hw,
|
||||
spin_lock_bh(&wl->lock);
|
||||
if (wl->wlc->vif)
|
||||
beacon = ieee80211_beacon_get_tim(hw, wl->wlc->vif,
|
||||
&tim_offset, NULL);
|
||||
&tim_offset, NULL, 0);
|
||||
if (beacon)
|
||||
brcms_c_set_new_beacon(wl->wlc, beacon, tim_offset,
|
||||
wl->wlc->vif->bss_conf.dtim_period);
|
||||
|
||||
@@ -2701,7 +2701,7 @@ il3945_post_associate(struct il_priv *il)
|
||||
if (!il->vif || !il->is_open)
|
||||
return;
|
||||
|
||||
D_ASSOC("Associated as %d to: %pM\n", il->vif->bss_conf.aid,
|
||||
D_ASSOC("Associated as %d to: %pM\n", il->vif->cfg.aid,
|
||||
il->active.bssid_addr);
|
||||
|
||||
if (test_bit(S_EXIT_PENDING, &il->status))
|
||||
@@ -2718,9 +2718,9 @@ il3945_post_associate(struct il_priv *il)
|
||||
|
||||
il->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
||||
|
||||
il->staging.assoc_id = cpu_to_le16(il->vif->bss_conf.aid);
|
||||
il->staging.assoc_id = cpu_to_le16(il->vif->cfg.aid);
|
||||
|
||||
D_ASSOC("assoc id %d beacon interval %d\n", il->vif->bss_conf.aid,
|
||||
D_ASSOC("assoc id %d beacon interval %d\n", il->vif->cfg.aid,
|
||||
il->vif->bss_conf.beacon_int);
|
||||
|
||||
if (il->vif->bss_conf.use_short_preamble)
|
||||
|
||||
@@ -2403,7 +2403,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
/* Repeat initial/next rate.
|
||||
* For legacy IL_NUMBER_TRY == 1, this loop will not execute.
|
||||
* For HT IL_HT_NUMBER_TRY == 3, this executes twice. */
|
||||
while (repeat_rate > 0 && idx < LINK_QUAL_MAX_RETRY_NUM) {
|
||||
while (repeat_rate > 0) {
|
||||
if (is_legacy(tbl_type.lq_type)) {
|
||||
if (ant_toggle_cnt < NUM_TRY_BEFORE_ANT_TOGGLE)
|
||||
ant_toggle_cnt++;
|
||||
@@ -2422,6 +2422,8 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
cpu_to_le32(new_rate);
|
||||
repeat_rate--;
|
||||
idx++;
|
||||
if (idx >= LINK_QUAL_MAX_RETRY_NUM)
|
||||
goto out;
|
||||
}
|
||||
|
||||
il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band,
|
||||
@@ -2466,6 +2468,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,
|
||||
repeat_rate--;
|
||||
}
|
||||
|
||||
out:
|
||||
lq_cmd->agg_params.agg_frame_cnt_limit = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
|
||||
lq_cmd->agg_params.agg_dis_start_th = LINK_QUAL_AGG_DISABLE_START_DEF;
|
||||
|
||||
|
||||
@@ -1756,9 +1756,9 @@ il4965_post_associate(struct il_priv *il)
|
||||
if (il->ops->set_rxon_chain)
|
||||
il->ops->set_rxon_chain(il);
|
||||
|
||||
il->staging.assoc_id = cpu_to_le16(vif->bss_conf.aid);
|
||||
il->staging.assoc_id = cpu_to_le16(vif->cfg.aid);
|
||||
|
||||
D_ASSOC("assoc id %d beacon interval %d\n", vif->bss_conf.aid,
|
||||
D_ASSOC("assoc id %d beacon interval %d\n", vif->cfg.aid,
|
||||
vif->bss_conf.beacon_int);
|
||||
|
||||
if (vif->bss_conf.use_short_preamble)
|
||||
@@ -1775,7 +1775,7 @@ il4965_post_associate(struct il_priv *il)
|
||||
|
||||
il_commit_rxon(il);
|
||||
|
||||
D_ASSOC("Associated as %d to: %pM\n", vif->bss_conf.aid,
|
||||
D_ASSOC("Associated as %d to: %pM\n", vif->cfg.aid,
|
||||
il->active.bssid_addr);
|
||||
|
||||
switch (vif->type) {
|
||||
|
||||
@@ -5276,7 +5276,7 @@ il_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
struct il_priv *il = hw->priv;
|
||||
unsigned long flags;
|
||||
__le64 timestamp;
|
||||
struct sk_buff *skb = ieee80211_beacon_get(hw, vif);
|
||||
struct sk_buff *skb = ieee80211_beacon_get(hw, vif, 0);
|
||||
|
||||
if (!skb)
|
||||
return;
|
||||
@@ -5311,13 +5311,13 @@ il_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
|
||||
void
|
||||
il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf, u32 changes)
|
||||
struct ieee80211_bss_conf *bss_conf, u64 changes)
|
||||
{
|
||||
struct il_priv *il = hw->priv;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&il->mutex);
|
||||
D_MAC80211("enter: changes 0x%x\n", changes);
|
||||
D_MAC80211("enter: changes 0x%llx\n", changes);
|
||||
|
||||
if (!il_is_alive(il)) {
|
||||
D_MAC80211("leave - not alive\n");
|
||||
@@ -5427,8 +5427,8 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
}
|
||||
|
||||
if (changes & BSS_CHANGED_ASSOC) {
|
||||
D_MAC80211("ASSOC %d\n", bss_conf->assoc);
|
||||
if (bss_conf->assoc) {
|
||||
D_MAC80211("ASSOC %d\n", vif->cfg.assoc);
|
||||
if (vif->cfg.assoc) {
|
||||
il->timestamp = bss_conf->sync_tsf;
|
||||
|
||||
if (!il_is_rfkill(il))
|
||||
@@ -5437,8 +5437,8 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
il_set_no_assoc(il, vif);
|
||||
}
|
||||
|
||||
if (changes && il_is_associated(il) && bss_conf->aid) {
|
||||
D_MAC80211("Changes (%#x) while associated\n", changes);
|
||||
if (changes && il_is_associated(il) && vif->cfg.aid) {
|
||||
D_MAC80211("Changes (%#llx) while associated\n", changes);
|
||||
ret = il_send_rxon_assoc(il);
|
||||
if (!ret) {
|
||||
/* Sync active_rxon with latest change. */
|
||||
@@ -5459,10 +5459,10 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
||||
if (changes & BSS_CHANGED_IBSS) {
|
||||
ret = il->ops->manage_ibss_station(il, vif,
|
||||
bss_conf->ibss_joined);
|
||||
vif->cfg.ibss_joined);
|
||||
if (ret)
|
||||
IL_ERR("failed to %s IBSS station %pM\n",
|
||||
bss_conf->ibss_joined ? "add" : "remove",
|
||||
vif->cfg.ibss_joined ? "add" : "remove",
|
||||
bss_conf->bssid);
|
||||
}
|
||||
|
||||
|
||||
@@ -1947,7 +1947,7 @@ il_get_hw_mode(struct il_priv *il, enum nl80211_band band)
|
||||
int il_mac_config(struct ieee80211_hw *hw, u32 changed);
|
||||
void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
|
||||
void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf, u32 changes);
|
||||
struct ieee80211_bss_conf *bss_conf, u64 changes);
|
||||
void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
|
||||
__le16 fc, __le32 *tx_flags);
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed);
|
||||
void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes);
|
||||
u64 changes);
|
||||
void iwlagn_config_ht40(struct ieee80211_conf *conf,
|
||||
struct iwl_rxon_context *ctx);
|
||||
void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2008 - 2014, 2022 Intel Corporation. All rights reserved.
|
||||
*****************************************************************************/
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -441,7 +441,7 @@ static void iwlagn_bt_traffic_change_work(struct work_struct *work)
|
||||
priv->current_ht_config.smps = smps_request;
|
||||
for_each_context(priv, ctx) {
|
||||
if (ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION)
|
||||
ieee80211_request_smps(ctx->vif, smps_request);
|
||||
ieee80211_request_smps(ctx->vif, 0, smps_request);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014, 2018 - 2021 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2003 - 2014, 2018 - 2022 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project, as well
|
||||
@@ -284,7 +284,7 @@ static void iwl_bg_beacon_update(struct work_struct *work)
|
||||
}
|
||||
|
||||
/* Pull updated AP beacon from mac80211. will fail if not in AP mode */
|
||||
beacon = ieee80211_beacon_get(priv->hw, priv->beacon_ctx->vif);
|
||||
beacon = ieee80211_beacon_get(priv->hw, priv->beacon_ctx->vif, 0);
|
||||
if (!beacon) {
|
||||
IWL_ERR(priv, "update beacon failed -- keeping old\n");
|
||||
goto out;
|
||||
|
||||
@@ -183,7 +183,7 @@ static int iwlagn_update_beacon(struct iwl_priv *priv,
|
||||
lockdep_assert_held(&priv->mutex);
|
||||
|
||||
dev_kfree_skb(priv->beacon_skb);
|
||||
priv->beacon_skb = ieee80211_beacon_get(priv->hw, vif);
|
||||
priv->beacon_skb = ieee80211_beacon_get(priv->hw, vif, 0);
|
||||
if (!priv->beacon_skb)
|
||||
return -ENOMEM;
|
||||
return iwlagn_send_beacon_cmd(priv);
|
||||
@@ -562,12 +562,12 @@ int iwlagn_set_pan_params(struct iwl_priv *priv)
|
||||
slot1 = bcnint - slot0;
|
||||
|
||||
if (test_bit(STATUS_SCAN_HW, &priv->status) ||
|
||||
(!ctx_bss->vif->bss_conf.idle &&
|
||||
!ctx_bss->vif->bss_conf.assoc)) {
|
||||
(!ctx_bss->vif->cfg.idle &&
|
||||
!ctx_bss->vif->cfg.assoc)) {
|
||||
slot0 = dtim * bcnint * 3 - IWL_MIN_SLOT_TIME;
|
||||
slot1 = IWL_MIN_SLOT_TIME;
|
||||
} else if (!ctx_pan->vif->bss_conf.idle &&
|
||||
!ctx_pan->vif->bss_conf.assoc) {
|
||||
} else if (!ctx_pan->vif->cfg.idle &&
|
||||
!ctx_pan->vif->cfg.assoc) {
|
||||
slot1 = dtim * bcnint * 3 - IWL_MIN_SLOT_TIME;
|
||||
slot0 = IWL_MIN_SLOT_TIME;
|
||||
}
|
||||
@@ -1383,7 +1383,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv)
|
||||
void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
|
||||
struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif);
|
||||
@@ -1392,7 +1392,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
if (changes & BSS_CHANGED_IDLE && bss_conf->idle) {
|
||||
if (changes & BSS_CHANGED_IDLE && vif->cfg.idle) {
|
||||
/*
|
||||
* If we go idle, then clearly no "passive-no-rx"
|
||||
* workaround is needed any more, this is a reset.
|
||||
@@ -1420,14 +1420,14 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
iwlagn_update_qos(priv, ctx);
|
||||
}
|
||||
|
||||
ctx->staging.assoc_id = cpu_to_le16(vif->bss_conf.aid);
|
||||
ctx->staging.assoc_id = cpu_to_le16(vif->cfg.aid);
|
||||
if (vif->bss_conf.use_short_preamble)
|
||||
ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
|
||||
else
|
||||
ctx->staging.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
|
||||
|
||||
if (changes & BSS_CHANGED_ASSOC) {
|
||||
if (bss_conf->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
priv->timestamp = bss_conf->sync_tsf;
|
||||
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
||||
} else {
|
||||
@@ -1483,7 +1483,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
*/
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION) {
|
||||
if (!bss_conf->assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
ctx->staging.filter_flags |= RXON_FILTER_BCON_AWARE_MSK;
|
||||
else
|
||||
ctx->staging.filter_flags &=
|
||||
@@ -1493,7 +1493,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (force || memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
|
||||
iwlagn_commit_rxon(priv, ctx);
|
||||
|
||||
if (changes & BSS_CHANGED_ASSOC && bss_conf->assoc) {
|
||||
if (changes & BSS_CHANGED_ASSOC && vif->cfg.assoc) {
|
||||
/*
|
||||
* The chain noise calibration will enable PM upon
|
||||
* completion. If calibration has already been run
|
||||
@@ -1509,10 +1509,10 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changes & BSS_CHANGED_IBSS) {
|
||||
ret = iwlagn_manage_ibss_station(priv, vif,
|
||||
bss_conf->ibss_joined);
|
||||
vif->cfg.ibss_joined);
|
||||
if (ret)
|
||||
IWL_ERR(priv, "failed to %s IBSS station %pM\n",
|
||||
bss_conf->ibss_joined ? "add" : "remove",
|
||||
vif->cfg.ibss_joined ? "add" : "remove",
|
||||
bss_conf->bssid);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2013-2014, 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2013-2014, 2018-2020, 2022 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
*/
|
||||
#include <linux/ieee80211.h>
|
||||
@@ -106,7 +106,7 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif)
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
|
||||
if (!chanctx_conf ||
|
||||
chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) {
|
||||
@@ -283,7 +283,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
||||
return;
|
||||
}
|
||||
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
|
||||
/* If channel context is invalid or not on 2.4GHz .. */
|
||||
if ((!chanctx_conf ||
|
||||
@@ -311,7 +311,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
||||
smps_mode = IEEE80211_SMPS_DYNAMIC;
|
||||
|
||||
/* relax SMPS constraints for next association */
|
||||
if (!vif->bss_conf.assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
smps_mode = IEEE80211_SMPS_AUTOMATIC;
|
||||
|
||||
if (mvmvif->phy_ctxt &&
|
||||
@@ -382,7 +382,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
||||
* we are not associated
|
||||
*/
|
||||
if (iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT ||
|
||||
mvm->cfg->bt_shared_single_ant || !vif->bss_conf.assoc ||
|
||||
mvm->cfg->bt_shared_single_ant || !vif->cfg.assoc ||
|
||||
le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) == BT_OFF) {
|
||||
iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, false);
|
||||
iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
||||
|
||||
@@ -731,7 +731,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
return -EINVAL;
|
||||
|
||||
rcu_read_lock();
|
||||
ctx = rcu_dereference(vif->chanctx_conf);
|
||||
ctx = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (WARN_ON(!ctx)) {
|
||||
rcu_read_unlock();
|
||||
return -EINVAL;
|
||||
@@ -749,7 +749,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
/* add back the MAC */
|
||||
mvmvif->uploaded = false;
|
||||
|
||||
if (WARN_ON(!vif->bss_conf.assoc))
|
||||
if (WARN_ON(!vif->cfg.assoc))
|
||||
return -EINVAL;
|
||||
|
||||
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
|
||||
|
||||
@@ -234,7 +234,7 @@ static ssize_t iwl_dbgfs_mac_params_read(struct file *file,
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (chanctx_conf)
|
||||
pos += scnprintf(buf+pos, bufsz-pos,
|
||||
"idle rx chains %d, active rx chains: %d\n",
|
||||
@@ -597,7 +597,7 @@ static ssize_t iwl_dbgfs_rx_phyinfo_write(struct ieee80211_vif *vif, char *buf,
|
||||
mutex_lock(&mvm->mutex);
|
||||
rcu_read_lock();
|
||||
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
/* make sure the channel context is assigned */
|
||||
if (!chanctx_conf) {
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -1233,7 +1233,7 @@ static int _iwl_dbgfs_inject_beacon_ie(struct iwl_mvm *mvm, char *bin, int len)
|
||||
|
||||
mvm->hw->extra_beacon_tailroom = len;
|
||||
|
||||
beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL);
|
||||
beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL, 0);
|
||||
if (!beacon)
|
||||
goto out_err;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*/
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/math64.h>
|
||||
@@ -67,7 +67,7 @@ int iwl_mvm_ftm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
* the TK is already configured for this station, so it
|
||||
* shouldn't be set again here.
|
||||
*/
|
||||
if (vif->bss_conf.assoc &&
|
||||
if (vif->cfg.assoc &&
|
||||
!memcmp(addr, vif->bss_conf.bssid, ETH_ALEN)) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_sta *sta;
|
||||
@@ -222,7 +222,7 @@ static void iwl_mvm_ftm_cmd_v5(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
for (i = 0; i < ETH_ALEN; i++)
|
||||
cmd->macaddr_mask[i] = ~req->mac_addr_mask[i];
|
||||
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
memcpy(cmd->range_req_bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||
else
|
||||
eth_broadcast_addr(cmd->range_req_bssid);
|
||||
@@ -254,7 +254,7 @@ static void iwl_mvm_ftm_cmd_common(struct iwl_mvm *mvm,
|
||||
for (i = 0; i < ETH_ALEN; i++)
|
||||
cmd->macaddr_mask[i] = ~req->mac_addr_mask[i];
|
||||
|
||||
if (vif->bss_conf.assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
memcpy(cmd->range_req_bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||
|
||||
/* AP's TSF is only relevant if associated */
|
||||
@@ -503,7 +503,7 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
iwl_mvm_ftm_put_target_common(mvm, peer, target);
|
||||
|
||||
if (vif->bss_conf.assoc &&
|
||||
if (vif->cfg.assoc &&
|
||||
!memcmp(peer->addr, vif->bss_conf.bssid, ETH_ALEN)) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_sta *sta;
|
||||
@@ -693,7 +693,7 @@ iwl_mvm_ftm_set_secured_ranging(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
target->cipher = entry->cipher;
|
||||
memcpy(target->hltk, entry->hltk, sizeof(target->hltk));
|
||||
|
||||
if (vif->bss_conf.assoc &&
|
||||
if (vif->cfg.assoc &&
|
||||
!memcmp(vif->bss_conf.bssid, target->bssid,
|
||||
sizeof(target->bssid)))
|
||||
ieee80211_iter_keys(mvm->hw, vif, iter, target);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*/
|
||||
#include <net/cfg80211.h>
|
||||
#include <linux/etherdevice.h>
|
||||
@@ -398,7 +398,7 @@ int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
pctx = rcu_dereference(vif->chanctx_conf);
|
||||
pctx = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
/* Copy the ctx to unlock the rcu and send the phy ctxt. We don't care
|
||||
* about changes in the ctx after releasing the lock because the driver
|
||||
* is still protected by the mutex. */
|
||||
|
||||
@@ -481,7 +481,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
|
||||
eth_broadcast_addr(cmd->bssid_addr);
|
||||
|
||||
rcu_read_lock();
|
||||
chanctx = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
|
||||
: NL80211_BAND_2GHZ,
|
||||
&cck_ack_rates, &ofdm_ack_rates);
|
||||
@@ -570,7 +570,7 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
|
||||
}
|
||||
|
||||
/* We need the dtim_period to set the MAC as associated */
|
||||
if (vif->bss_conf.assoc && vif->bss_conf.dtim_period &&
|
||||
if (vif->cfg.assoc && vif->bss_conf.dtim_period &&
|
||||
!force_assoc_off) {
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
u32 dtim_offs;
|
||||
@@ -628,9 +628,9 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
|
||||
vif->bss_conf.dtim_period);
|
||||
|
||||
ctxt_sta->listen_interval = cpu_to_le32(mvm->hw->conf.listen_interval);
|
||||
ctxt_sta->assoc_id = cpu_to_le32(vif->bss_conf.aid);
|
||||
ctxt_sta->assoc_id = cpu_to_le32(vif->cfg.aid);
|
||||
|
||||
if (vif->probe_req_reg && vif->bss_conf.assoc && vif->p2p)
|
||||
if (vif->probe_req_reg && vif->cfg.assoc && vif->p2p)
|
||||
cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_PROBE_REQUEST);
|
||||
|
||||
if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax) {
|
||||
@@ -934,7 +934,7 @@ static int iwl_mvm_mac_ctxt_send_beacon_v9(struct iwl_mvm *mvm,
|
||||
|
||||
/* Enable FILS on PSC channels only */
|
||||
rcu_read_lock();
|
||||
ctx = rcu_dereference(vif->chanctx_conf);
|
||||
ctx = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
channel = ieee80211_frequency_to_channel(ctx->def.chan->center_freq);
|
||||
WARN_ON(channel == 0);
|
||||
if (cfg80211_channel_is_psc(ctx->def.chan) &&
|
||||
@@ -944,8 +944,8 @@ static int iwl_mvm_mac_ctxt_send_beacon_v9(struct iwl_mvm *mvm,
|
||||
IWL_MAC_BEACON_FILS :
|
||||
IWL_MAC_BEACON_FILS_V1;
|
||||
beacon_cmd.short_ssid =
|
||||
cpu_to_le32(~crc32_le(~0, vif->bss_conf.ssid,
|
||||
vif->bss_conf.ssid_len));
|
||||
cpu_to_le32(~crc32_le(~0, vif->cfg.ssid,
|
||||
vif->cfg.ssid_len));
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -1002,7 +1002,7 @@ int iwl_mvm_mac_ctxt_beacon_changed(struct iwl_mvm *mvm,
|
||||
WARN_ON(vif->type != NL80211_IFTYPE_AP &&
|
||||
vif->type != NL80211_IFTYPE_ADHOC);
|
||||
|
||||
beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL);
|
||||
beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL, 0);
|
||||
if (!beacon)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1031,7 +1031,7 @@ static void iwl_mvm_mac_ap_iterator(void *_data, u8 *mac,
|
||||
{
|
||||
struct iwl_mvm_mac_ap_iterator_data *data = _data;
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc)
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc)
|
||||
return;
|
||||
|
||||
/* Station client has higher priority over P2P client*/
|
||||
@@ -1335,7 +1335,7 @@ void iwl_mvm_rx_beacon_notif(struct iwl_mvm *mvm,
|
||||
|
||||
csa_vif = rcu_dereference_protected(mvm->csa_vif,
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
if (unlikely(csa_vif && csa_vif->csa_active))
|
||||
if (unlikely(csa_vif && csa_vif->bss_conf.csa_active))
|
||||
iwl_mvm_csa_count_down(mvm, csa_vif, mvm->ap_last_beacon_gp2,
|
||||
(status == TX_STATUS_SUCCESS));
|
||||
|
||||
@@ -1558,7 +1558,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
switch (vif->type) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
csa_vif = rcu_dereference(mvm->csa_vif);
|
||||
if (WARN_ON(!csa_vif || !csa_vif->csa_active ||
|
||||
if (WARN_ON(!csa_vif || !csa_vif->bss_conf.csa_active ||
|
||||
csa_vif != vif))
|
||||
goto out_unlock;
|
||||
|
||||
@@ -1587,7 +1587,7 @@ void iwl_mvm_channel_switch_start_notif(struct iwl_mvm *mvm,
|
||||
*/
|
||||
if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
|
||||
CHANNEL_SWITCH_ERROR_NOTIF,
|
||||
0) && !vif->csa_active) {
|
||||
0) && !vif->bss_conf.csa_active) {
|
||||
IWL_DEBUG_INFO(mvm, "Channel Switch was canceled\n");
|
||||
iwl_mvm_cancel_channel_switch(mvm, vif, mac_id);
|
||||
break;
|
||||
|
||||
@@ -1614,7 +1614,7 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
|
||||
return;
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION ||
|
||||
!vif->bss_conf.assoc)
|
||||
!vif->cfg.assoc)
|
||||
return;
|
||||
|
||||
cmd->port_id = data->port_id++;
|
||||
@@ -1740,7 +1740,7 @@ static void iwl_mvm_config_iface_filter(struct ieee80211_hw *hw,
|
||||
return;
|
||||
|
||||
/* Supported only for p2p client interfaces */
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc ||
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc ||
|
||||
!vif->p2p)
|
||||
return;
|
||||
|
||||
@@ -1768,7 +1768,7 @@ static int iwl_mvm_update_mu_groups(struct iwl_mvm *mvm,
|
||||
static void iwl_mvm_mu_mimo_iface_iterator(void *_data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
if (vif->mu_mimo_owner) {
|
||||
if (vif->bss_conf.mu_mimo_owner) {
|
||||
struct iwl_mu_group_mgmt_notif *notif = _data;
|
||||
|
||||
/*
|
||||
@@ -1776,7 +1776,7 @@ static void iwl_mvm_mu_mimo_iface_iterator(void *_data, u8 *mac,
|
||||
* the data received from firmware as if it came from the
|
||||
* action frame, so no conversion is needed.
|
||||
*/
|
||||
ieee80211_update_mu_groups(vif,
|
||||
ieee80211_update_mu_groups(vif, 0,
|
||||
(u8 *)¬if->membership_status,
|
||||
(u8 *)¬if->user_position);
|
||||
}
|
||||
@@ -1965,7 +1965,7 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (WARN_ON(!chanctx_conf)) {
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
@@ -2181,7 +2181,7 @@ static void iwl_mvm_protect_assoc(struct iwl_mvm *mvm,
|
||||
static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
int ret;
|
||||
@@ -2191,7 +2191,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
* on the beacon interval, which was not known when the station
|
||||
* interface was added.
|
||||
*/
|
||||
if (changes & BSS_CHANGED_ASSOC && bss_conf->assoc) {
|
||||
if (changes & BSS_CHANGED_ASSOC && vif->cfg.assoc) {
|
||||
if (vif->bss_conf.he_support &&
|
||||
!iwlwifi_mod_params.disable_11ax)
|
||||
iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->ap_sta_id);
|
||||
@@ -2201,7 +2201,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
|
||||
/* Update MU EDCA params */
|
||||
if (changes & BSS_CHANGED_QOS && mvmvif->associated &&
|
||||
bss_conf->assoc && vif->bss_conf.he_support &&
|
||||
vif->cfg.assoc && vif->bss_conf.he_support &&
|
||||
!iwlwifi_mod_params.disable_11ax)
|
||||
iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->ap_sta_id);
|
||||
|
||||
@@ -2220,10 +2220,10 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
|
||||
/* after sending it once, adopt mac80211 data */
|
||||
memcpy(mvmvif->bssid, bss_conf->bssid, ETH_ALEN);
|
||||
mvmvif->associated = bss_conf->assoc;
|
||||
mvmvif->associated = vif->cfg.assoc;
|
||||
|
||||
if (changes & BSS_CHANGED_ASSOC) {
|
||||
if (bss_conf->assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
/* clear statistics to get clean beacon counter */
|
||||
iwl_mvm_request_statistics(mvm, true);
|
||||
memset(&mvmvif->beacon_stats, 0,
|
||||
@@ -2337,7 +2337,7 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
* However, on HW restart we should restore this data.
|
||||
*/
|
||||
if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
|
||||
(changes & BSS_CHANGED_MU_GROUPS) && vif->mu_mimo_owner) {
|
||||
(changes & BSS_CHANGED_MU_GROUPS) && vif->bss_conf.mu_mimo_owner) {
|
||||
ret = iwl_mvm_update_mu_groups(mvm, vif);
|
||||
if (ret)
|
||||
IWL_ERR(mvm,
|
||||
@@ -2396,7 +2396,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
}
|
||||
|
||||
static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
@@ -2522,8 +2523,22 @@ out_unlock:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_mvm_start_ap(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id)
|
||||
{
|
||||
return iwl_mvm_start_ap_ibss(hw, vif, link_id);
|
||||
}
|
||||
|
||||
static int iwl_mvm_start_ibss(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
return iwl_mvm_start_ap_ibss(hw, vif, 0);
|
||||
}
|
||||
|
||||
static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
@@ -2586,11 +2601,24 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
|
||||
mutex_unlock(&mvm->mutex);
|
||||
}
|
||||
|
||||
static void iwl_mvm_stop_ap(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id)
|
||||
{
|
||||
iwl_mvm_stop_ap_ibss(hw, vif, link_id);
|
||||
}
|
||||
|
||||
static void iwl_mvm_stop_ibss(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
iwl_mvm_stop_ap_ibss(hw, vif, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
|
||||
@@ -2621,13 +2649,13 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
|
||||
static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
if (changes & BSS_CHANGED_IDLE && !bss_conf->idle)
|
||||
if (changes & BSS_CHANGED_IDLE && !vif->cfg.idle)
|
||||
iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_SCHED, true);
|
||||
|
||||
switch (vif->type) {
|
||||
@@ -3020,7 +3048,7 @@ static void iwl_mvm_mei_host_associated(struct iwl_mvm *mvm,
|
||||
#if IS_ENABLED(CONFIG_IWLMEI)
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct iwl_mei_conn_info conn_info = {
|
||||
.ssid_len = vif->bss_conf.ssid_len,
|
||||
.ssid_len = vif->cfg.ssid_len,
|
||||
.channel = vif->bss_conf.chandef.chan->hw_value,
|
||||
};
|
||||
|
||||
@@ -3068,7 +3096,7 @@ static void iwl_mvm_mei_host_associated(struct iwl_mvm *mvm,
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(conn_info.ssid, vif->bss_conf.ssid, vif->bss_conf.ssid_len);
|
||||
memcpy(conn_info.ssid, vif->cfg.ssid, vif->cfg.ssid_len);
|
||||
memcpy(conn_info.bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||
|
||||
/* TODO: add support for collocated AP data */
|
||||
@@ -3381,7 +3409,7 @@ static int iwl_mvm_mac_sched_scan_start(struct ieee80211_hw *hw,
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
if (!vif->bss_conf.idle) {
|
||||
if (!vif->cfg.idle) {
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
@@ -3747,7 +3775,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm,
|
||||
* like the delay to be for 2-3 dtim intervals, in case there are
|
||||
* other time events with higher priority.
|
||||
*/
|
||||
if (vif->bss_conf.assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
delay = min_t(u32, dtim_interval * 3, AUX_ROC_MAX_DELAY);
|
||||
/* We cannot remain off-channel longer than the DTIM interval */
|
||||
if (dtim_interval <= req_dur) {
|
||||
@@ -4004,7 +4032,7 @@ static void iwl_mvm_ftm_responder_chanctx_iter(void *_data, u8 *mac,
|
||||
{
|
||||
struct iwl_mvm_ftm_responder_iter_data *data = _data;
|
||||
|
||||
if (rcu_access_pointer(vif->chanctx_conf) == data->ctx &&
|
||||
if (rcu_access_pointer(vif->bss_conf.chanctx_conf) == data->ctx &&
|
||||
vif->type == NL80211_IFTYPE_AP && vif->bss_conf.ftmr_params)
|
||||
data->responder = true;
|
||||
}
|
||||
@@ -4235,6 +4263,7 @@ out:
|
||||
}
|
||||
static int iwl_mvm_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
@@ -4308,6 +4337,7 @@ out:
|
||||
|
||||
static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
@@ -4502,7 +4532,7 @@ static int __iwl_mvm_mac_testmode_cmd(struct iwl_mvm *mvm,
|
||||
case IWL_MVM_TM_CMD_SET_BEACON_FILTER:
|
||||
/* must be associated client vif - ignore authorized */
|
||||
if (!vif || vif->type != NL80211_IFTYPE_STATION ||
|
||||
!vif->bss_conf.assoc || !vif->bss_conf.dtim_period ||
|
||||
!vif->cfg.assoc || !vif->bss_conf.dtim_period ||
|
||||
!tb[IWL_MVM_TM_ATTR_BEACON_FILTER_STATE])
|
||||
return -EINVAL;
|
||||
|
||||
@@ -4631,7 +4661,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||
csa_vif =
|
||||
rcu_dereference_protected(mvm->csa_vif,
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
if (WARN_ONCE(csa_vif && csa_vif->csa_active,
|
||||
if (WARN_ONCE(csa_vif && csa_vif->bss_conf.csa_active,
|
||||
"Another CSA is already in progress")) {
|
||||
ret = -EBUSY;
|
||||
goto out_unlock;
|
||||
@@ -4670,7 +4700,7 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw,
|
||||
* we don't know the dtim period. In this case, the firmware can't
|
||||
* track the beacons.
|
||||
*/
|
||||
if (!vif->bss_conf.assoc || !vif->bss_conf.dtim_period) {
|
||||
if (!vif->cfg.assoc || !vif->bss_conf.dtim_period) {
|
||||
ret = -EBUSY;
|
||||
goto out_unlock;
|
||||
}
|
||||
@@ -5069,7 +5099,7 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
|
||||
if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER))
|
||||
return;
|
||||
|
||||
if (!vif->bss_conf.assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
return;
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
@@ -5406,10 +5436,10 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||
.unassign_vif_chanctx = iwl_mvm_unassign_vif_chanctx,
|
||||
.switch_vif_chanctx = iwl_mvm_switch_vif_chanctx,
|
||||
|
||||
.start_ap = iwl_mvm_start_ap_ibss,
|
||||
.stop_ap = iwl_mvm_stop_ap_ibss,
|
||||
.join_ibss = iwl_mvm_start_ap_ibss,
|
||||
.leave_ibss = iwl_mvm_stop_ap_ibss,
|
||||
.start_ap = iwl_mvm_start_ap,
|
||||
.stop_ap = iwl_mvm_stop_ap,
|
||||
.join_ibss = iwl_mvm_start_ibss,
|
||||
.leave_ibss = iwl_mvm_stop_ibss,
|
||||
|
||||
.tx_last_beacon = iwl_mvm_tx_last_beacon,
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015 Intel Deutschland GmbH
|
||||
*/
|
||||
@@ -192,9 +192,9 @@ int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm,
|
||||
size = sizeof(cmd.v1);
|
||||
}
|
||||
|
||||
if (vif->bss_conf.arp_addr_cnt) {
|
||||
if (vif->cfg.arp_addr_cnt) {
|
||||
enabled |= IWL_D3_PROTO_OFFLOAD_ARP | IWL_D3_PROTO_IPV4_VALID;
|
||||
common->host_ipv4_addr = vif->bss_conf.arp_addr_list[0];
|
||||
common->host_ipv4_addr = vif->cfg.arp_addr_list[0];
|
||||
memcpy(common->arp_mac_addr, vif->addr, ETH_ALEN);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ static void iwl_mvm_rx_monitor_notif(struct iwl_mvm *mvm,
|
||||
vif->bss_conf.chandef.width < NL80211_CHAN_WIDTH_40)
|
||||
return;
|
||||
|
||||
if (!vif->bss_conf.assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
return;
|
||||
|
||||
/* this shouldn't happen *again*, ignore it */
|
||||
|
||||
@@ -223,7 +223,7 @@ static void iwl_mvm_p2p_standalone_iterator(void *_data, u8 *mac,
|
||||
*is_p2p_standalone = false;
|
||||
break;
|
||||
case NL80211_IFTYPE_STATION:
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
*is_p2p_standalone = false;
|
||||
break;
|
||||
|
||||
@@ -283,7 +283,7 @@ static bool iwl_mvm_power_is_radar(struct ieee80211_vif *vif)
|
||||
bool radar_detect = false;
|
||||
|
||||
rcu_read_lock();
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
WARN_ON(!chanctx_conf);
|
||||
if (chanctx_conf) {
|
||||
chan = chanctx_conf->def.chan;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018, 2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018, 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ static void iwl_mvm_quota_iterator(void *_data, u8 *mac,
|
||||
|
||||
switch (vif->type) {
|
||||
case NL80211_IFTYPE_STATION:
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
break;
|
||||
return;
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
||||
@@ -1980,7 +1980,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm,
|
||||
#endif
|
||||
|
||||
rcu_read_lock();
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
if (WARN_ON(!chanctx_conf))
|
||||
band = NUM_NL80211_BANDS;
|
||||
else
|
||||
|
||||
@@ -1948,14 +1948,14 @@ static void iwl_mvm_scan_6ghz_passive_scan(struct iwl_mvm *mvm,
|
||||
* reset or resume flow, or while not associated and a large interval
|
||||
* has passed since the last 6GHz passive scan.
|
||||
*/
|
||||
if ((vif->bss_conf.assoc ||
|
||||
if ((vif->cfg.assoc ||
|
||||
time_after(mvm->last_6ghz_passive_scan_jiffies +
|
||||
(IWL_MVM_6GHZ_PASSIVE_SCAN_TIMEOUT * HZ), jiffies)) &&
|
||||
(time_before(mvm->last_reset_or_resume_time_jiffies +
|
||||
(IWL_MVM_6GHZ_PASSIVE_SCAN_ASSOC_TIMEOUT * HZ),
|
||||
jiffies))) {
|
||||
IWL_DEBUG_SCAN(mvm, "6GHz passive scan: %s\n",
|
||||
vif->bss_conf.assoc ? "associated" :
|
||||
vif->cfg.assoc ? "associated" :
|
||||
"timeout did not expire");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2013-2014, 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2013-2014, 2018-2019, 2022 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
*/
|
||||
#include "mvm.h"
|
||||
@@ -31,7 +31,7 @@ static void iwl_mvm_bound_iface_iterator(void *_data, u8 *mac,
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION) {
|
||||
data->sta_vif_ap_sta_id = mvmvif->ap_sta_id;
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
data->sta_vif_state = SF_FULL_ON;
|
||||
else
|
||||
data->sta_vif_state = SF_INIT_OFF;
|
||||
@@ -261,7 +261,7 @@ int iwl_mvm_sf_update(struct iwl_mvm *mvm, struct ieee80211_vif *changed_vif,
|
||||
return -EINVAL;
|
||||
if (changed_vif->type != NL80211_IFTYPE_STATION) {
|
||||
new_state = SF_UNINIT;
|
||||
} else if (changed_vif->bss_conf.assoc &&
|
||||
} else if (changed_vif->cfg.assoc &&
|
||||
changed_vif->bss_conf.dtim_period) {
|
||||
mvmvif = iwl_mvm_vif_from_mac80211(changed_vif);
|
||||
sta_id = mvmvif->ap_sta_id;
|
||||
|
||||
@@ -1948,7 +1948,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
|
||||
if (vif->type == NL80211_IFTYPE_STATION &&
|
||||
mvmvif->ap_sta_id == sta_id) {
|
||||
/* if associated - we can't remove the AP STA now */
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
return ret;
|
||||
|
||||
/* unassoc - go ahead - remove the AP STA now */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2020, 2022 Intel Corporation
|
||||
*/
|
||||
#include <linux/etherdevice.h>
|
||||
#include "mvm.h"
|
||||
@@ -380,7 +380,7 @@ iwl_mvm_tdls_config_channel_switch(struct iwl_mvm *mvm,
|
||||
type == TDLS_MOVE_CH) {
|
||||
/* we need to return to base channel */
|
||||
struct ieee80211_chanctx_conf *chanctx =
|
||||
rcu_dereference(vif->chanctx_conf);
|
||||
rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
|
||||
if (WARN_ON_ONCE(!chanctx)) {
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ static void iwl_mvm_csa_noa_start(struct iwl_mvm *mvm)
|
||||
rcu_read_lock();
|
||||
|
||||
csa_vif = rcu_dereference(mvm->csa_vif);
|
||||
if (!csa_vif || !csa_vif->csa_active)
|
||||
if (!csa_vif || !csa_vif->bss_conf.csa_active)
|
||||
goto out_unlock;
|
||||
|
||||
IWL_DEBUG_TE(mvm, "CSA NOA started\n");
|
||||
@@ -160,7 +160,7 @@ static bool iwl_mvm_te_check_disconnect(struct iwl_mvm *mvm,
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return false;
|
||||
|
||||
if (!mvmvif->csa_bcn_pending && vif->bss_conf.assoc &&
|
||||
if (!mvmvif->csa_bcn_pending && vif->cfg.assoc &&
|
||||
vif->bss_conf.dtim_period)
|
||||
return false;
|
||||
if (errmsg)
|
||||
@@ -176,7 +176,7 @@ static bool iwl_mvm_te_check_disconnect(struct iwl_mvm *mvm,
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
if (vif->bss_conf.assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
/*
|
||||
* When not associated, this will be called from
|
||||
* iwl_mvm_event_mlme_callback_ini()
|
||||
@@ -346,7 +346,7 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm,
|
||||
* and know the dtim period.
|
||||
*/
|
||||
iwl_mvm_te_check_disconnect(mvm, te_data->vif,
|
||||
!te_data->vif->bss_conf.assoc ?
|
||||
!te_data->vif->cfg.assoc ?
|
||||
"Not associated and the time event is over already..." :
|
||||
"No beacon heard and the time event is over already...");
|
||||
break;
|
||||
@@ -859,7 +859,7 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm,
|
||||
* and know the dtim period.
|
||||
*/
|
||||
iwl_mvm_te_check_disconnect(mvm, vif,
|
||||
!vif->bss_conf.assoc ?
|
||||
!vif->cfg.assoc ?
|
||||
"Not associated and the session protection is over already..." :
|
||||
"No beacon heard and the session protection is over already...");
|
||||
spin_lock_bh(&mvm->time_event_lock);
|
||||
|
||||
@@ -1959,7 +1959,7 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,
|
||||
|
||||
if (mvmsta->vif)
|
||||
chanctx_conf =
|
||||
rcu_dereference(mvmsta->vif->chanctx_conf);
|
||||
rcu_dereference(mvmsta->vif->bss_conf.chanctx_conf);
|
||||
|
||||
if (WARN_ON_ONCE(!chanctx_conf))
|
||||
goto out;
|
||||
|
||||
@@ -304,7 +304,7 @@ void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
smps_mode = IEEE80211_SMPS_DYNAMIC;
|
||||
}
|
||||
|
||||
ieee80211_request_smps(vif, smps_mode);
|
||||
ieee80211_request_smps(vif, 0, smps_mode);
|
||||
}
|
||||
|
||||
static bool iwl_wait_stats_complete(struct iwl_notif_wait_data *notif_wait,
|
||||
@@ -604,7 +604,7 @@ static void iwl_mvm_sta_iface_iterator(void *_data, u8 *mac,
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return;
|
||||
|
||||
if (vif->bss_conf.assoc)
|
||||
if (vif->cfg.assoc)
|
||||
data->assoc = true;
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@ static void iwl_mvm_uapsd_agg_disconnect(struct iwl_mvm *mvm,
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return;
|
||||
|
||||
if (!vif->bss_conf.assoc)
|
||||
if (!vif->cfg.assoc)
|
||||
return;
|
||||
|
||||
if (!mvmvif->queue_params[IEEE80211_AC_VO].uapsd &&
|
||||
|
||||
@@ -139,7 +139,7 @@ static int p54_beacon_update(struct p54_common *priv,
|
||||
struct sk_buff *beacon;
|
||||
int ret;
|
||||
|
||||
beacon = ieee80211_beacon_get(priv->hw, vif);
|
||||
beacon = ieee80211_beacon_get(priv->hw, vif, 0);
|
||||
if (!beacon)
|
||||
return -ENOMEM;
|
||||
ret = p54_beacon_format_ie_tim(beacon);
|
||||
@@ -449,7 +449,7 @@ static int p54_get_stats(struct ieee80211_hw *dev,
|
||||
static void p54_bss_info_changed(struct ieee80211_hw *dev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct p54_common *priv = dev->priv;
|
||||
|
||||
@@ -480,8 +480,8 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev,
|
||||
p54_scan(priv, P54_SCAN_EXIT, 0);
|
||||
}
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
if (info->assoc) {
|
||||
priv->aid = info->aid;
|
||||
if (vif->cfg.assoc) {
|
||||
priv->aid = vif->cfg.aid;
|
||||
priv->wakeup_timer = info->beacon_int *
|
||||
info->dtim_period * 5;
|
||||
p54_setup_mac(priv);
|
||||
|
||||
@@ -65,6 +65,10 @@ static bool support_p2p_device = true;
|
||||
module_param(support_p2p_device, bool, 0444);
|
||||
MODULE_PARM_DESC(support_p2p_device, "Support P2P-Device interface type");
|
||||
|
||||
static bool mlo;
|
||||
module_param(mlo, bool, 0444);
|
||||
MODULE_PARM_DESC(mlo, "Support MLO");
|
||||
|
||||
/**
|
||||
* enum hwsim_regtest - the type of regulatory tests we offer
|
||||
*
|
||||
@@ -623,6 +627,12 @@ static struct platform_driver mac80211_hwsim_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
struct mac80211_hwsim_link_data {
|
||||
u32 link_id;
|
||||
u64 beacon_int /* beacon interval in us */;
|
||||
struct hrtimer beacon_timer;
|
||||
};
|
||||
|
||||
struct mac80211_hwsim_data {
|
||||
struct list_head list;
|
||||
struct rhash_head rht;
|
||||
@@ -668,18 +678,16 @@ struct mac80211_hwsim_data {
|
||||
|
||||
struct ieee80211_channel *channel;
|
||||
enum nl80211_chan_width bw;
|
||||
u64 beacon_int /* beacon interval in us */;
|
||||
unsigned int rx_filter;
|
||||
bool started, idle, scanning;
|
||||
struct mutex mutex;
|
||||
struct hrtimer beacon_timer;
|
||||
enum ps_mode {
|
||||
PS_DISABLED, PS_ENABLED, PS_AUTO_POLL, PS_MANUAL_POLL
|
||||
} ps;
|
||||
bool ps_poll_pending;
|
||||
struct dentry *debugfs;
|
||||
|
||||
uintptr_t pending_cookie;
|
||||
atomic64_t pending_cookie;
|
||||
struct sk_buff_head pending; /* packets pending */
|
||||
/*
|
||||
* Only radios in the same group can communicate together (the
|
||||
@@ -709,6 +717,8 @@ struct mac80211_hwsim_data {
|
||||
|
||||
/* RSSI in rx status of the receiver */
|
||||
int rx_rssi;
|
||||
|
||||
struct mac80211_hwsim_link_data link_data[IEEE80211_MLD_MAX_NUM_LINKS];
|
||||
};
|
||||
|
||||
static const struct rhashtable_params hwsim_rht_params = {
|
||||
@@ -776,6 +786,7 @@ static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {
|
||||
[HWSIM_ATTR_PERM_ADDR] = NLA_POLICY_ETH_ADDR_COMPAT,
|
||||
[HWSIM_ATTR_IFTYPE_SUPPORT] = { .type = NLA_U32 },
|
||||
[HWSIM_ATTR_CIPHER_SUPPORT] = { .type = NLA_BINARY },
|
||||
[HWSIM_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
|
||||
};
|
||||
|
||||
#if IS_REACHABLE(CONFIG_VIRTIO)
|
||||
@@ -888,7 +899,7 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
|
||||
|
||||
rcu_read_lock();
|
||||
mac80211_hwsim_tx_frame(data->hw, skb,
|
||||
rcu_dereference(vif->chanctx_conf)->def.chan);
|
||||
rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -921,7 +932,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
|
||||
|
||||
rcu_read_lock();
|
||||
mac80211_hwsim_tx_frame(data->hw, skb,
|
||||
rcu_dereference(vif->chanctx_conf)->def.chan);
|
||||
rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
@@ -1071,7 +1082,8 @@ static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct mac80211_hwsim_data *data = hw->priv;
|
||||
u64 now = mac80211_hwsim_get_tsf(hw, vif);
|
||||
u32 bcn_int = data->beacon_int;
|
||||
/* MLD not supported here */
|
||||
u32 bcn_int = data->link_data[0].beacon_int;
|
||||
u64 delta = abs(tsf - now);
|
||||
|
||||
/* adjust after beaconing with new timestamp at old TBTT */
|
||||
@@ -1346,7 +1358,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
|
||||
int i;
|
||||
struct hwsim_tx_rate tx_attempts[IEEE80211_TX_MAX_RATES];
|
||||
struct hwsim_tx_rate_flag tx_attempts_flags[IEEE80211_TX_MAX_RATES];
|
||||
uintptr_t cookie;
|
||||
u64 cookie;
|
||||
|
||||
if (data->ps != PS_DISABLED)
|
||||
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
|
||||
@@ -1415,8 +1427,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
|
||||
goto nla_put_failure;
|
||||
|
||||
/* We create a cookie to identify this skb */
|
||||
data->pending_cookie++;
|
||||
cookie = data->pending_cookie;
|
||||
cookie = (u64)atomic64_inc_return(&data->pending_cookie);
|
||||
info->rate_driver_data[0] = (void *)cookie;
|
||||
if (nla_put_u64_64bit(skb, HWSIM_ATTR_COOKIE, cookie, HWSIM_ATTR_PAD))
|
||||
goto nla_put_failure;
|
||||
@@ -1464,11 +1475,11 @@ static void mac80211_hwsim_tx_iter(void *_data, u8 *addr,
|
||||
{
|
||||
struct tx_iter_data *data = _data;
|
||||
|
||||
if (!vif->chanctx_conf)
|
||||
if (!vif->bss_conf.chanctx_conf)
|
||||
return;
|
||||
|
||||
if (!hwsim_chans_compat(data->channel,
|
||||
rcu_dereference(vif->chanctx_conf)->def.chan))
|
||||
rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan))
|
||||
return;
|
||||
|
||||
data->receive = true;
|
||||
@@ -1686,7 +1697,11 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
|
||||
} else if (txi->hw_queue == 4) {
|
||||
channel = data->tmp_chan;
|
||||
} else {
|
||||
chanctx_conf = rcu_dereference(txi->control.vif->chanctx_conf);
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
|
||||
bss_conf = &txi->control.vif->bss_conf;
|
||||
|
||||
chanctx_conf = rcu_dereference(bss_conf->chanctx_conf);
|
||||
if (chanctx_conf) {
|
||||
channel = chanctx_conf->def.chan;
|
||||
confbw = chanctx_conf->def.width;
|
||||
@@ -1794,9 +1809,12 @@ static int mac80211_hwsim_start(struct ieee80211_hw *hw)
|
||||
static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct mac80211_hwsim_data *data = hw->priv;
|
||||
int i;
|
||||
|
||||
data->started = false;
|
||||
hrtimer_cancel(&data->beacon_timer);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(data->link_data); i++)
|
||||
hrtimer_cancel(&data->link_data[i].beacon_timer);
|
||||
|
||||
while (!skb_queue_empty(&data->pending))
|
||||
ieee80211_free_txskb(hw, skb_dequeue(&data->pending));
|
||||
@@ -1887,7 +1905,12 @@ static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
|
||||
static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mac80211_hwsim_data *data = arg;
|
||||
struct mac80211_hwsim_link_data *link_data = arg;
|
||||
u32 link_id = link_data->link_id;
|
||||
struct ieee80211_bss_conf *link_conf = vif->link_conf[link_id];
|
||||
struct mac80211_hwsim_data *data =
|
||||
container_of(link_data, struct mac80211_hwsim_data,
|
||||
link_data[link_id]);
|
||||
struct ieee80211_hw *hw = data->hw;
|
||||
struct ieee80211_tx_info *info;
|
||||
struct ieee80211_rate *txrate;
|
||||
@@ -1904,7 +1927,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
|
||||
vif->type != NL80211_IFTYPE_OCB)
|
||||
return;
|
||||
|
||||
skb = ieee80211_beacon_get(hw, vif);
|
||||
skb = ieee80211_beacon_get(hw, vif, link_data->link_id);
|
||||
if (skb == NULL)
|
||||
return;
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
@@ -1935,38 +1958,41 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
|
||||
}
|
||||
|
||||
mac80211_hwsim_tx_frame(hw, skb,
|
||||
rcu_dereference(vif->chanctx_conf)->def.chan);
|
||||
rcu_dereference(link_conf->chanctx_conf)->def.chan);
|
||||
|
||||
while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) {
|
||||
mac80211_hwsim_tx_frame(hw, skb,
|
||||
rcu_dereference(vif->chanctx_conf)->def.chan);
|
||||
rcu_dereference(link_conf->chanctx_conf)->def.chan);
|
||||
}
|
||||
|
||||
if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
if (link_conf->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
ieee80211_csa_finish(vif);
|
||||
}
|
||||
|
||||
static enum hrtimer_restart
|
||||
mac80211_hwsim_beacon(struct hrtimer *timer)
|
||||
{
|
||||
struct mac80211_hwsim_link_data *link_data =
|
||||
container_of(timer, struct mac80211_hwsim_link_data, beacon_timer);
|
||||
struct mac80211_hwsim_data *data =
|
||||
container_of(timer, struct mac80211_hwsim_data, beacon_timer);
|
||||
container_of(link_data, struct mac80211_hwsim_data,
|
||||
link_data[link_data->link_id]);
|
||||
struct ieee80211_hw *hw = data->hw;
|
||||
u64 bcn_int = data->beacon_int;
|
||||
u64 bcn_int = link_data->beacon_int;
|
||||
|
||||
if (!data->started)
|
||||
return HRTIMER_NORESTART;
|
||||
|
||||
ieee80211_iterate_active_interfaces_atomic(
|
||||
hw, IEEE80211_IFACE_ITER_NORMAL,
|
||||
mac80211_hwsim_beacon_tx, data);
|
||||
mac80211_hwsim_beacon_tx, link_data);
|
||||
|
||||
/* beacon at new TBTT + beacon interval */
|
||||
if (data->bcn_delta) {
|
||||
bcn_int -= data->bcn_delta;
|
||||
data->bcn_delta = 0;
|
||||
}
|
||||
hrtimer_forward_now(&data->beacon_timer,
|
||||
hrtimer_forward_now(&link_data->beacon_timer,
|
||||
ns_to_ktime(bcn_int * NSEC_PER_USEC));
|
||||
return HRTIMER_RESTART;
|
||||
}
|
||||
@@ -2050,16 +2076,21 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
if (!data->started || !data->beacon_int)
|
||||
hrtimer_cancel(&data->beacon_timer);
|
||||
else if (!hrtimer_is_queued(&data->beacon_timer)) {
|
||||
u64 tsf = mac80211_hwsim_get_tsf(hw, NULL);
|
||||
u32 bcn_int = data->beacon_int;
|
||||
u64 until_tbtt = bcn_int - do_div(tsf, bcn_int);
|
||||
for (idx = 0; idx < ARRAY_SIZE(data->link_data); idx++) {
|
||||
struct mac80211_hwsim_link_data *link_data =
|
||||
&data->link_data[idx];
|
||||
|
||||
hrtimer_start(&data->beacon_timer,
|
||||
ns_to_ktime(until_tbtt * NSEC_PER_USEC),
|
||||
HRTIMER_MODE_REL_SOFT);
|
||||
if (!data->started || !link_data->beacon_int) {
|
||||
hrtimer_cancel(&link_data->beacon_timer);
|
||||
} else if (!hrtimer_is_queued(&link_data->beacon_timer)) {
|
||||
u64 tsf = mac80211_hwsim_get_tsf(hw, NULL);
|
||||
u32 bcn_int = link_data->beacon_int;
|
||||
u64 until_tbtt = bcn_int - do_div(tsf, bcn_int);
|
||||
|
||||
hrtimer_start(&link_data->beacon_timer,
|
||||
ns_to_ktime(until_tbtt * NSEC_PER_USEC),
|
||||
HRTIMER_MODE_REL_SOFT);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2093,47 +2124,61 @@ static void mac80211_hwsim_bcn_en_iter(void *data, u8 *mac,
|
||||
(*count)++;
|
||||
}
|
||||
|
||||
static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
|
||||
static void mac80211_hwsim_vif_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
|
||||
struct mac80211_hwsim_data *data = hw->priv;
|
||||
|
||||
hwsim_check_magic(vif);
|
||||
|
||||
wiphy_dbg(hw->wiphy, "%s(changed=0x%x vif->addr=%pM)\n",
|
||||
wiphy_dbg(hw->wiphy, "%s(changed=0x%llx vif->addr=%pM)\n",
|
||||
__func__, changed, vif->addr);
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
wiphy_dbg(hw->wiphy, " ASSOC: assoc=%d aid=%d\n",
|
||||
vif->cfg.assoc, vif->cfg.aid);
|
||||
vp->assoc = vif->cfg.assoc;
|
||||
vp->aid = vif->cfg.aid;
|
||||
}
|
||||
}
|
||||
|
||||
static void mac80211_hwsim_link_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
u32 link_id,
|
||||
u64 changed)
|
||||
{
|
||||
struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
|
||||
struct mac80211_hwsim_data *data = hw->priv;
|
||||
struct ieee80211_bss_conf *info = vif->link_conf[link_id];
|
||||
struct mac80211_hwsim_link_data *link_data = &data->link_data[link_id];
|
||||
|
||||
hwsim_check_magic(vif);
|
||||
|
||||
wiphy_dbg(hw->wiphy, "%s(changed=0x%llx vif->addr=%pM, link id %u)\n",
|
||||
__func__, (unsigned long long)changed, vif->addr, link_id);
|
||||
|
||||
if (changed & BSS_CHANGED_BSSID) {
|
||||
wiphy_dbg(hw->wiphy, "%s: BSSID changed: %pM\n",
|
||||
__func__, info->bssid);
|
||||
memcpy(vp->bssid, info->bssid, ETH_ALEN);
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
wiphy_dbg(hw->wiphy, " ASSOC: assoc=%d aid=%d\n",
|
||||
info->assoc, info->aid);
|
||||
vp->assoc = info->assoc;
|
||||
vp->aid = info->aid;
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_BEACON_ENABLED) {
|
||||
wiphy_dbg(hw->wiphy, " BCN EN: %d (BI=%u)\n",
|
||||
info->enable_beacon, info->beacon_int);
|
||||
vp->bcn_en = info->enable_beacon;
|
||||
if (data->started &&
|
||||
!hrtimer_is_queued(&data->beacon_timer) &&
|
||||
!hrtimer_is_queued(&link_data->beacon_timer) &&
|
||||
info->enable_beacon) {
|
||||
u64 tsf, until_tbtt;
|
||||
u32 bcn_int;
|
||||
data->beacon_int = info->beacon_int * 1024;
|
||||
link_data->beacon_int = info->beacon_int * 1024;
|
||||
tsf = mac80211_hwsim_get_tsf(hw, vif);
|
||||
bcn_int = data->beacon_int;
|
||||
bcn_int = link_data->beacon_int;
|
||||
until_tbtt = bcn_int - do_div(tsf, bcn_int);
|
||||
|
||||
hrtimer_start(&data->beacon_timer,
|
||||
hrtimer_start(&link_data->beacon_timer,
|
||||
ns_to_ktime(until_tbtt * NSEC_PER_USEC),
|
||||
HRTIMER_MODE_REL_SOFT);
|
||||
} else if (!info->enable_beacon) {
|
||||
@@ -2144,8 +2189,8 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
|
||||
wiphy_dbg(hw->wiphy, " beaconing vifs remaining: %u",
|
||||
count);
|
||||
if (count == 0) {
|
||||
hrtimer_cancel(&data->beacon_timer);
|
||||
data->beacon_int = 0;
|
||||
hrtimer_cancel(&link_data->beacon_timer);
|
||||
link_data->beacon_int = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2204,7 +2249,7 @@ mac80211_hwsim_sta_rc_update(struct ieee80211_hw *hw,
|
||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||
|
||||
rcu_read_lock();
|
||||
chanctx_conf = rcu_dereference(vif->chanctx_conf);
|
||||
chanctx_conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
||||
|
||||
if (!WARN_ON(!chanctx_conf))
|
||||
confbw = chanctx_conf->def.width;
|
||||
@@ -2718,6 +2763,7 @@ static void mac80211_hwsim_change_chanctx(struct ieee80211_hw *hw,
|
||||
|
||||
static int mac80211_hwsim_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
hwsim_check_magic(vif);
|
||||
@@ -2728,6 +2774,7 @@ static int mac80211_hwsim_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
|
||||
static void mac80211_hwsim_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
unsigned int link_id,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
hwsim_check_magic(vif);
|
||||
@@ -2788,6 +2835,27 @@ static int mac80211_hwsim_tx_last_beacon(struct ieee80211_hw *hw)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int mac80211_hwsim_change_vif_links(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
u16 old_links, u16 new_links,
|
||||
struct ieee80211_bss_conf *old[IEEE80211_MLD_MAX_NUM_LINKS])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mac80211_hwsim_change_sta_links(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
u16 old_links, u16 new_links)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define HWSIM_COMMON_OPS \
|
||||
.tx = mac80211_hwsim_tx, \
|
||||
.start = mac80211_hwsim_start, \
|
||||
@@ -2797,43 +2865,57 @@ static int mac80211_hwsim_tx_last_beacon(struct ieee80211_hw *hw)
|
||||
.remove_interface = mac80211_hwsim_remove_interface, \
|
||||
.config = mac80211_hwsim_config, \
|
||||
.configure_filter = mac80211_hwsim_configure_filter, \
|
||||
.bss_info_changed = mac80211_hwsim_bss_info_changed, \
|
||||
.vif_cfg_changed = mac80211_hwsim_vif_info_changed, \
|
||||
.link_info_changed = mac80211_hwsim_link_info_changed, \
|
||||
.tx_last_beacon = mac80211_hwsim_tx_last_beacon, \
|
||||
.sta_add = mac80211_hwsim_sta_add, \
|
||||
.sta_remove = mac80211_hwsim_sta_remove, \
|
||||
.sta_notify = mac80211_hwsim_sta_notify, \
|
||||
.sta_rc_update = mac80211_hwsim_sta_rc_update, \
|
||||
.set_tim = mac80211_hwsim_set_tim, \
|
||||
.conf_tx = mac80211_hwsim_conf_tx, \
|
||||
.get_survey = mac80211_hwsim_get_survey, \
|
||||
CFG80211_TESTMODE_CMD(mac80211_hwsim_testmode_cmd) \
|
||||
.ampdu_action = mac80211_hwsim_ampdu_action, \
|
||||
.flush = mac80211_hwsim_flush, \
|
||||
.get_tsf = mac80211_hwsim_get_tsf, \
|
||||
.set_tsf = mac80211_hwsim_set_tsf, \
|
||||
.get_et_sset_count = mac80211_hwsim_get_et_sset_count, \
|
||||
.get_et_stats = mac80211_hwsim_get_et_stats, \
|
||||
.get_et_strings = mac80211_hwsim_get_et_strings,
|
||||
|
||||
#define HWSIM_NON_MLO_OPS \
|
||||
.set_tim = mac80211_hwsim_set_tim, \
|
||||
.get_tsf = mac80211_hwsim_get_tsf, \
|
||||
.set_tsf = mac80211_hwsim_set_tsf,
|
||||
|
||||
static const struct ieee80211_ops mac80211_hwsim_ops = {
|
||||
HWSIM_COMMON_OPS
|
||||
HWSIM_NON_MLO_OPS
|
||||
.sw_scan_start = mac80211_hwsim_sw_scan,
|
||||
.sw_scan_complete = mac80211_hwsim_sw_scan_complete,
|
||||
};
|
||||
|
||||
#define HWSIM_CHANCTX_OPS \
|
||||
.hw_scan = mac80211_hwsim_hw_scan, \
|
||||
.cancel_hw_scan = mac80211_hwsim_cancel_hw_scan, \
|
||||
.remain_on_channel = mac80211_hwsim_roc, \
|
||||
.cancel_remain_on_channel = mac80211_hwsim_croc, \
|
||||
.add_chanctx = mac80211_hwsim_add_chanctx, \
|
||||
.remove_chanctx = mac80211_hwsim_remove_chanctx, \
|
||||
.change_chanctx = mac80211_hwsim_change_chanctx, \
|
||||
.assign_vif_chanctx = mac80211_hwsim_assign_vif_chanctx,\
|
||||
.unassign_vif_chanctx = mac80211_hwsim_unassign_vif_chanctx,
|
||||
|
||||
static const struct ieee80211_ops mac80211_hwsim_mchan_ops = {
|
||||
HWSIM_COMMON_OPS
|
||||
.hw_scan = mac80211_hwsim_hw_scan,
|
||||
.cancel_hw_scan = mac80211_hwsim_cancel_hw_scan,
|
||||
.sw_scan_start = NULL,
|
||||
.sw_scan_complete = NULL,
|
||||
.remain_on_channel = mac80211_hwsim_roc,
|
||||
.cancel_remain_on_channel = mac80211_hwsim_croc,
|
||||
.add_chanctx = mac80211_hwsim_add_chanctx,
|
||||
.remove_chanctx = mac80211_hwsim_remove_chanctx,
|
||||
.change_chanctx = mac80211_hwsim_change_chanctx,
|
||||
.assign_vif_chanctx = mac80211_hwsim_assign_vif_chanctx,
|
||||
.unassign_vif_chanctx = mac80211_hwsim_unassign_vif_chanctx,
|
||||
HWSIM_NON_MLO_OPS
|
||||
HWSIM_CHANCTX_OPS
|
||||
};
|
||||
|
||||
static const struct ieee80211_ops mac80211_hwsim_mlo_ops = {
|
||||
HWSIM_COMMON_OPS
|
||||
HWSIM_CHANCTX_OPS
|
||||
.set_rts_threshold = mac80211_hwsim_set_rts_threshold,
|
||||
.change_vif_links = mac80211_hwsim_change_vif_links,
|
||||
.change_sta_links = mac80211_hwsim_change_sta_links,
|
||||
};
|
||||
|
||||
struct hwsim_new_radio_params {
|
||||
@@ -2850,6 +2932,7 @@ struct hwsim_new_radio_params {
|
||||
u32 iftypes;
|
||||
u32 *ciphers;
|
||||
u8 n_ciphers;
|
||||
bool mlo;
|
||||
};
|
||||
|
||||
static void hwsim_mcast_config_msg(struct sk_buff *mcast_skb,
|
||||
@@ -3543,7 +3626,9 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
idx = hwsim_radio_idx++;
|
||||
spin_unlock_bh(&hwsim_radio_lock);
|
||||
|
||||
if (param->use_chanctx)
|
||||
if (param->mlo)
|
||||
ops = &mac80211_hwsim_mlo_ops;
|
||||
else if (param->use_chanctx)
|
||||
ops = &mac80211_hwsim_mchan_ops;
|
||||
hw = ieee80211_alloc_hw_nm(sizeof(*data), ops, param->hwname);
|
||||
if (!hw) {
|
||||
@@ -3704,13 +3789,22 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
ieee80211_hw_set(hw, SIGNAL_DBM);
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
|
||||
ieee80211_hw_set(hw, TDLS_WIDER_BW);
|
||||
if (rctbl)
|
||||
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
|
||||
ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
|
||||
|
||||
if (param->mlo) {
|
||||
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
|
||||
ieee80211_hw_set(hw, CONNECTION_MONITOR);
|
||||
ieee80211_hw_set(hw, AP_LINK_PS);
|
||||
} else {
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
|
||||
if (rctbl)
|
||||
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
|
||||
}
|
||||
|
||||
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
|
||||
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
|
||||
@@ -3855,9 +3949,13 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
hrtimer_init(&data->beacon_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS_SOFT);
|
||||
data->beacon_timer.function = mac80211_hwsim_beacon;
|
||||
for (i = 0; i < ARRAY_SIZE(data->link_data); i++) {
|
||||
hrtimer_init(&data->link_data[i].beacon_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS_SOFT);
|
||||
data->link_data[i].beacon_timer.function =
|
||||
mac80211_hwsim_beacon;
|
||||
data->link_data[i].link_id = i;
|
||||
}
|
||||
|
||||
err = ieee80211_register_hw(hw);
|
||||
if (err < 0) {
|
||||
@@ -4079,6 +4177,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
||||
const u8 *src;
|
||||
unsigned int hwsim_flags;
|
||||
int i;
|
||||
unsigned long flags;
|
||||
bool found = false;
|
||||
|
||||
if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] ||
|
||||
@@ -4106,6 +4205,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
||||
}
|
||||
|
||||
/* look for the skb matching the cookie passed back from user */
|
||||
spin_lock_irqsave(&data2->pending.lock, flags);
|
||||
skb_queue_walk_safe(&data2->pending, skb, tmp) {
|
||||
u64 skb_cookie;
|
||||
|
||||
@@ -4113,11 +4213,12 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
|
||||
skb_cookie = (u64)(uintptr_t)txi->rate_driver_data[0];
|
||||
|
||||
if (skb_cookie == ret_skb_cookie) {
|
||||
skb_unlink(skb, &data2->pending);
|
||||
__skb_unlink(skb, &data2->pending);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&data2->pending.lock, flags);
|
||||
|
||||
/* not found */
|
||||
if (!found)
|
||||
@@ -4425,6 +4526,11 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||
}
|
||||
}
|
||||
|
||||
param.mlo = info->attrs[HWSIM_ATTR_MLO_SUPPORT];
|
||||
|
||||
if (param.mlo)
|
||||
param.use_chanctx = true;
|
||||
|
||||
if (info->attrs[HWSIM_ATTR_RADIO_NAME]) {
|
||||
hwname = kstrndup((char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
@@ -5081,7 +5187,8 @@ static int __init init_mac80211_hwsim(void)
|
||||
}
|
||||
|
||||
param.p2p_device = support_p2p_device;
|
||||
param.use_chanctx = channels > 1;
|
||||
param.mlo = mlo;
|
||||
param.use_chanctx = channels > 1 || mlo;
|
||||
param.iftypes = HWSIM_IFTYPE_SUPPORT_MASK;
|
||||
if (param.p2p_device)
|
||||
param.iftypes |= BIT(NL80211_IFTYPE_P2P_DEVICE);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
|
||||
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2011, Javier Lopez <jlopex@gmail.com>
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020, 2022 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __MAC80211_HWSIM_H
|
||||
@@ -140,6 +140,8 @@ enum {
|
||||
* @HWSIM_ATTR_PERM_ADDR: permanent mac address of new radio
|
||||
* @HWSIM_ATTR_IFTYPE_SUPPORT: u32 attribute of supported interface types bits
|
||||
* @HWSIM_ATTR_CIPHER_SUPPORT: u32 array of supported cipher types
|
||||
* @HWSIM_ATTR_MLO_SUPPORT: claim MLO support (exact parameters TBD) for
|
||||
* the new radio
|
||||
* @__HWSIM_ATTR_MAX: enum limit
|
||||
*/
|
||||
|
||||
@@ -170,6 +172,7 @@ enum {
|
||||
HWSIM_ATTR_PERM_ADDR,
|
||||
HWSIM_ATTR_IFTYPE_SUPPORT,
|
||||
HWSIM_ATTR_CIPHER_SUPPORT,
|
||||
HWSIM_ATTR_MLO_SUPPORT,
|
||||
__HWSIM_ATTR_MAX,
|
||||
};
|
||||
#define HWSIM_ATTR_MAX (__HWSIM_ATTR_MAX - 1)
|
||||
|
||||
@@ -109,9 +109,9 @@ static int lbs_mesh_config(struct lbs_private *priv, uint16_t action,
|
||||
|
||||
if (priv->mesh_dev) {
|
||||
mesh_wdev = priv->mesh_dev->ieee80211_ptr;
|
||||
ie->val.mesh_id_len = mesh_wdev->mesh_id_up_len;
|
||||
memcpy(ie->val.mesh_id, mesh_wdev->ssid,
|
||||
mesh_wdev->mesh_id_up_len);
|
||||
ie->val.mesh_id_len = mesh_wdev->u.mesh.id_up_len;
|
||||
memcpy(ie->val.mesh_id, mesh_wdev->u.mesh.id,
|
||||
mesh_wdev->u.mesh.id_up_len);
|
||||
}
|
||||
|
||||
ie->len = sizeof(struct mrvl_meshie_val) -
|
||||
@@ -986,8 +986,8 @@ static int lbs_add_mesh(struct lbs_private *priv)
|
||||
mesh_wdev->wiphy = priv->wdev->wiphy;
|
||||
|
||||
if (priv->mesh_tlv) {
|
||||
sprintf(mesh_wdev->ssid, "mesh");
|
||||
mesh_wdev->mesh_id_up_len = 4;
|
||||
sprintf(mesh_wdev->u.mesh.id, "mesh");
|
||||
mesh_wdev->u.mesh.id_up_len = 4;
|
||||
}
|
||||
|
||||
mesh_wdev->netdev = mesh_dev;
|
||||
|
||||
@@ -417,7 +417,7 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
|
||||
static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u32 changes)
|
||||
u64 changes)
|
||||
{
|
||||
struct lbtf_private *priv = hw->priv;
|
||||
struct sk_buff *beacon;
|
||||
@@ -427,7 +427,7 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
switch (priv->vif->type) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
beacon = ieee80211_beacon_get(hw, vif);
|
||||
beacon = ieee80211_beacon_get(hw, vif, 0);
|
||||
if (beacon) {
|
||||
lbtf_beacon_set(priv, beacon);
|
||||
kfree_skb(beacon);
|
||||
@@ -691,7 +691,7 @@ void lbtf_bcn_sent(struct lbtf_private *priv)
|
||||
}
|
||||
}
|
||||
|
||||
skb = ieee80211_beacon_get(priv->hw, priv->vif);
|
||||
skb = ieee80211_beacon_get(priv->hw, priv->vif, 0);
|
||||
|
||||
if (skb) {
|
||||
lbtf_beacon_set(priv, skb);
|
||||
|
||||
@@ -304,6 +304,6 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)
|
||||
mwifiex_dbg(priv->adapter, MSG,
|
||||
"indicating channel switch completion to kernel\n");
|
||||
mutex_lock(&priv->wdev.mtx);
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->dfs_chandef);
|
||||
cfg80211_ch_switch_notify(priv->netdev, &priv->dfs_chandef, 0);
|
||||
mutex_unlock(&priv->wdev.mtx);
|
||||
}
|
||||
|
||||
@@ -1753,10 +1753,12 @@ mwifiex_mgmt_stypes[NUM_NL80211_IFTYPES] = {
|
||||
* Function configures data rates to firmware using bitrate mask
|
||||
* provided by cfg80211.
|
||||
*/
|
||||
static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const u8 *peer,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
static int
|
||||
mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
unsigned int link_id,
|
||||
const u8 *peer,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
{
|
||||
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
|
||||
u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
|
||||
@@ -1998,7 +2000,8 @@ mwifiex_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
|
||||
/* cfg80211 operation handler for stop ap.
|
||||
* Function stops BSS running at uAP interface.
|
||||
*/
|
||||
static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
|
||||
static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
unsigned int link_id)
|
||||
{
|
||||
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
|
||||
|
||||
@@ -2421,7 +2424,7 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (priv->wdev.current_bss) {
|
||||
if (priv->wdev.connected) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
"%s: already connected\n", dev->name);
|
||||
return -EALREADY;
|
||||
@@ -2649,7 +2652,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (!priv->wdev.current_bss && priv->scan_block)
|
||||
if (!priv->wdev.connected && priv->scan_block)
|
||||
priv->scan_block = false;
|
||||
|
||||
if (!mwifiex_stop_bg_scan(priv))
|
||||
@@ -4025,6 +4028,7 @@ mwifiex_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
|
||||
|
||||
static int mwifiex_cfg80211_get_channel(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
unsigned int link_id,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
|
||||
|
||||
@@ -3250,7 +3250,7 @@ mwl8k_cmd_set_aid(struct ieee80211_hw *hw,
|
||||
|
||||
cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_AID);
|
||||
cmd->header.length = cpu_to_le16(sizeof(*cmd));
|
||||
cmd->aid = cpu_to_le16(vif->bss_conf.aid);
|
||||
cmd->aid = cpu_to_le16(vif->cfg.aid);
|
||||
memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||
|
||||
if (vif->bss_conf.use_cts_prot) {
|
||||
@@ -5013,13 +5013,13 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
/*
|
||||
* No need to capture a beacon if we're no longer associated.
|
||||
*/
|
||||
if ((changed & BSS_CHANGED_ASSOC) && !vif->bss_conf.assoc)
|
||||
if ((changed & BSS_CHANGED_ASSOC) && !vif->cfg.assoc)
|
||||
priv->capture_beacon = false;
|
||||
|
||||
/*
|
||||
* Get the AP's legacy and MCS rates.
|
||||
*/
|
||||
if (vif->bss_conf.assoc) {
|
||||
if (vif->cfg.assoc) {
|
||||
struct ieee80211_sta *ap;
|
||||
|
||||
rcu_read_lock();
|
||||
@@ -5085,7 +5085,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (vif->bss_conf.assoc && !priv->ap_fw &&
|
||||
if (vif->cfg.assoc && !priv->ap_fw &&
|
||||
(changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_ERP_CTS_PROT |
|
||||
BSS_CHANGED_HT))) {
|
||||
rc = mwl8k_cmd_set_aid(hw, vif, ap_legacy_rates);
|
||||
@@ -5093,7 +5093,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (vif->bss_conf.assoc &&
|
||||
if (vif->cfg.assoc &&
|
||||
(changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BEACON_INT))) {
|
||||
/*
|
||||
* Finalize the join. Tell rx handler to process
|
||||
@@ -5147,7 +5147,7 @@ mwl8k_bss_info_changed_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
if (changed & (BSS_CHANGED_BEACON_INT | BSS_CHANGED_BEACON)) {
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = ieee80211_beacon_get(hw, vif);
|
||||
skb = ieee80211_beacon_get(hw, vif, 0);
|
||||
if (skb != NULL) {
|
||||
mwl8k_cmd_set_beacon(hw, vif, skb->data, skb->len);
|
||||
kfree_skb(skb);
|
||||
@@ -5163,7 +5163,7 @@ out:
|
||||
|
||||
static void
|
||||
mwl8k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info, u32 changed)
|
||||
struct ieee80211_bss_conf *info, u64 changed)
|
||||
{
|
||||
if (vif->type == NL80211_IFTYPE_STATION)
|
||||
mwl8k_bss_info_changed_sta(hw, vif, info, changed);
|
||||
|
||||
@@ -1459,7 +1459,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power);
|
||||
static void
|
||||
__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
{
|
||||
if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
|
||||
ieee80211_csa_finish(vif);
|
||||
}
|
||||
|
||||
@@ -1481,7 +1481,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt76_dev *dev = priv;
|
||||
|
||||
if (!vif->csa_active)
|
||||
if (!vif->bss_conf.csa_active)
|
||||
return;
|
||||
|
||||
dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
|
||||
|
||||
@@ -20,7 +20,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
if (!(mdev->beacon_mask & BIT(mvif->idx)))
|
||||
return;
|
||||
|
||||
skb = ieee80211_beacon_get(mt76_hw(dev), vif);
|
||||
skb = ieee80211_beacon_get(mt76_hw(dev), vif, 0);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ mt7603_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
|
||||
|
||||
static void
|
||||
mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info, u32 changed)
|
||||
struct ieee80211_bss_conf *info, u64 changed)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
|
||||
@@ -305,7 +305,7 @@ mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
||||
if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BSSID)) {
|
||||
if (info->assoc || info->ibss_joined) {
|
||||
if (vif->cfg.assoc || vif->cfg.ibss_joined) {
|
||||
mt76_wr(dev, MT_BSSID0(mvif->idx),
|
||||
get_unaligned_le32(info->bssid));
|
||||
mt76_wr(dev, MT_BSSID1(mvif->idx),
|
||||
|
||||
@@ -576,7 +576,7 @@ static void mt7615_configure_filter(struct ieee80211_hw *hw,
|
||||
static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct mt7615_dev *dev = mt7615_hw_dev(hw);
|
||||
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
||||
@@ -616,7 +616,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC)
|
||||
mt7615_mac_set_beacon_filter(phy, vif, info->assoc);
|
||||
mt7615_mac_set_beacon_filter(phy, vif, vif->cfg.assoc);
|
||||
|
||||
mt7615_mutex_release(dev);
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ out:
|
||||
static void
|
||||
mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
{
|
||||
if (vif->csa_active)
|
||||
if (vif->bss_conf.csa_active)
|
||||
ieee80211_csa_finish(vif);
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
|
||||
if (!enable)
|
||||
goto out;
|
||||
|
||||
skb = ieee80211_beacon_get_template(hw, vif, &offs);
|
||||
skb = ieee80211_beacon_get_template(hw, vif, &offs, 0);
|
||||
if (!skb)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1076,7 +1076,7 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
|
||||
if (!enable)
|
||||
goto out;
|
||||
|
||||
skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs);
|
||||
skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs, 0);
|
||||
if (!skb)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2530,7 +2530,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
|
||||
u8 pad;
|
||||
} req = {
|
||||
.bss_idx = mvif->mt76.idx,
|
||||
.aid = cpu_to_le16(vif->bss_conf.aid),
|
||||
.aid = cpu_to_le16(vif->cfg.aid),
|
||||
.dtim_period = vif->bss_conf.dtim_period,
|
||||
.bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int),
|
||||
};
|
||||
|
||||
@@ -402,7 +402,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
|
||||
else
|
||||
conn_type = CONNECTION_INFRA_AP;
|
||||
basic->conn_type = cpu_to_le32(conn_type);
|
||||
basic->aid = cpu_to_le16(vif->bss_conf.aid);
|
||||
basic->aid = cpu_to_le16(vif->cfg.aid);
|
||||
break;
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
||||
@@ -546,7 +546,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
|
||||
|
||||
if (sta) {
|
||||
if (vif->type == NL80211_IFTYPE_STATION)
|
||||
generic->partial_aid = cpu_to_le16(vif->bss_conf.aid);
|
||||
generic->partial_aid = cpu_to_le16(vif->cfg.aid);
|
||||
else
|
||||
generic->partial_aid = cpu_to_le16(sta->aid);
|
||||
memcpy(generic->peer_addr, sta->addr, ETH_ALEN);
|
||||
@@ -2157,8 +2157,10 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
|
||||
struct mt76_vif *vif,
|
||||
struct ieee80211_bss_conf *info)
|
||||
{
|
||||
struct ieee80211_vif *mvif = container_of(info, struct ieee80211_vif,
|
||||
bss_conf);
|
||||
struct sk_buff *skb;
|
||||
int i, len = min_t(int, info->arp_addr_cnt,
|
||||
int i, len = min_t(int, mvif->cfg.arp_addr_cnt,
|
||||
IEEE80211_BSS_ARP_ADDR_LIST_LEN);
|
||||
struct {
|
||||
struct {
|
||||
@@ -2186,7 +2188,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
|
||||
|
||||
skb_put_data(skb, &req_hdr, sizeof(req_hdr));
|
||||
for (i = 0; i < len; i++)
|
||||
skb_put_data(skb, &info->arp_addr_list[i], sizeof(__be32));
|
||||
skb_put_data(skb, &mvif->cfg.arp_addr_list[i], sizeof(__be32));
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ void mt76x02_sw_scan_complete(struct ieee80211_hw *hw,
|
||||
void mt76x02_sta_ps(struct mt76_dev *dev, struct ieee80211_sta *sta, bool ps);
|
||||
void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info, u32 changed);
|
||||
struct ieee80211_bss_conf *info, u64 changed);
|
||||
void mt76x02_reconfig_complete(struct ieee80211_hw *hw,
|
||||
enum ieee80211_reconfig_type reconfig_type);
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ mt76x02_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
||||
if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
|
||||
return;
|
||||
|
||||
skb = ieee80211_beacon_get(mt76_hw(dev), vif);
|
||||
skb = ieee80211_beacon_get(mt76_hw(dev), vif, 0);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
|
||||
@@ -636,7 +636,7 @@ EXPORT_SYMBOL_GPL(mt76x02_sta_ps);
|
||||
void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changed)
|
||||
u64 changed)
|
||||
{
|
||||
struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user