Merge tag 'wireless-drivers-next-2020-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for v5.7 Third set of patches for v5.7. Nothing really special this time, business as usual. When pulling this to net-next there's again a conflict in: drivers/net/wireless/intel/iwlwifi/pcie/drv.c To solve this drop these three lines from the conflict (the first hunk from "HEAD") as the whole AX200 block was moved above in the same file: IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name), IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name), IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), And keep all the __IWL_DEV_INFO() entries (the second hunk). In other words, take everything from wireless-drivers-next. When running 'git diff' after the resolution the output should be empty. Major changes: brcmfmac * add USB autosuspend support ath11k * handle RX fragments * enable PN offload * add support for HE BSS color iwlwifi * support new FW API version * support for EDCA measurements * new scan API features * enable new firmware debugging code ==================== Kalle gave me directions on how to resolve the iwlwifi conflict as follows: ==================== When pulling this to net-next there's again a conflict in: drivers/net/wireless/intel/iwlwifi/pcie/drv.c To solve this drop these three lines from the conflict (the first hunk from "HEAD") as the whole AX200 block was moved above in the same file: IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name), IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name), IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), And keep all the __IWL_DEV_INFO() entries (the second hunk). In other words, take everything from wireless-drivers-next. When running 'git diff' after the resolution the output should be empty. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -1709,6 +1709,7 @@ iwl_mvm_netdetect_query_results(struct iwl_mvm *mvm,
|
||||
};
|
||||
int ret, len;
|
||||
size_t query_len, matches_len;
|
||||
int max_profiles = iwl_umac_scan_get_max_profiles(mvm->fw);
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
if (ret) {
|
||||
@@ -1720,11 +1721,11 @@ iwl_mvm_netdetect_query_results(struct iwl_mvm *mvm,
|
||||
IWL_UCODE_TLV_API_SCAN_OFFLOAD_CHANS)) {
|
||||
query_len = sizeof(struct iwl_scan_offload_profiles_query);
|
||||
matches_len = sizeof(struct iwl_scan_offload_profile_match) *
|
||||
IWL_SCAN_MAX_PROFILES;
|
||||
max_profiles;
|
||||
} else {
|
||||
query_len = sizeof(struct iwl_scan_offload_profiles_query_v1);
|
||||
matches_len = sizeof(struct iwl_scan_offload_profile_match_v1) *
|
||||
IWL_SCAN_MAX_PROFILES;
|
||||
max_profiles;
|
||||
}
|
||||
|
||||
len = iwl_rx_packet_payload_len(cmd.resp_pkt);
|
||||
|
@@ -461,6 +461,8 @@ static ssize_t iwl_dbgfs_rs_data_read(struct file *file, char __user *user_buf,
|
||||
|
||||
desc += rs_pretty_print_rate(buff + desc, bufsz - desc,
|
||||
lq_sta->last_rate_n_flags);
|
||||
if (desc < bufsz - 1)
|
||||
buff[desc++] = '\n';
|
||||
mutex_unlock(&mvm->mutex);
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
|
||||
@@ -1013,6 +1015,8 @@ static ssize_t iwl_dbgfs_frame_stats_read(struct iwl_mvm *mvm,
|
||||
(int)(ARRAY_SIZE(stats->last_rates) - i));
|
||||
pos += rs_pretty_print_rate(pos, endpos - pos,
|
||||
stats->last_rates[idx]);
|
||||
if (pos < endpos - 1)
|
||||
*pos++ = '\n';
|
||||
}
|
||||
spin_unlock_bh(&mvm->drv_stats_lock);
|
||||
|
||||
|
@@ -278,6 +278,10 @@ iwl_mvm_ftm_target_chandef_v2(struct iwl_mvm *mvm,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* non EDCA based measurement must use HE preamble */
|
||||
if (peer->ftm.trigger_based || peer->ftm.non_trigger_based)
|
||||
*format_bw |= IWL_LOCATION_FRAME_FORMAT_HE;
|
||||
|
||||
*ctrl_ch_position = (peer->chandef.width > NL80211_CHAN_WIDTH_20) ?
|
||||
iwl_mvm_get_ctrl_pos(&peer->chandef) : 0;
|
||||
|
||||
@@ -349,6 +353,11 @@ iwl_mvm_ftm_put_target_common(struct iwl_mvm *mvm,
|
||||
FTM_PUT_FLAG(ALGO_LR);
|
||||
else if (IWL_MVM_FTM_INITIATOR_ALGO == IWL_TOF_ALGO_TYPE_FFT)
|
||||
FTM_PUT_FLAG(ALGO_FFT);
|
||||
|
||||
if (peer->ftm.trigger_based)
|
||||
FTM_PUT_FLAG(TB);
|
||||
else if (peer->ftm.non_trigger_based)
|
||||
FTM_PUT_FLAG(NON_TB);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@@ -73,6 +73,7 @@
|
||||
#include "fw/api/datapath.h"
|
||||
#include "fw/api/phy.h"
|
||||
#include "fw/api/config.h"
|
||||
#include "fw/api/soc.h"
|
||||
#include "fw/api/alive.h"
|
||||
#include "fw/api/binding.h"
|
||||
#include "fw/api/cmdhdr.h"
|
||||
|
@@ -5,10 +5,9 @@
|
||||
*
|
||||
* GPL LICENSE SUMMARY
|
||||
*
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||
* Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of version 2 of the GNU General Public License as
|
||||
@@ -28,10 +27,9 @@
|
||||
*
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||
* Copyright(c) 2012 - 2014, 2018 - 2020 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -89,6 +87,36 @@ struct iwl_mvm_alive_data {
|
||||
u32 scd_base_addr;
|
||||
};
|
||||
|
||||
/* set device type and latency */
|
||||
static int iwl_set_soc_latency(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_soc_configuration_cmd cmd = {};
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* In VER_1 of this command, the discrete value is considered
|
||||
* an integer; In VER_2, it's a bitmask. Since we have only 2
|
||||
* values in VER_1, this is backwards-compatible with VER_2,
|
||||
* as long as we don't set any other bits.
|
||||
*/
|
||||
if (!mvm->trans->trans_cfg->integrated)
|
||||
cmd.flags = cpu_to_le32(SOC_CONFIG_CMD_FLAGS_DISCRETE);
|
||||
|
||||
if (iwl_mvm_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP,
|
||||
SCAN_REQ_UMAC) >= 2 &&
|
||||
(mvm->trans->trans_cfg->low_latency_xtal))
|
||||
cmd.flags |= cpu_to_le32(SOC_CONFIG_CMD_FLAGS_LOW_LATENCY);
|
||||
|
||||
cmd.latency = cpu_to_le32(mvm->trans->trans_cfg->xtal_latency);
|
||||
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(SOC_CONFIGURATION_CMD,
|
||||
SYSTEM_GROUP, 0), 0,
|
||||
sizeof(cmd), &cmd);
|
||||
if (ret)
|
||||
IWL_ERR(mvm, "Failed to set soc latency: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant)
|
||||
{
|
||||
struct iwl_tx_ant_cfg_cmd tx_ant_cmd = {
|
||||
@@ -544,7 +572,8 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
|
||||
phy_cfg_cmd.phy_cfg = cpu_to_le32(iwl_mvm_get_phy_config(mvm));
|
||||
|
||||
/* set flags extra PHY configuration flags from the device's cfg */
|
||||
phy_cfg_cmd.phy_cfg |= cpu_to_le32(mvm->cfg->extra_phy_cfg_flags);
|
||||
phy_cfg_cmd.phy_cfg |=
|
||||
cpu_to_le32(mvm->trans->trans_cfg->extra_phy_cfg_flags);
|
||||
|
||||
phy_cfg_cmd.calib_control.event_trigger =
|
||||
mvm->fw->default_calib[ucode_type].event_trigger;
|
||||
@@ -1110,6 +1139,13 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_SOC_LATENCY_SUPPORT)) {
|
||||
ret = iwl_set_soc_latency(mvm);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Init RSS configuration */
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
ret = iwl_configure_rxq(mvm);
|
||||
|
@@ -193,6 +193,8 @@ static const struct cfg80211_pmsr_capabilities iwl_mvm_pmsr_capa = {
|
||||
.non_asap = 1,
|
||||
.request_lci = 1,
|
||||
.request_civicloc = 1,
|
||||
.trigger_based = 1,
|
||||
.non_trigger_based = 1,
|
||||
.max_bursts_exponent = -1, /* all supported */
|
||||
.max_ftms_per_burst = 0, /* no limits */
|
||||
.bandwidths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
|
||||
@@ -201,7 +203,8 @@ static const struct cfg80211_pmsr_capabilities iwl_mvm_pmsr_capa = {
|
||||
BIT(NL80211_CHAN_WIDTH_80),
|
||||
.preambles = BIT(NL80211_PREAMBLE_LEGACY) |
|
||||
BIT(NL80211_PREAMBLE_HT) |
|
||||
BIT(NL80211_PREAMBLE_VHT),
|
||||
BIT(NL80211_PREAMBLE_VHT) |
|
||||
BIT(NL80211_PREAMBLE_HE),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -614,7 +617,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
|
||||
hw->wiphy->max_sched_scan_reqs = 1;
|
||||
hw->wiphy->max_sched_scan_ssids = PROBE_OPTION_MAX;
|
||||
hw->wiphy->max_match_sets = IWL_SCAN_MAX_PROFILES;
|
||||
hw->wiphy->max_match_sets = iwl_umac_scan_get_max_profiles(mvm->fw);
|
||||
/* we create the 802.11 header and zero length SSID IE. */
|
||||
hw->wiphy->max_sched_scan_ie_len =
|
||||
SCAN_OFFLOAD_PROBE_REQ_SIZE - 24 - 2;
|
||||
@@ -702,7 +705,8 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
mvm->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS;
|
||||
mvm->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN;
|
||||
mvm->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN;
|
||||
mvm->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES;
|
||||
mvm->wowlan.max_nd_match_sets =
|
||||
iwl_umac_scan_get_max_profiles(mvm->fw);
|
||||
hw->wiphy->wowlan = &mvm->wowlan;
|
||||
}
|
||||
#endif
|
||||
|
@@ -2147,4 +2147,11 @@ iwl_mvm_set_chan_info_chandef(struct iwl_mvm *mvm,
|
||||
iwl_mvm_get_ctrl_pos(chandef));
|
||||
}
|
||||
|
||||
static inline int iwl_umac_scan_get_max_profiles(const struct iwl_fw *fw)
|
||||
{
|
||||
u8 ver = iwl_mvm_lookup_cmd_ver(fw, IWL_ALWAYS_LONG_GROUP,
|
||||
SCAN_OFFLOAD_UPDATE_PROFILES_CMD);
|
||||
return (ver == IWL_FW_CMD_VER_UNKNOWN || ver < 3) ?
|
||||
IWL_SCAN_MAX_PROFILES : IWL_SCAN_MAX_PROFILES_V2;
|
||||
}
|
||||
#endif /* __IWL_MVM_H__ */
|
||||
|
@@ -416,8 +416,7 @@ u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta)
|
||||
return IEEE80211_MAX_MPDU_LEN_VHT_7991;
|
||||
default:
|
||||
return IEEE80211_MAX_MPDU_LEN_VHT_3895;
|
||||
}
|
||||
|
||||
}
|
||||
} else if (ht_cap->ht_supported) {
|
||||
if (ht_cap->cap & IEEE80211_HT_CAP_MAX_AMSDU)
|
||||
/*
|
||||
|
@@ -3697,7 +3697,7 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
!(rate & RATE_MCS_HE_MSK)) {
|
||||
int index = iwl_hwrate_to_plcp_idx(rate);
|
||||
|
||||
return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps\n",
|
||||
return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps",
|
||||
rs_pretty_ant(ant),
|
||||
index == IWL_RATE_INVALID ? "BAD" :
|
||||
iwl_rate_mcs[index].mbps);
|
||||
@@ -3740,7 +3740,7 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
}
|
||||
|
||||
return scnprintf(buf, bufsz,
|
||||
"0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n",
|
||||
"0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s",
|
||||
rate, type, rs_pretty_ant(ant), bw, mcs, nss,
|
||||
(rate & RATE_MCS_SGI_MSK) ? "SGI " : "NGI ",
|
||||
(rate & RATE_MCS_STBC_MSK) ? "STBC " : "",
|
||||
@@ -3888,6 +3888,8 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,
|
||||
desc += scnprintf(buff + desc, bufsz - desc,
|
||||
" rate[%d] 0x%X ", i, r);
|
||||
desc += rs_pretty_print_rate(buff + desc, bufsz - desc, r);
|
||||
if (desc < bufsz - 1)
|
||||
buff[desc++] = '\n';
|
||||
}
|
||||
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
|
||||
|
@@ -91,8 +91,14 @@
|
||||
#define IWL_SCAN_ADWELL_DEFAULT_N_APS_SOCIAL 10
|
||||
/* number of scan channels */
|
||||
#define IWL_SCAN_NUM_CHANNELS 112
|
||||
/* adaptive dwell default number of APs override */
|
||||
#define IWL_SCAN_ADWELL_DEFAULT_N_APS_OVERRIDE 10
|
||||
/* adaptive dwell number of APs override mask for p2p friendly GO */
|
||||
#define IWL_SCAN_ADWELL_N_APS_GO_FRIENDLY_BIT BIT(20)
|
||||
/* adaptive dwell number of APs override mask for social channels */
|
||||
#define IWL_SCAN_ADWELL_N_APS_SOCIAL_CHS_BIT BIT(21)
|
||||
/* adaptive dwell number of APs override for p2p friendly GO channels */
|
||||
#define IWL_SCAN_ADWELL_N_APS_GO_FRIENDLY 10
|
||||
/* adaptive dwell number of APs override for social channels */
|
||||
#define IWL_SCAN_ADWELL_N_APS_SOCIAL_CHS 2
|
||||
|
||||
struct iwl_mvm_scan_timing_params {
|
||||
u32 suspend_time;
|
||||
@@ -588,11 +594,15 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
||||
struct cfg80211_sched_scan_request *req)
|
||||
{
|
||||
struct iwl_scan_offload_profile *profile;
|
||||
struct iwl_scan_offload_profile_cfg *profile_cfg;
|
||||
struct iwl_scan_offload_profile_cfg_v1 *profile_cfg_v1;
|
||||
struct iwl_scan_offload_blacklist *blacklist;
|
||||
struct iwl_scan_offload_profile_cfg_data *data;
|
||||
int max_profiles = iwl_umac_scan_get_max_profiles(mvm->fw);
|
||||
int profile_cfg_size = sizeof(*data) +
|
||||
sizeof(*profile) * max_profiles;
|
||||
struct iwl_host_cmd cmd = {
|
||||
.id = SCAN_OFFLOAD_UPDATE_PROFILES_CMD,
|
||||
.len[1] = sizeof(*profile_cfg),
|
||||
.len[1] = profile_cfg_size,
|
||||
.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
|
||||
.dataflags[1] = IWL_HCMD_DFL_NOCOPY,
|
||||
};
|
||||
@@ -600,7 +610,7 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(req->n_match_sets > IWL_SCAN_MAX_PROFILES))
|
||||
if (WARN_ON(req->n_match_sets > max_profiles))
|
||||
return -EIO;
|
||||
|
||||
if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_SHORT_BL)
|
||||
@@ -612,27 +622,37 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
||||
if (!blacklist)
|
||||
return -ENOMEM;
|
||||
|
||||
profile_cfg = kzalloc(sizeof(*profile_cfg), GFP_KERNEL);
|
||||
if (!profile_cfg) {
|
||||
profile_cfg_v1 = kzalloc(profile_cfg_size, GFP_KERNEL);
|
||||
if (!profile_cfg_v1) {
|
||||
ret = -ENOMEM;
|
||||
goto free_blacklist;
|
||||
}
|
||||
|
||||
cmd.data[0] = blacklist;
|
||||
cmd.len[0] = sizeof(*blacklist) * blacklist_len;
|
||||
cmd.data[1] = profile_cfg;
|
||||
cmd.data[1] = profile_cfg_v1;
|
||||
|
||||
/* if max_profile is MAX_PROFILES_V2, we have the new API */
|
||||
if (max_profiles == IWL_SCAN_MAX_PROFILES_V2) {
|
||||
struct iwl_scan_offload_profile_cfg *profile_cfg =
|
||||
(struct iwl_scan_offload_profile_cfg *)profile_cfg_v1;
|
||||
|
||||
data = &profile_cfg->data;
|
||||
} else {
|
||||
data = &profile_cfg_v1->data;
|
||||
}
|
||||
|
||||
/* No blacklist configuration */
|
||||
data->num_profiles = req->n_match_sets;
|
||||
data->active_clients = SCAN_CLIENT_SCHED_SCAN;
|
||||
data->pass_match = SCAN_CLIENT_SCHED_SCAN;
|
||||
data->match_notify = SCAN_CLIENT_SCHED_SCAN;
|
||||
|
||||
profile_cfg->num_profiles = req->n_match_sets;
|
||||
profile_cfg->active_clients = SCAN_CLIENT_SCHED_SCAN;
|
||||
profile_cfg->pass_match = SCAN_CLIENT_SCHED_SCAN;
|
||||
profile_cfg->match_notify = SCAN_CLIENT_SCHED_SCAN;
|
||||
if (!req->n_match_sets || !req->match_sets[0].ssid.ssid_len)
|
||||
profile_cfg->any_beacon_notify = SCAN_CLIENT_SCHED_SCAN;
|
||||
data->any_beacon_notify = SCAN_CLIENT_SCHED_SCAN;
|
||||
|
||||
for (i = 0; i < req->n_match_sets; i++) {
|
||||
profile = &profile_cfg->profiles[i];
|
||||
profile = &profile_cfg_v1->profiles[i];
|
||||
profile->ssid_index = i;
|
||||
/* Support any cipher and auth algorithm */
|
||||
profile->unicast_cipher = 0xff;
|
||||
@@ -645,7 +665,7 @@ iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
|
||||
IWL_DEBUG_SCAN(mvm, "Sending scheduled scan profile config\n");
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
kfree(profile_cfg);
|
||||
kfree(profile_cfg_v1);
|
||||
free_blacklist:
|
||||
kfree(blacklist);
|
||||
|
||||
@@ -1529,14 +1549,19 @@ static int iwl_mvm_scan_ch_and_band_to_idx(u8 channel_id, u8 band)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static const u8 p2p_go_friendly_chs[] = {
|
||||
36, 40, 44, 48, 149, 153, 157, 161, 165,
|
||||
};
|
||||
|
||||
static const u8 social_chs[] = {
|
||||
1, 6, 11
|
||||
};
|
||||
|
||||
static void iwl_mvm_scan_ch_add_n_aps_override(enum nl80211_iftype vif_type,
|
||||
u8 ch_id, u8 band, u8 *ch_bitmap,
|
||||
size_t bitmap_n_entries)
|
||||
{
|
||||
int i;
|
||||
static const u8 p2p_go_friendly_chs[] = {
|
||||
36, 40, 44, 48, 149, 153, 157, 161, 165,
|
||||
};
|
||||
|
||||
if (vif_type != NL80211_IFTYPE_P2P_DEVICE)
|
||||
return;
|
||||
@@ -1561,6 +1586,35 @@ static void iwl_mvm_scan_ch_add_n_aps_override(enum nl80211_iftype vif_type,
|
||||
}
|
||||
}
|
||||
|
||||
static u32 iwl_mvm_scan_ch_n_aps_flag(enum nl80211_iftype vif_type, u8 ch_id)
|
||||
{
|
||||
int i;
|
||||
u32 flags = 0;
|
||||
|
||||
if (vif_type != NL80211_IFTYPE_P2P_DEVICE)
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(p2p_go_friendly_chs); i++) {
|
||||
if (p2p_go_friendly_chs[i] == ch_id) {
|
||||
flags |= IWL_SCAN_ADWELL_N_APS_GO_FRIENDLY_BIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags)
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(social_chs); i++) {
|
||||
if (social_chs[i] == ch_id) {
|
||||
flags |= IWL_SCAN_ADWELL_N_APS_SOCIAL_CHS_BIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_umac_scan_cfg_channels(struct iwl_mvm *mvm,
|
||||
struct ieee80211_channel **channels,
|
||||
@@ -1615,6 +1669,30 @@ iwl_mvm_umac_scan_cfg_channels_v4(struct iwl_mvm *mvm,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_umac_scan_cfg_channels_v6(struct iwl_mvm *mvm,
|
||||
struct ieee80211_channel **channels,
|
||||
struct iwl_scan_channel_params_v6 *cp,
|
||||
int n_channels, u32 flags,
|
||||
enum nl80211_iftype vif_type)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_channels; i++) {
|
||||
enum nl80211_band band = channels[i]->band;
|
||||
struct iwl_scan_channel_cfg_umac *cfg = &cp->channel_config[i];
|
||||
u32 n_aps_flag =
|
||||
iwl_mvm_scan_ch_n_aps_flag(vif_type,
|
||||
cfg->v2.channel_num);
|
||||
|
||||
cfg->flags = cpu_to_le32(flags | n_aps_flag);
|
||||
cfg->v2.channel_num = channels[i]->hw_value;
|
||||
cfg->v2.band = iwl_mvm_phy_band_from_nl80211(band);
|
||||
cfg->v2.iter_count = 1;
|
||||
cfg->v2.iter_interval = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static u8 iwl_mvm_scan_umac_chan_flags_v2(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif)
|
||||
@@ -1915,7 +1993,7 @@ iwl_mvm_scan_umac_fill_ch_p_v4(struct iwl_mvm *mvm,
|
||||
{
|
||||
cp->flags = iwl_mvm_scan_umac_chan_flags_v2(mvm, params, vif);
|
||||
cp->count = params->n_channels;
|
||||
cp->num_of_aps_override = IWL_SCAN_ADWELL_DEFAULT_N_APS_OVERRIDE;
|
||||
cp->num_of_aps_override = IWL_SCAN_ADWELL_N_APS_GO_FRIENDLY;
|
||||
|
||||
iwl_mvm_umac_scan_cfg_channels_v4(mvm, params->channels, cp,
|
||||
params->n_channels,
|
||||
@@ -1923,6 +2001,23 @@ iwl_mvm_scan_umac_fill_ch_p_v4(struct iwl_mvm *mvm,
|
||||
vif->type);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_ch_p_v6(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_scan_channel_params_v6 *cp,
|
||||
u32 channel_cfg_flags)
|
||||
{
|
||||
cp->flags = iwl_mvm_scan_umac_chan_flags_v2(mvm, params, vif);
|
||||
cp->count = params->n_channels;
|
||||
cp->n_aps_override[0] = IWL_SCAN_ADWELL_N_APS_GO_FRIENDLY;
|
||||
cp->n_aps_override[1] = IWL_SCAN_ADWELL_N_APS_SOCIAL_CHS;
|
||||
|
||||
iwl_mvm_umac_scan_cfg_channels_v6(mvm, params->channels, cp,
|
||||
params->n_channels,
|
||||
channel_cfg_flags,
|
||||
vif->type);
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v12(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type,
|
||||
@@ -1990,6 +2085,40 @@ static int iwl_mvm_scan_umac_v13(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v14(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type,
|
||||
int uid)
|
||||
{
|
||||
struct iwl_scan_req_umac_v14 *cmd = mvm->scan_cmd;
|
||||
struct iwl_scan_req_params_v14 *scan_p = &cmd->scan_params;
|
||||
int ret;
|
||||
u16 gen_flags;
|
||||
u32 bitmap_ssid = 0;
|
||||
|
||||
mvm->scan_uid_status[uid] = type;
|
||||
|
||||
cmd->ooc_priority = cpu_to_le32(iwl_mvm_scan_umac_ooc_priority(params));
|
||||
cmd->uid = cpu_to_le32(uid);
|
||||
|
||||
gen_flags = iwl_mvm_scan_umac_flags_v2(mvm, params, vif, type);
|
||||
iwl_mvm_scan_umac_fill_general_p_v10(mvm, params, vif,
|
||||
&scan_p->general_params,
|
||||
gen_flags);
|
||||
|
||||
ret = iwl_mvm_fill_scan_sched_params(params,
|
||||
scan_p->periodic_params.schedule,
|
||||
&scan_p->periodic_params.delay);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
iwl_mvm_scan_umac_fill_probe_p_v4(params, &scan_p->probe_params,
|
||||
&bitmap_ssid);
|
||||
iwl_mvm_scan_umac_fill_ch_p_v6(mvm, params, vif,
|
||||
&scan_p->channel_params, bitmap_ssid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_num_scans(struct iwl_mvm *mvm)
|
||||
{
|
||||
return hweight32(mvm->scan_status & IWL_MVM_SCAN_MASK);
|
||||
@@ -2105,6 +2234,7 @@ struct iwl_scan_umac_handler {
|
||||
|
||||
static const struct iwl_scan_umac_handler iwl_scan_umac_handlers[] = {
|
||||
/* set the newest version first to shorten the list traverse time */
|
||||
IWL_SCAN_UMAC_HANDLER(14),
|
||||
IWL_SCAN_UMAC_HANDLER(13),
|
||||
IWL_SCAN_UMAC_HANDLER(12),
|
||||
};
|
||||
@@ -2463,6 +2593,7 @@ static int iwl_mvm_scan_stop_wait(struct iwl_mvm *mvm, int type)
|
||||
static int iwl_scan_req_umac_get_size(u8 scan_ver)
|
||||
{
|
||||
switch (scan_ver) {
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(14);
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(13);
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(12);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of version 2 of the GNU General Public License as
|
||||
@@ -29,7 +29,7 @@
|
||||
*
|
||||
* Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -162,7 +162,9 @@ static void iwl_mvm_fill_sf_command(struct iwl_mvm *mvm,
|
||||
* capabilities of the AP station, and choose the watermark accordingly.
|
||||
*/
|
||||
if (sta) {
|
||||
if (sta->ht_cap.ht_supported || sta->vht_cap.vht_supported) {
|
||||
if (sta->ht_cap.ht_supported ||
|
||||
sta->vht_cap.vht_supported ||
|
||||
sta->he_cap.has_he) {
|
||||
switch (sta->rx_nss) {
|
||||
case 1:
|
||||
watermark = SF_W_MARK_SISO;
|
||||
|
在新工单中引用
屏蔽一个用户