mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 10:34:22 -04:00
Merge tag 'wireless-drivers-next-2019-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for v5.5 Second set of patches for v5.5. Nothing special this time, smaller features to various drivers and of course fixes all over. Major changes: iwlwifi * update scan FW API * bump the supported FW API version * add debug dump collection on assert in WoWLAN * enable adaptive dwell on P2P interfaces ath10k * request for PM_QOS_CPU_DMA_LATENCY to improve firmware initialisation time qtnfmac * add support for getting/setting transmit power * handle MIC failure event from firmware rtl8xxxu * add support for Edimax EW-7611ULB wil6210 * add SPDX license identifiers ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/pm_qos.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include "core.h"
|
||||
@@ -1027,6 +1028,7 @@ static int ath10k_download_fw(struct ath10k *ar)
|
||||
u32 address, data_len;
|
||||
const void *data;
|
||||
int ret;
|
||||
struct pm_qos_request latency_qos;
|
||||
|
||||
address = ar->hw_params.patch_load_addr;
|
||||
|
||||
@@ -1060,8 +1062,14 @@ static int ath10k_download_fw(struct ath10k *ar)
|
||||
ret);
|
||||
}
|
||||
|
||||
return ath10k_bmi_fast_download(ar, address,
|
||||
data, data_len);
|
||||
memset(&latency_qos, 0, sizeof(latency_qos));
|
||||
pm_qos_add_request(&latency_qos, PM_QOS_CPU_DMA_LATENCY, 0);
|
||||
|
||||
ret = ath10k_bmi_fast_download(ar, address, data, data_len);
|
||||
|
||||
pm_qos_remove_request(&latency_qos);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ath10k_core_free_board_files(struct ath10k *ar)
|
||||
|
||||
@@ -1516,7 +1516,7 @@ static void ath10k_tpc_stats_print(struct ath10k_tpc_stats *tpc_stats,
|
||||
*len += scnprintf(buf + *len, buf_len - *len,
|
||||
"No. Preamble Rate_code ");
|
||||
|
||||
for (i = 0; i < WMI_TPC_TX_N_CHAIN; i++)
|
||||
for (i = 0; i < tpc_stats->num_tx_chain; i++)
|
||||
*len += scnprintf(buf + *len, buf_len - *len,
|
||||
"tpc_value%d ", i);
|
||||
|
||||
@@ -2532,6 +2532,7 @@ void ath10k_debug_destroy(struct ath10k *ar)
|
||||
ath10k_debug_fw_stats_reset(ar);
|
||||
|
||||
kfree(ar->debug.tpc_stats);
|
||||
kfree(ar->debug.tpc_stats_final);
|
||||
}
|
||||
|
||||
int ath10k_debug_register(struct ath10k *ar)
|
||||
|
||||
@@ -2073,7 +2073,7 @@ static void ath10k_htt_rx_mpdu_desc_pn_hl(struct htt_hl_rx_desc *rx_desc,
|
||||
case 24:
|
||||
pn->pn24 = __le32_to_cpu(rx_desc->pn_31_0);
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static bool ath10k_htt_rx_pn_cmp48(union htt_rx_pn_t *new_pn,
|
||||
|
||||
@@ -1148,6 +1148,7 @@ static bool ath10k_qca99x0_rx_desc_msdu_limit_error(struct htt_rx_desc *rxd)
|
||||
const struct ath10k_hw_ops qca99x0_ops = {
|
||||
.rx_desc_get_l3_pad_bytes = ath10k_qca99x0_rx_desc_get_l3_pad_bytes,
|
||||
.rx_desc_get_msdu_limit_error = ath10k_qca99x0_rx_desc_msdu_limit_error,
|
||||
.is_rssi_enable = ath10k_htt_tx_rssi_enable,
|
||||
};
|
||||
|
||||
const struct ath10k_hw_ops qca6174_ops = {
|
||||
|
||||
@@ -3904,8 +3904,10 @@ void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work)
|
||||
ar->running_fw->fw_file.fw_features)) {
|
||||
paddr = dma_map_single(ar->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
if (!paddr)
|
||||
if (dma_mapping_error(ar->dev, paddr)) {
|
||||
ieee80211_free_txskb(ar->hw, skb);
|
||||
continue;
|
||||
}
|
||||
ret = ath10k_wmi_mgmt_tx_send(ar, skb, paddr);
|
||||
if (ret) {
|
||||
ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n",
|
||||
@@ -6602,6 +6604,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
|
||||
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
|
||||
GFP_KERNEL);
|
||||
if (!arsta->tx_stats) {
|
||||
ath10k_mac_dec_num_stations(arvif, sta);
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
@@ -6636,12 +6639,8 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
|
||||
|
||||
spin_unlock_bh(&ar->data_lock);
|
||||
|
||||
if (!sta->tdls) {
|
||||
ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
|
||||
ath10k_mac_dec_num_stations(arvif, sta);
|
||||
kfree(arsta->tx_stats);
|
||||
if (!sta->tdls)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
|
||||
WMI_TDLS_ENABLE_ACTIVE);
|
||||
|
||||
@@ -773,6 +773,13 @@ static void ath10k_qmi_event_server_arrive(struct ath10k_qmi *qmi)
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
/*
|
||||
* HACK: sleep for a while inbetween receiving the msa info response
|
||||
* and the XPU update to prevent SDM845 from crashing due to a security
|
||||
* violation, when running MPSS.AT.4.0.c2-01184-SDM845_GEN_PACK-1.
|
||||
*/
|
||||
msleep(20);
|
||||
|
||||
ret = ath10k_qmi_setup_msa_permissions(qmi);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
@@ -1400,7 +1400,7 @@ static void ath10k_msa_dump_memory(struct ath10k *ar,
|
||||
size_t buf_len;
|
||||
u8 *buf;
|
||||
|
||||
if (!crash_data && !crash_data->ramdump_buf)
|
||||
if (!crash_data || !crash_data->ramdump_buf)
|
||||
return;
|
||||
|
||||
mem_layout = ath10k_coredump_get_mem_layout(ar);
|
||||
|
||||
@@ -95,6 +95,8 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
|
||||
info = IEEE80211_SKB_CB(msdu);
|
||||
memset(&info->status, 0, sizeof(info->status));
|
||||
info->status.rates[0].idx = -1;
|
||||
|
||||
trace_ath10k_txrx_tx_unref(ar, tx_done->msdu_id);
|
||||
|
||||
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
|
||||
|
||||
@@ -38,6 +38,10 @@ ath10k_usb_alloc_urb_from_pipe(struct ath10k_usb_pipe *pipe)
|
||||
struct ath10k_urb_context *urb_context = NULL;
|
||||
unsigned long flags;
|
||||
|
||||
/* bail if this pipe is not initialized */
|
||||
if (!pipe->ar_usb)
|
||||
return NULL;
|
||||
|
||||
spin_lock_irqsave(&pipe->ar_usb->cs_lock, flags);
|
||||
if (!list_empty(&pipe->urb_list_head)) {
|
||||
urb_context = list_first_entry(&pipe->urb_list_head,
|
||||
@@ -55,6 +59,10 @@ static void ath10k_usb_free_urb_to_pipe(struct ath10k_usb_pipe *pipe,
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
/* bail if this pipe is not initialized */
|
||||
if (!pipe->ar_usb)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pipe->ar_usb->cs_lock, flags);
|
||||
|
||||
pipe->urb_cnt++;
|
||||
|
||||
@@ -4681,16 +4681,13 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar,
|
||||
}
|
||||
|
||||
pream_idx = 0;
|
||||
for (i = 0; i < __le32_to_cpu(ev->rate_max); i++) {
|
||||
for (i = 0; i < tpc_stats->rate_max; i++) {
|
||||
memset(tpc_value, 0, sizeof(tpc_value));
|
||||
memset(buff, 0, sizeof(buff));
|
||||
if (i == pream_table[pream_idx])
|
||||
pream_idx++;
|
||||
|
||||
for (j = 0; j < WMI_TPC_TX_N_CHAIN; j++) {
|
||||
if (j >= __le32_to_cpu(ev->num_tx_chain))
|
||||
break;
|
||||
|
||||
for (j = 0; j < tpc_stats->num_tx_chain; j++) {
|
||||
tpc[j] = ath10k_tpc_config_get_rate(ar, ev, i, j + 1,
|
||||
rate_code[i],
|
||||
type);
|
||||
@@ -4803,7 +4800,7 @@ void ath10k_wmi_tpc_config_get_rate_code(u8 *rate_code, u16 *pream_table,
|
||||
|
||||
void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb)
|
||||
{
|
||||
u32 num_tx_chain;
|
||||
u32 num_tx_chain, rate_max;
|
||||
u8 rate_code[WMI_TPC_RATE_MAX];
|
||||
u16 pream_table[WMI_TPC_PREAM_TABLE_MAX];
|
||||
struct wmi_pdev_tpc_config_event *ev;
|
||||
@@ -4819,6 +4816,13 @@ void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb)
|
||||
return;
|
||||
}
|
||||
|
||||
rate_max = __le32_to_cpu(ev->rate_max);
|
||||
if (rate_max > WMI_TPC_RATE_MAX) {
|
||||
ath10k_warn(ar, "number of rate is %d greater than TPC configured rate %d\n",
|
||||
rate_max, WMI_TPC_RATE_MAX);
|
||||
rate_max = WMI_TPC_RATE_MAX;
|
||||
}
|
||||
|
||||
tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC);
|
||||
if (!tpc_stats)
|
||||
return;
|
||||
@@ -4835,8 +4839,8 @@ void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb)
|
||||
__le32_to_cpu(ev->twice_antenna_reduction);
|
||||
tpc_stats->power_limit = __le32_to_cpu(ev->power_limit);
|
||||
tpc_stats->twice_max_rd_power = __le32_to_cpu(ev->twice_max_rd_power);
|
||||
tpc_stats->num_tx_chain = __le32_to_cpu(ev->num_tx_chain);
|
||||
tpc_stats->rate_max = __le32_to_cpu(ev->rate_max);
|
||||
tpc_stats->num_tx_chain = num_tx_chain;
|
||||
tpc_stats->rate_max = rate_max;
|
||||
|
||||
ath10k_tpc_config_disp_tables(ar, ev, tpc_stats,
|
||||
rate_code, pream_table,
|
||||
@@ -5031,16 +5035,13 @@ ath10k_wmi_tpc_stats_final_disp_tables(struct ath10k *ar,
|
||||
}
|
||||
|
||||
pream_idx = 0;
|
||||
for (i = 0; i < __le32_to_cpu(ev->rate_max); i++) {
|
||||
for (i = 0; i < tpc_stats->rate_max; i++) {
|
||||
memset(tpc_value, 0, sizeof(tpc_value));
|
||||
memset(buff, 0, sizeof(buff));
|
||||
if (i == pream_table[pream_idx])
|
||||
pream_idx++;
|
||||
|
||||
for (j = 0; j < WMI_TPC_TX_N_CHAIN; j++) {
|
||||
if (j >= __le32_to_cpu(ev->num_tx_chain))
|
||||
break;
|
||||
|
||||
for (j = 0; j < tpc_stats->num_tx_chain; j++) {
|
||||
tpc[j] = ath10k_wmi_tpc_final_get_rate(ar, ev, i, j + 1,
|
||||
rate_code[i],
|
||||
type, pream_idx);
|
||||
@@ -5056,7 +5057,7 @@ ath10k_wmi_tpc_stats_final_disp_tables(struct ath10k *ar,
|
||||
|
||||
void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb)
|
||||
{
|
||||
u32 num_tx_chain;
|
||||
u32 num_tx_chain, rate_max;
|
||||
u8 rate_code[WMI_TPC_FINAL_RATE_MAX];
|
||||
u16 pream_table[WMI_TPC_PREAM_TABLE_MAX];
|
||||
struct wmi_pdev_tpc_final_table_event *ev;
|
||||
@@ -5064,12 +5065,24 @@ void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb)
|
||||
|
||||
ev = (struct wmi_pdev_tpc_final_table_event *)skb->data;
|
||||
|
||||
num_tx_chain = __le32_to_cpu(ev->num_tx_chain);
|
||||
if (num_tx_chain > WMI_TPC_TX_N_CHAIN) {
|
||||
ath10k_warn(ar, "number of tx chain is %d greater than TPC final configured tx chain %d\n",
|
||||
num_tx_chain, WMI_TPC_TX_N_CHAIN);
|
||||
return;
|
||||
}
|
||||
|
||||
rate_max = __le32_to_cpu(ev->rate_max);
|
||||
if (rate_max > WMI_TPC_FINAL_RATE_MAX) {
|
||||
ath10k_warn(ar, "number of rate is %d greater than TPC final configured rate %d\n",
|
||||
rate_max, WMI_TPC_FINAL_RATE_MAX);
|
||||
rate_max = WMI_TPC_FINAL_RATE_MAX;
|
||||
}
|
||||
|
||||
tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC);
|
||||
if (!tpc_stats)
|
||||
return;
|
||||
|
||||
num_tx_chain = __le32_to_cpu(ev->num_tx_chain);
|
||||
|
||||
ath10k_wmi_tpc_config_get_rate_code(rate_code, pream_table,
|
||||
num_tx_chain);
|
||||
|
||||
@@ -5082,8 +5095,8 @@ void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb)
|
||||
__le32_to_cpu(ev->twice_antenna_reduction);
|
||||
tpc_stats->power_limit = __le32_to_cpu(ev->power_limit);
|
||||
tpc_stats->twice_max_rd_power = __le32_to_cpu(ev->twice_max_rd_power);
|
||||
tpc_stats->num_tx_chain = __le32_to_cpu(ev->num_tx_chain);
|
||||
tpc_stats->rate_max = __le32_to_cpu(ev->rate_max);
|
||||
tpc_stats->num_tx_chain = num_tx_chain;
|
||||
tpc_stats->rate_max = rate_max;
|
||||
|
||||
ath10k_wmi_tpc_stats_final_disp_tables(ar, ev, tpc_stats,
|
||||
rate_code, pream_table,
|
||||
|
||||
@@ -1707,7 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
|
||||
struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
|
||||
u32 offset;
|
||||
u16 val;
|
||||
int ret = 0, i;
|
||||
int i;
|
||||
|
||||
offset = AR5K_EEPROM_CTL(ee->ee_version) +
|
||||
AR5K_EEPROM_N_CTLS(ee->ee_version);
|
||||
@@ -1730,7 +1730,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,33 +33,33 @@ static int __ath_regd_init(struct ath_regulatory *reg);
|
||||
*/
|
||||
|
||||
/* Only these channels all allow active scan on all world regulatory domains */
|
||||
#define ATH9K_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
|
||||
#define ATH_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
|
||||
|
||||
/* We enable active scan on these a case by case basis by regulatory domain */
|
||||
#define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
|
||||
#define ATH_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
|
||||
NL80211_RRF_NO_IR)
|
||||
#define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
|
||||
#define ATH_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
|
||||
NL80211_RRF_NO_IR | \
|
||||
NL80211_RRF_NO_OFDM)
|
||||
|
||||
/* We allow IBSS on these on a case by case basis by regulatory domain */
|
||||
#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
|
||||
#define ATH_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
|
||||
NL80211_RRF_NO_IR)
|
||||
#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
|
||||
#define ATH_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
|
||||
NL80211_RRF_NO_IR)
|
||||
#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\
|
||||
#define ATH_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\
|
||||
NL80211_RRF_NO_IR)
|
||||
|
||||
#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
|
||||
ATH9K_2GHZ_CH12_13, \
|
||||
ATH9K_2GHZ_CH14
|
||||
#define ATH_2GHZ_ALL ATH_2GHZ_CH01_11, \
|
||||
ATH_2GHZ_CH12_13, \
|
||||
ATH_2GHZ_CH14
|
||||
|
||||
#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
|
||||
ATH9K_5GHZ_5470_5850
|
||||
#define ATH_5GHZ_ALL ATH_5GHZ_5150_5350, \
|
||||
ATH_5GHZ_5470_5850
|
||||
|
||||
/* This one skips what we call "mid band" */
|
||||
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
||||
ATH9K_5GHZ_5725_5850
|
||||
#define ATH_5GHZ_NO_MIDBAND ATH_5GHZ_5150_5350, \
|
||||
ATH_5GHZ_5725_5850
|
||||
|
||||
/* Can be used for:
|
||||
* 0x60, 0x61, 0x62 */
|
||||
@@ -67,8 +67,8 @@ static const struct ieee80211_regdomain ath_world_regdom_60_61_62 = {
|
||||
.n_reg_rules = 5,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
ATH_2GHZ_ALL,
|
||||
ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -77,9 +77,9 @@ static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
ATH9K_2GHZ_CH01_11,
|
||||
ATH9K_2GHZ_CH12_13,
|
||||
ATH9K_5GHZ_NO_MIDBAND,
|
||||
ATH_2GHZ_CH01_11,
|
||||
ATH_2GHZ_CH12_13,
|
||||
ATH_5GHZ_NO_MIDBAND,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -88,8 +88,8 @@ static const struct ieee80211_regdomain ath_world_regdom_64 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
ATH9K_2GHZ_CH01_11,
|
||||
ATH9K_5GHZ_NO_MIDBAND,
|
||||
ATH_2GHZ_CH01_11,
|
||||
ATH_5GHZ_NO_MIDBAND,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -98,8 +98,8 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
ATH9K_2GHZ_CH01_11,
|
||||
ATH9K_5GHZ_ALL,
|
||||
ATH_2GHZ_CH01_11,
|
||||
ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,9 +108,9 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
ATH9K_2GHZ_CH01_11,
|
||||
ATH9K_2GHZ_CH12_13,
|
||||
ATH9K_5GHZ_ALL,
|
||||
ATH_2GHZ_CH01_11,
|
||||
ATH_2GHZ_CH12_13,
|
||||
ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2091,7 +2091,7 @@ struct wcn36xx_hal_set_bss_key_rsp_msg {
|
||||
/*
|
||||
* This is used configure the key information on a given station.
|
||||
* When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
|
||||
* a preconfigured key from a BSS the station assoicated with; otherwise
|
||||
* a preconfigured key from a BSS the station associated with; otherwise
|
||||
* a new key descriptor is created based on the key field.
|
||||
*/
|
||||
struct wcn36xx_hal_set_sta_key_req_msg {
|
||||
|
||||
@@ -935,8 +935,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
|
||||
out:
|
||||
|
||||
mutex_unlock(&wcn->conf_mutex);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* this is required when using IEEE80211_HW_HAS_RATE_CONTROL */
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/* Copyright (c) 2015 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* This file contains the definitions for the boot loader
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2013,2016 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "wil6210.h"
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014,2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014-2015,2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2014,2016 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#ifndef __WIL_FW_H__
|
||||
#define __WIL_FW_H__
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Algorithmic part of the firmware download.
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/moduleparam.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "wil6210.h"
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014,2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "wil6210.h"
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2015,2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/* Copyright (c) 2012-2015 Qualcomm Atheros, Inc. */
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "wil6210.h"
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2013 Qualcomm Atheros, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2013-2016 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef WIL6210_TXRX_H
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2012-2016,2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef WIL6210_TXRX_EDMA_H
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __WIL6210_H__
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2015,2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "wil6210.h"
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2014 Qualcomm Atheros, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
* Copyright (c) 2014-2016 Qualcomm Atheros, Inc.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __WIL_PLATFORM_H__
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <linux/moduleparam.h>
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2006-2012 Wilocity
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -838,9 +838,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
|
||||
struct dma_pub *dma = NULL;
|
||||
struct d11txh *txh = NULL;
|
||||
struct scb *scb = NULL;
|
||||
bool free_pdu;
|
||||
int tx_rts, tx_frame_count, tx_rts_count;
|
||||
uint totlen, supr_status;
|
||||
int tx_frame_count;
|
||||
uint supr_status;
|
||||
bool lastframe;
|
||||
struct ieee80211_hdr *h;
|
||||
u16 mcl;
|
||||
@@ -917,11 +916,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
|
||||
CHSPEC_CHANNEL(wlc->default_bss->chanspec));
|
||||
}
|
||||
|
||||
tx_rts = le16_to_cpu(txh->MacTxControlLow) & TXC_SENDRTS;
|
||||
tx_frame_count =
|
||||
(txs->status & TX_STATUS_FRM_RTX_MASK) >> TX_STATUS_FRM_RTX_SHIFT;
|
||||
tx_rts_count =
|
||||
(txs->status & TX_STATUS_RTS_RTX_MASK) >> TX_STATUS_RTS_RTX_SHIFT;
|
||||
|
||||
lastframe = !ieee80211_has_morefrags(h->frame_control);
|
||||
|
||||
@@ -989,9 +985,6 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
|
||||
tx_info->flags |= IEEE80211_TX_STAT_ACK;
|
||||
}
|
||||
|
||||
totlen = p->len;
|
||||
free_pdu = true;
|
||||
|
||||
if (lastframe) {
|
||||
/* remove PLCP & Broadcom tx descriptor header */
|
||||
skb_pull(p, D11_PHY_HDR_LEN);
|
||||
@@ -7383,9 +7376,7 @@ static void brcms_c_update_beacon_hw(struct brcms_c_info *wlc,
|
||||
false, true);
|
||||
/* mark beacon0 valid */
|
||||
bcma_set32(core, D11REGOFFS(maccommand), MCMD_BCN1VLD);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -999,13 +999,12 @@ static int libipw_read_qos_info_element(struct
|
||||
/*
|
||||
* Write QoS parameters from the ac parameters.
|
||||
*/
|
||||
static int libipw_qos_convert_ac_to_parameters(struct
|
||||
static void libipw_qos_convert_ac_to_parameters(struct
|
||||
libipw_qos_parameter_info
|
||||
*param_elm, struct
|
||||
libipw_qos_parameters
|
||||
*qos_param)
|
||||
{
|
||||
int rc = 0;
|
||||
int i;
|
||||
struct libipw_qos_ac_parameter *ac_params;
|
||||
u32 txop;
|
||||
@@ -1030,7 +1029,6 @@ static int libipw_qos_convert_ac_to_parameters(struct
|
||||
txop = le16_to_cpu(ac_params->tx_op_limit) * 32;
|
||||
qos_param->tx_op_limit[i] = cpu_to_le16(txop);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -3331,7 +3331,6 @@ il4965_set_tkip_dynamic_key_info(struct il_priv *il,
|
||||
struct ieee80211_key_conf *keyconf, u8 sta_id)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
__le16 key_flags = 0;
|
||||
|
||||
key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
|
||||
@@ -3368,7 +3367,7 @@ il4965_set_tkip_dynamic_key_info(struct il_priv *il,
|
||||
|
||||
spin_unlock_irqrestore(&il->sta_lock, flags);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "iwl-prph.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MAX 50
|
||||
#define IWL_22000_UCODE_API_MAX 51
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MIN 39
|
||||
@@ -138,7 +138,7 @@ static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
static const struct iwl_base_params iwl_22560_base_params = {
|
||||
static const struct iwl_base_params iwl_ax210_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
@@ -212,27 +212,11 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_22560 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_22560, \
|
||||
.trans.base_params = &iwl_22560_base_params, \
|
||||
.trans.csr = &iwl_csr_v2, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = MON_BUFF_WRPTR_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = MON_BUFF_CYCLE_CNT_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.trans.base_params = &iwl_22560_base_params, \
|
||||
.trans.base_params = &iwl_ax210_base_params, \
|
||||
.trans.csr = &iwl_csr_v1, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
@@ -333,39 +317,39 @@ const struct iwl_cfg iwl_ax101_cfg_quz_hr = {
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax200_cfg_cc = {
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "iwl-drv.h"
|
||||
#include "iwl-debug.h"
|
||||
#include "acpi.h"
|
||||
#include "fw/runtime.h"
|
||||
|
||||
void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
{
|
||||
@@ -245,3 +246,289 @@ int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk)
|
||||
return ret;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_eckv);
|
||||
|
||||
int iwl_sar_set_profile(union acpi_object *table,
|
||||
struct iwl_sar_profile *profile,
|
||||
bool enabled)
|
||||
{
|
||||
int i;
|
||||
|
||||
profile->enabled = enabled;
|
||||
|
||||
for (i = 0; i < ACPI_SAR_TABLE_SIZE; i++) {
|
||||
if (table[i].type != ACPI_TYPE_INTEGER ||
|
||||
table[i].integer.value > U8_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
profile->table[i] = table[i].integer.value;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_set_profile);
|
||||
|
||||
int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
|
||||
__le16 per_chain_restriction[][IWL_NUM_SUB_BANDS],
|
||||
int prof_a, int prof_b)
|
||||
{
|
||||
int i, j, idx;
|
||||
int profs[ACPI_SAR_NUM_CHAIN_LIMITS] = { prof_a, prof_b };
|
||||
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS < 2);
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS * ACPI_SAR_NUM_SUB_BANDS !=
|
||||
ACPI_SAR_TABLE_SIZE);
|
||||
|
||||
for (i = 0; i < ACPI_SAR_NUM_CHAIN_LIMITS; i++) {
|
||||
struct iwl_sar_profile *prof;
|
||||
|
||||
/* don't allow SAR to be disabled (profile 0 means disable) */
|
||||
if (profs[i] == 0)
|
||||
return -EPERM;
|
||||
|
||||
/* we are off by one, so allow up to ACPI_SAR_PROFILE_NUM */
|
||||
if (profs[i] > ACPI_SAR_PROFILE_NUM)
|
||||
return -EINVAL;
|
||||
|
||||
/* profiles go from 1 to 4, so decrement to access the array */
|
||||
prof = &fwrt->sar_profiles[profs[i] - 1];
|
||||
|
||||
/* if the profile is disabled, do nothing */
|
||||
if (!prof->enabled) {
|
||||
IWL_DEBUG_RADIO(fwrt, "SAR profile %d is disabled.\n",
|
||||
profs[i]);
|
||||
/* if one of the profiles is disabled, we fail all */
|
||||
return -ENOENT;
|
||||
}
|
||||
IWL_DEBUG_INFO(fwrt,
|
||||
"SAR EWRD: chain %d profile index %d\n",
|
||||
i, profs[i]);
|
||||
IWL_DEBUG_RADIO(fwrt, " Chain[%d]:\n", i);
|
||||
for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
|
||||
idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
|
||||
per_chain_restriction[i][j] =
|
||||
cpu_to_le16(prof->table[idx]);
|
||||
IWL_DEBUG_RADIO(fwrt, " Band[%d] = %d * .125dBm\n",
|
||||
j, prof->table[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_select_profile);
|
||||
|
||||
int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *table, *data;
|
||||
bool enabled;
|
||||
int ret, tbl_rev;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_WRDS_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_WRDS_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (wifi_pkg->package.elements[1].type != ACPI_TYPE_INTEGER) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
enabled = !!(wifi_pkg->package.elements[1].integer.value);
|
||||
|
||||
/* position of the actual table */
|
||||
table = &wifi_pkg->package.elements[2];
|
||||
|
||||
/* The profile from WRDS is officially profile 1, but goes
|
||||
* into sar_profiles[0] (because we don't have a profile 0).
|
||||
*/
|
||||
ret = iwl_sar_set_profile(table, &fwrt->sar_profiles[0], enabled);
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_get_wrds_table);
|
||||
|
||||
int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
bool enabled;
|
||||
int i, n_profiles, tbl_rev;
|
||||
int ret = 0;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_EWRD_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_EWRD_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (wifi_pkg->package.elements[1].type != ACPI_TYPE_INTEGER ||
|
||||
wifi_pkg->package.elements[2].type != ACPI_TYPE_INTEGER) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
enabled = !!(wifi_pkg->package.elements[1].integer.value);
|
||||
n_profiles = wifi_pkg->package.elements[2].integer.value;
|
||||
|
||||
/*
|
||||
* Check the validity of n_profiles. The EWRD profiles start
|
||||
* from index 1, so the maximum value allowed here is
|
||||
* ACPI_SAR_PROFILES_NUM - 1.
|
||||
*/
|
||||
if (n_profiles <= 0 || n_profiles >= ACPI_SAR_PROFILE_NUM) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_profiles; i++) {
|
||||
/* the tables start at element 3 */
|
||||
int pos = 3;
|
||||
|
||||
/* The EWRD profiles officially go from 2 to 4, but we
|
||||
* save them in sar_profiles[1-3] (because we don't
|
||||
* have profile 0). So in the array we start from 1.
|
||||
*/
|
||||
ret = iwl_sar_set_profile(&wifi_pkg->package.elements[pos],
|
||||
&fwrt->sar_profiles[i + 1],
|
||||
enabled);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/* go to the next table */
|
||||
pos += ACPI_SAR_TABLE_SIZE;
|
||||
}
|
||||
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_get_ewrd_table);
|
||||
|
||||
int iwl_sar_get_wgds_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
int i, j, ret, tbl_rev;
|
||||
int idx = 1;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_WGDS_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_WGDS_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg) || tbl_rev > 1) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
fwrt->geo_rev = tbl_rev;
|
||||
for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
|
||||
for (j = 0; j < ACPI_GEO_TABLE_SIZE; j++) {
|
||||
union acpi_object *entry;
|
||||
|
||||
entry = &wifi_pkg->package.elements[idx++];
|
||||
if (entry->type != ACPI_TYPE_INTEGER ||
|
||||
entry->integer.value > U8_MAX) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
fwrt->geo_profiles[i].values[j] = entry->integer.value;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_get_wgds_table);
|
||||
|
||||
bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
/*
|
||||
* The GEO_TX_POWER_LIMIT command is not supported on earlier
|
||||
* firmware versions. Unfortunately, we don't have a TLV API
|
||||
* flag to rely on, so rely on the major version which is in
|
||||
* the first byte of ucode_ver. This was implemented
|
||||
* initially on version 38 and then backported to 17. It was
|
||||
* also backported to 29, but only for 7265D devices. The
|
||||
* intention was to have it in 36 as well, but not all 8000
|
||||
* family got this feature enabled. The 8000 family is the
|
||||
* only one using version 36, so skip this version entirely.
|
||||
*/
|
||||
return IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) >= 38 ||
|
||||
IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 ||
|
||||
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
|
||||
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
|
||||
CSR_HW_REV_TYPE_7265D));
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_geo_support);
|
||||
|
||||
int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_host_cmd *cmd)
|
||||
{
|
||||
struct iwl_geo_tx_power_profiles_resp *resp;
|
||||
int ret;
|
||||
|
||||
resp = (void *)cmd->resp_pkt->data;
|
||||
ret = le32_to_cpu(resp->profile_idx);
|
||||
if (WARN_ON(ret > ACPI_NUM_GEO_PROFILES)) {
|
||||
ret = -EIO;
|
||||
IWL_WARN(fwrt, "Invalid geographic profile idx (%d)\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile);
|
||||
|
||||
void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_per_chain_offset_group *table)
|
||||
{
|
||||
int ret, i, j;
|
||||
|
||||
if (!iwl_sar_geo_support(fwrt))
|
||||
return;
|
||||
|
||||
ret = iwl_sar_get_wgds_table(fwrt);
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"Geo SAR BIOS table invalid or unavailable. (%d)\n",
|
||||
ret);
|
||||
/* we don't fail if the table is not available */
|
||||
return;
|
||||
}
|
||||
|
||||
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS *
|
||||
ACPI_WGDS_TABLE_SIZE + 1 != ACPI_WGDS_WIFI_DATA_SIZE);
|
||||
|
||||
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES > IWL_NUM_GEO_PROFILES);
|
||||
|
||||
for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
|
||||
struct iwl_per_chain_offset *chain =
|
||||
(struct iwl_per_chain_offset *)&table[i];
|
||||
|
||||
for (j = 0; j < ACPI_WGDS_NUM_BANDS; j++) {
|
||||
u8 *value;
|
||||
|
||||
value = &fwrt->geo_profiles[i].values[j *
|
||||
ACPI_GEO_PER_CHAIN_SIZE];
|
||||
chain[j].max_tx_power = cpu_to_le16(value[0]);
|
||||
chain[j].chain_a = value[1];
|
||||
chain[j].chain_b = value[2];
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"SAR geographic profile[%d] Band[%d]: chain A = %d chain B = %d max_tx_power = %d\n",
|
||||
i, j, value[1], value[2], value[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_geo_init);
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
#define __iwl_fw_acpi__
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include "fw/api/commands.h"
|
||||
#include "fw/api/power.h"
|
||||
#include "fw/api/phy.h"
|
||||
#include "fw/img.h"
|
||||
#include "iwl-trans.h"
|
||||
|
||||
|
||||
#define ACPI_WRDS_METHOD "WRDS"
|
||||
#define ACPI_EWRD_METHOD "EWRD"
|
||||
@@ -104,9 +110,21 @@
|
||||
#define ACPI_PPAG_MIN_HB -16
|
||||
#define ACPI_PPAG_MAX_HB 40
|
||||
|
||||
struct iwl_sar_profile {
|
||||
bool enabled;
|
||||
u8 table[ACPI_SAR_TABLE_SIZE];
|
||||
};
|
||||
|
||||
struct iwl_geo_profile {
|
||||
u8 values[ACPI_GEO_TABLE_SIZE];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
struct iwl_fw_runtime;
|
||||
|
||||
void *iwl_acpi_get_object(struct device *dev, acpi_string method);
|
||||
|
||||
union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
|
||||
union acpi_object *data,
|
||||
int data_size, int *tbl_rev);
|
||||
@@ -134,6 +152,27 @@ u64 iwl_acpi_get_pwr_limit(struct device *dev);
|
||||
*/
|
||||
int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk);
|
||||
|
||||
int iwl_sar_set_profile(union acpi_object *table,
|
||||
struct iwl_sar_profile *profile,
|
||||
bool enabled);
|
||||
|
||||
int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
|
||||
__le16 per_chain_restriction[][IWL_NUM_SUB_BANDS],
|
||||
int prof_a, int prof_b);
|
||||
|
||||
int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
int iwl_sar_get_wgds_table(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_host_cmd *cmd);
|
||||
|
||||
void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_per_chain_offset_group *table);
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method)
|
||||
@@ -164,5 +203,50 @@ static inline int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_sar_set_profile(union acpi_object *table,
|
||||
struct iwl_sar_profile *profile,
|
||||
bool enabled)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
|
||||
__le16 per_chain_restriction[][IWL_NUM_SUB_BANDS],
|
||||
int prof_a, int prof_b)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_sar_get_wgds_table(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_host_cmd *cmd)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_per_chain_offset_group *table)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ACPI */
|
||||
#endif /* __iwl_fw_acpi__ */
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
/* Max number of IEs for direct SSID scans in a command */
|
||||
#define PROBE_OPTION_MAX 20
|
||||
|
||||
#define SCAN_SHORT_SSID_MAX_SIZE 8
|
||||
#define SCAN_BSSID_MAX_SIZE 16
|
||||
|
||||
/**
|
||||
* struct iwl_ssid_ie - directed scan network information element
|
||||
*
|
||||
@@ -278,6 +281,9 @@ enum iwl_scan_channel_flags {
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE = BIT(1),
|
||||
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD = BIT(2),
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS_FRAG = BIT(3),
|
||||
IWL_SCAN_CHANNEL_FLAG_FORCE_EBS = BIT(4),
|
||||
IWL_SCAN_CHANNEL_FLAG_ENABLE_CHAN_ORDER = BIT(5),
|
||||
IWL_SCAN_CHANNEL_FLAG_6G_PSC_NO_FILTER = BIT(6),
|
||||
};
|
||||
|
||||
/* struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
|
||||
@@ -637,6 +643,43 @@ enum iwl_umac_scan_general_flags2 {
|
||||
IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER = BIT(1),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_umac_scan_general_flags_v2 - UMAC scan general flags version 2
|
||||
*
|
||||
* The FW flags were reordered and hence the driver introduce version 2
|
||||
*
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC: periodic or scheduled
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL: pass all probe responses and beacons
|
||||
* during scan iterations
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE: send complete notification
|
||||
* on every iteration instead of only once after the last iteration
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1: fragmented scan LMAC1
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2: fragmented scan LMAC2
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH: does this scan check for profile matching
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS: use all valid chains for RX
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL: works with adaptive dwell
|
||||
* for active channel
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE: can be preempted by other requests
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START: send notification of scan start
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID: matching on multiple SSIDs
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE: all the channels scanned
|
||||
* as passive
|
||||
*/
|
||||
enum iwl_umac_scan_general_flags_v2 {
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC = BIT(0),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL = BIT(1),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE = BIT(2),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1 = BIT(3),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2 = BIT(4),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH = BIT(5),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS = BIT(6),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL = BIT(7),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE = BIT(8),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START = BIT(9),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID = BIT(10),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE = BIT(11),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_scan_channel_cfg_umac
|
||||
* @flags: bitmap - 0-19: directed scan to i'th ssid.
|
||||
@@ -830,6 +873,171 @@ struct iwl_scan_req_umac {
|
||||
#define IWL_SCAN_REQ_UMAC_SIZE_V6 44
|
||||
#define IWL_SCAN_REQ_UMAC_SIZE_V1 36
|
||||
|
||||
/**
|
||||
* struct iwl_scan_probe_params_v3
|
||||
* @preq: scan probe request params
|
||||
* @ssid_num: number of valid SSIDs in direct scan array
|
||||
* @short_ssid_num: number of valid short SSIDs in short ssid array
|
||||
* @bssid_num: number of valid bssid in bssids array
|
||||
* @reserved: reserved
|
||||
* @direct_scan: list of ssids
|
||||
* @short_ssid: array of short ssids
|
||||
* @bssid_array: array of bssids
|
||||
*/
|
||||
struct iwl_scan_probe_params_v3 {
|
||||
struct iwl_scan_probe_req preq;
|
||||
u8 ssid_num;
|
||||
u8 short_ssid_num;
|
||||
u8 bssid_num;
|
||||
u8 reserved;
|
||||
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
|
||||
__le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE];
|
||||
u8 bssid_array[ETH_ALEN][SCAN_BSSID_MAX_SIZE];
|
||||
} __packed;
|
||||
|
||||
#define SCAN_MAX_NUM_CHANS_V3 67
|
||||
|
||||
/**
|
||||
* struct iwl_scan_channel_params_v3
|
||||
* @flags: channel flags &enum iwl_scan_channel_flags
|
||||
* @count: num of channels in scan request
|
||||
* @reserved: for future use and alignment
|
||||
* @channel_config: array of explicit channel configurations
|
||||
* for 2.4Ghz and 5.2Ghz bands
|
||||
*/
|
||||
struct iwl_scan_channel_params_v3 {
|
||||
u8 flags;
|
||||
u8 count;
|
||||
__le16 reserved;
|
||||
struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3];
|
||||
} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_3 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_channel_params_v4
|
||||
* @flags: channel flags &enum iwl_scan_channel_flags
|
||||
* @count: num of channels in scan request
|
||||
* @num_of_aps_override: override the number of APs the FW uses to calculate
|
||||
* dwell time when adaptive dwell is used
|
||||
* @reserved: for future use and alignment
|
||||
* @channel_config: array of explicit channel configurations
|
||||
* for 2.4Ghz and 5.2Ghz bands
|
||||
* @adwell_ch_override_bitmap: when using adaptive dwell, override the number
|
||||
* of APs value with &num_of_aps_override for the channel.
|
||||
* To cast channel to index, use &iwl_mvm_scan_ch_and_band_to_idx
|
||||
*/
|
||||
struct iwl_scan_channel_params_v4 {
|
||||
u8 flags;
|
||||
u8 count;
|
||||
u8 num_of_aps_override;
|
||||
u8 reserved;
|
||||
struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3];
|
||||
u8 adwell_ch_override_bitmap[16];
|
||||
} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_general_params_v10
|
||||
* @flags: &enum iwl_umac_scan_flags
|
||||
* @reserved: reserved for future
|
||||
* @scan_start_mac_id: report the scan start TSF time according to this mac TSF
|
||||
* @active_dwell: dwell time for active scan per LMAC
|
||||
* @adwell_default_2g: adaptive dwell default number of APs
|
||||
* for 2.4GHz channel
|
||||
* @adwell_default_5g: adaptive dwell default number of APs
|
||||
* for 5GHz channels
|
||||
* @adwell_default_social_chn: adaptive dwell default number of
|
||||
* APs per social channel
|
||||
* @reserved1: reserved for future
|
||||
* @adwell_max_budget: the maximal number of TUs that adaptive dwell
|
||||
* can add to the total scan time
|
||||
* @max_out_of_time: max out of serving channel time, per LMAC
|
||||
* @suspend_time: max suspend time, per LMAC
|
||||
* @scan_priority: priority of the request
|
||||
* @passive_dwell: continues dwell time for passive channel
|
||||
* (without adaptive dwell)
|
||||
* @num_of_fragments: number of fragments needed for full fragmented
|
||||
* scan coverage.
|
||||
*/
|
||||
struct iwl_scan_general_params_v10 {
|
||||
__le16 flags;
|
||||
u8 reserved;
|
||||
u8 scan_start_mac_id;
|
||||
u8 active_dwell[SCAN_TWO_LMACS];
|
||||
u8 adwell_default_2g;
|
||||
u8 adwell_default_5g;
|
||||
u8 adwell_default_social_chn;
|
||||
u8 reserved1;
|
||||
__le16 adwell_max_budget;
|
||||
__le32 max_out_of_time[SCAN_TWO_LMACS];
|
||||
__le32 suspend_time[SCAN_TWO_LMACS];
|
||||
__le32 scan_priority;
|
||||
u8 passive_dwell[SCAN_TWO_LMACS];
|
||||
u8 num_of_fragments[SCAN_TWO_LMACS];
|
||||
} __packed; /* SCAN_GENERAL_PARAMS_API_S_VER_10 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_periodic_parms_v1
|
||||
* @schedule: can scheduling parameter
|
||||
* @delay: initial delay of the periodic scan in seconds
|
||||
* @reserved: reserved for future
|
||||
*/
|
||||
struct iwl_scan_periodic_parms_v1 {
|
||||
struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
|
||||
__le16 delay;
|
||||
__le16 reserved;
|
||||
} __packed; /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_params_v11
|
||||
* @general_params: &struct iwl_scan_general_params_v10
|
||||
* @channel_params: &struct iwl_scan_channel_params_v3
|
||||
* @periodic_params: &struct iwl_scan_periodic_parms_v1
|
||||
* @probe_params: &struct iwl_scan_probe_params_v3
|
||||
*/
|
||||
struct iwl_scan_req_params_v11 {
|
||||
struct iwl_scan_general_params_v10 general_params;
|
||||
struct iwl_scan_channel_params_v3 channel_params;
|
||||
struct iwl_scan_periodic_parms_v1 periodic_params;
|
||||
struct iwl_scan_probe_params_v3 probe_params;
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_11 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_params_v12
|
||||
* @general_params: &struct iwl_scan_general_params_v10
|
||||
* @channel_params: &struct iwl_scan_channel_params_v4
|
||||
* @periodic_params: &struct iwl_scan_periodic_parms_v1
|
||||
* @probe_params: &struct iwl_scan_probe_params_v3
|
||||
*/
|
||||
struct iwl_scan_req_params_v12 {
|
||||
struct iwl_scan_general_params_v10 general_params;
|
||||
struct iwl_scan_channel_params_v4 channel_params;
|
||||
struct iwl_scan_periodic_parms_v1 periodic_params;
|
||||
struct iwl_scan_probe_params_v3 probe_params;
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v11
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
|
||||
* @scan_params: scan parameters
|
||||
*/
|
||||
struct iwl_scan_req_umac_v11 {
|
||||
__le32 uid;
|
||||
__le32 ooc_priority;
|
||||
struct iwl_scan_req_params_v11 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_11 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v12
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
|
||||
* @scan_params: scan parameters
|
||||
*/
|
||||
struct iwl_scan_req_umac_v12 {
|
||||
__le32 uid;
|
||||
__le32 ooc_priority;
|
||||
struct iwl_scan_req_params_v12 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_umac_scan_abort
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland 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
|
||||
@@ -31,7 +31,7 @@
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland 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
|
||||
@@ -288,8 +288,7 @@ struct iwl_mvm_keyinfo {
|
||||
* @addr: station's MAC address
|
||||
* @reserved2: reserved
|
||||
* @sta_id: index of station in uCode's station table
|
||||
* @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
|
||||
* alone. 1 - modify, 0 - don't change.
|
||||
* @modify_mask: from &enum iwl_sta_modify_flag, selects what to change
|
||||
* @reserved3: reserved
|
||||
* @station_flags: look at &enum iwl_sta_flags
|
||||
* @station_flags_msk: what of %station_flags have changed,
|
||||
@@ -369,8 +368,7 @@ enum iwl_sta_type {
|
||||
* @addr: station's MAC address
|
||||
* @reserved2: reserved
|
||||
* @sta_id: index of station in uCode's station table
|
||||
* @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
|
||||
* alone. 1 - modify, 0 - don't change.
|
||||
* @modify_mask: from &enum iwl_sta_modify_flag, selects what to change
|
||||
* @reserved3: reserved
|
||||
* @station_flags: look at &enum iwl_sta_flags
|
||||
* @station_flags_msk: what of %station_flags have changed,
|
||||
|
||||
@@ -459,6 +459,7 @@ struct iwl_mvm_session_prot_cmd {
|
||||
* @mac_id: the mac id for which the session protection started / ended
|
||||
* @status: 1 means success, 0 means failure
|
||||
* @start: 1 means the session protection started, 0 means it ended
|
||||
* @conf_id: the configuration id of the session that started / eneded
|
||||
*
|
||||
* Note that any session protection will always get two notifications: start
|
||||
* and end even the firmware could not schedule it.
|
||||
@@ -467,6 +468,7 @@ struct iwl_mvm_session_prot_notif {
|
||||
__le32 mac_id;
|
||||
__le32 status;
|
||||
__le32 start;
|
||||
} __packed; /* SESSION_PROTECTION_NOTIFICATION_API_S_VER_1 */
|
||||
__le32 conf_id;
|
||||
} __packed; /* SESSION_PROTECTION_NOTIFICATION_API_S_VER_2 */
|
||||
|
||||
#endif /* __iwl_fw_api_time_event_h__ */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland 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) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2016 - 2017 Intel Deutschland 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
|
||||
@@ -323,7 +323,7 @@ struct iwl_tx_cmd_gen2 {
|
||||
} __packed; /* TX_CMD_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
* struct iwl_tx_cmd_gen3 - TX command struct to FW for 22560 devices
|
||||
* struct iwl_tx_cmd_gen3 - TX command struct to FW for AX210+ devices
|
||||
* ( TX_CMD = 0x1c )
|
||||
* @len: in bytes of the payload, see below for details
|
||||
* @flags: combination of &enum iwl_tx_cmd_flags
|
||||
|
||||
@@ -313,4 +313,22 @@ iwl_get_ucode_image(const struct iwl_fw *fw, enum iwl_ucode_type ucode_type)
|
||||
return &fw->img[ucode_type];
|
||||
}
|
||||
|
||||
static inline u8 iwl_mvm_lookup_cmd_ver(const struct iwl_fw *fw, u8 grp, u8 cmd)
|
||||
{
|
||||
const struct iwl_fw_cmd_version *entry;
|
||||
unsigned int i;
|
||||
|
||||
if (!fw->ucode_capa.cmd_versions ||
|
||||
!fw->ucode_capa.n_cmd_versions)
|
||||
return IWL_FW_CMD_VER_UNKNOWN;
|
||||
|
||||
entry = fw->ucode_capa.cmd_versions;
|
||||
for (i = 0; i < fw->ucode_capa.n_cmd_versions; i++, entry++) {
|
||||
if (entry->group == grp && entry->cmd == cmd)
|
||||
return entry->cmd_ver;
|
||||
}
|
||||
|
||||
return IWL_FW_CMD_VER_UNKNOWN;
|
||||
}
|
||||
|
||||
#endif /* __iwl_fw_img_h__ */
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
#include "img.h"
|
||||
#include "fw/api/debug.h"
|
||||
#include "fw/api/paging.h"
|
||||
#include "fw/api/power.h"
|
||||
#include "iwl-eeprom-parse.h"
|
||||
#include "fw/acpi.h"
|
||||
|
||||
#define IWL_FW_DBG_DOMAIN IWL_FW_INI_DOMAIN_ALWAYS_ON
|
||||
|
||||
@@ -203,7 +205,16 @@ struct iwl_fw_runtime {
|
||||
u32 delay;
|
||||
u64 seq;
|
||||
} timestamp;
|
||||
bool tpc_enabled;
|
||||
#endif /* CONFIG_IWLWIFI_DEBUGFS */
|
||||
#ifdef CONFIG_ACPI
|
||||
struct iwl_sar_profile sar_profiles[ACPI_SAR_PROFILE_NUM];
|
||||
u8 sar_chain_a_profile;
|
||||
u8 sar_chain_b_profile;
|
||||
struct iwl_geo_profile geo_profiles[ACPI_NUM_GEO_PROFILES];
|
||||
u32 geo_rev;
|
||||
struct iwl_ppag_table_cmd ppag_table;
|
||||
#endif
|
||||
};
|
||||
|
||||
void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
|
||||
|
||||
@@ -88,7 +88,6 @@ enum iwl_device_family {
|
||||
IWL_DEVICE_FAMILY_8000,
|
||||
IWL_DEVICE_FAMILY_9000,
|
||||
IWL_DEVICE_FAMILY_22000,
|
||||
IWL_DEVICE_FAMILY_22560,
|
||||
IWL_DEVICE_FAMILY_AX210,
|
||||
};
|
||||
|
||||
|
||||
@@ -603,9 +603,7 @@ enum msix_fh_int_causes {
|
||||
enum msix_hw_int_causes {
|
||||
MSIX_HW_INT_CAUSES_REG_ALIVE = BIT(0),
|
||||
MSIX_HW_INT_CAUSES_REG_WAKEUP = BIT(1),
|
||||
MSIX_HW_INT_CAUSES_REG_IPC = BIT(1),
|
||||
MSIX_HW_INT_CAUSES_REG_IML = BIT(2),
|
||||
MSIX_HW_INT_CAUSES_REG_SW_ERR_V2 = BIT(5),
|
||||
MSIX_HW_INT_CAUSES_REG_CT_KILL = BIT(6),
|
||||
MSIX_HW_INT_CAUSES_REG_RF_KILL = BIT(7),
|
||||
MSIX_HW_INT_CAUSES_REG_PERIODIC = BIT(8),
|
||||
|
||||
@@ -1804,7 +1804,7 @@ MODULE_PARM_DESC(11n_disable,
|
||||
"disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX");
|
||||
module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444);
|
||||
MODULE_PARM_DESC(amsdu_size,
|
||||
"amsdu size 0: 12K for multi Rx queue devices, 2K for 22560 devices, "
|
||||
"amsdu size 0: 12K for multi Rx queue devices, 2K for AX210 devices, "
|
||||
"4K for other devices 1:4K 2:8K 3:12K 4: 2K (default 0)");
|
||||
module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444);
|
||||
MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
|
||||
|
||||
@@ -768,7 +768,7 @@ struct iwlagn_scd_bc_tbl {
|
||||
|
||||
/**
|
||||
* struct iwl_gen3_bc_tbl scheduler byte count table gen3
|
||||
* For 22560 and on:
|
||||
* For AX210 and on:
|
||||
* @tfd_offset: 0-12 - tx command byte count
|
||||
* 12-13 - number of 64 byte chunks
|
||||
* 14-16 - reserved
|
||||
|
||||
@@ -156,11 +156,10 @@ static const u16 iwl_uhb_nvm_channels[] = {
|
||||
96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,
|
||||
149, 153, 157, 161, 165, 169, 173, 177, 181,
|
||||
/* 6-7 GHz */
|
||||
189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233, 237, 241,
|
||||
245, 249, 253, 257, 261, 265, 269, 273, 277, 281, 285, 289, 293, 297,
|
||||
301, 305, 309, 313, 317, 321, 325, 329, 333, 337, 341, 345, 349, 353,
|
||||
357, 361, 365, 369, 373, 377, 381, 385, 389, 393, 397, 401, 405, 409,
|
||||
413, 417, 421
|
||||
1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69,
|
||||
73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129,
|
||||
133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185,
|
||||
189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233
|
||||
};
|
||||
|
||||
#define IWL_NVM_NUM_CHANNELS ARRAY_SIZE(iwl_nvm_channels)
|
||||
|
||||
@@ -1939,6 +1939,8 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
|
||||
if (iwl_mvm_check_rt_status(mvm, vif)) {
|
||||
set_bit(STATUS_FW_ERROR, &mvm->trans->status);
|
||||
iwl_mvm_dump_nic_error_log(mvm);
|
||||
iwl_dbg_tlv_time_point(&mvm->fwrt,
|
||||
IWL_FW_INI_TIME_POINT_FW_ASSERT, NULL);
|
||||
iwl_fw_dbg_collect_desc(&mvm->fwrt, &iwl_dump_desc_assert,
|
||||
false, 0);
|
||||
ret = 1;
|
||||
|
||||
@@ -148,7 +148,8 @@ static ssize_t iwl_dbgfs_tx_flush_write(struct iwl_mvm *mvm, char *buf,
|
||||
"FLUSHING all tids queues on sta_id = %d\n",
|
||||
flush_arg);
|
||||
mutex_lock(&mvm->mutex);
|
||||
ret = iwl_mvm_flush_sta_tids(mvm, flush_arg, 0xFF, 0) ? : count;
|
||||
ret = iwl_mvm_flush_sta_tids(mvm, flush_arg, 0xFFFF, 0)
|
||||
? : count;
|
||||
mutex_unlock(&mvm->mutex);
|
||||
return ret;
|
||||
}
|
||||
@@ -377,7 +378,7 @@ static ssize_t iwl_dbgfs_sar_geo_profile_read(struct file *file,
|
||||
pos = scnprintf(buf, bufsz,
|
||||
"SAR geographic profile disabled\n");
|
||||
} else {
|
||||
value = &mvm->geo_profiles[tbl_idx - 1].values[0];
|
||||
value = &mvm->fwrt.geo_profiles[tbl_idx - 1].values[0];
|
||||
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
"Use geographic profile %d\n", tbl_idx);
|
||||
@@ -1174,7 +1175,7 @@ static ssize_t iwl_dbgfs_inject_packet_write(struct iwl_mvm *mvm,
|
||||
int bin_len = count / 2;
|
||||
int ret = -EINVAL;
|
||||
size_t mpdu_cmd_hdr_size = (mvm->trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
IWL_DEVICE_FAMILY_AX210) ?
|
||||
sizeof(struct iwl_rx_mpdu_desc) :
|
||||
IWL_RX_DESC_SIZE_V1;
|
||||
|
||||
|
||||
@@ -514,6 +514,19 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
|
||||
struct iwl_phy_cfg_cmd phy_cfg_cmd;
|
||||
enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img;
|
||||
|
||||
if (iwl_mvm_has_unified_ucode(mvm) &&
|
||||
!mvm->trans->cfg->tx_with_siso_diversity)
|
||||
return 0;
|
||||
|
||||
if (mvm->trans->cfg->tx_with_siso_diversity) {
|
||||
/*
|
||||
* TODO: currently we don't set the antenna but letting the NIC
|
||||
* to decide which antenna to use. This should come from BIOS.
|
||||
*/
|
||||
phy_cfg_cmd.phy_cfg =
|
||||
cpu_to_le32(FW_PHY_CFG_CHAIN_SAD_ENABLED);
|
||||
}
|
||||
|
||||
/* Set parameters */
|
||||
phy_cfg_cmd.phy_cfg = cpu_to_le32(iwl_mvm_get_phy_config(mvm));
|
||||
|
||||
@@ -665,181 +678,14 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static inline int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm,
|
||||
union acpi_object *table,
|
||||
struct iwl_mvm_sar_profile *profile,
|
||||
bool enabled)
|
||||
{
|
||||
int i;
|
||||
|
||||
profile->enabled = enabled;
|
||||
|
||||
for (i = 0; i < ACPI_SAR_TABLE_SIZE; i++) {
|
||||
if ((table[i].type != ACPI_TYPE_INTEGER) ||
|
||||
(table[i].integer.value > U8_MAX))
|
||||
return -EINVAL;
|
||||
|
||||
profile->table[i] = table[i].integer.value;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_wrds_table(struct iwl_mvm *mvm)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *table, *data;
|
||||
bool enabled;
|
||||
int ret, tbl_rev;
|
||||
|
||||
data = iwl_acpi_get_object(mvm->dev, ACPI_WRDS_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
|
||||
ACPI_WRDS_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg)) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (wifi_pkg->package.elements[1].type != ACPI_TYPE_INTEGER ||
|
||||
tbl_rev != 0) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
enabled = !!(wifi_pkg->package.elements[1].integer.value);
|
||||
|
||||
/* position of the actual table */
|
||||
table = &wifi_pkg->package.elements[2];
|
||||
|
||||
/* The profile from WRDS is officially profile 1, but goes
|
||||
* into sar_profiles[0] (because we don't have a profile 0).
|
||||
*/
|
||||
ret = iwl_mvm_sar_set_profile(mvm, table, &mvm->sar_profiles[0],
|
||||
enabled);
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
bool enabled;
|
||||
int i, n_profiles, ret, tbl_rev;
|
||||
|
||||
data = iwl_acpi_get_object(mvm->dev, ACPI_EWRD_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
|
||||
ACPI_EWRD_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg)) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if ((wifi_pkg->package.elements[1].type != ACPI_TYPE_INTEGER) ||
|
||||
(wifi_pkg->package.elements[2].type != ACPI_TYPE_INTEGER) ||
|
||||
tbl_rev != 0) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
enabled = !!(wifi_pkg->package.elements[1].integer.value);
|
||||
n_profiles = wifi_pkg->package.elements[2].integer.value;
|
||||
|
||||
/*
|
||||
* Check the validity of n_profiles. The EWRD profiles start
|
||||
* from index 1, so the maximum value allowed here is
|
||||
* ACPI_SAR_PROFILES_NUM - 1.
|
||||
*/
|
||||
if (n_profiles <= 0 || n_profiles >= ACPI_SAR_PROFILE_NUM) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_profiles; i++) {
|
||||
/* the tables start at element 3 */
|
||||
int pos = 3;
|
||||
|
||||
/* The EWRD profiles officially go from 2 to 4, but we
|
||||
* save them in sar_profiles[1-3] (because we don't
|
||||
* have profile 0). So in the array we start from 1.
|
||||
*/
|
||||
ret = iwl_mvm_sar_set_profile(mvm,
|
||||
&wifi_pkg->package.elements[pos],
|
||||
&mvm->sar_profiles[i + 1],
|
||||
enabled);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/* go to the next table */
|
||||
pos += ACPI_SAR_TABLE_SIZE;
|
||||
}
|
||||
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
|
||||
{
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
int i, j, ret, tbl_rev;
|
||||
int idx = 1;
|
||||
|
||||
data = iwl_acpi_get_object(mvm->dev, ACPI_WGDS_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
|
||||
ACPI_WGDS_WIFI_DATA_SIZE, &tbl_rev);
|
||||
if (IS_ERR(wifi_pkg)) {
|
||||
ret = PTR_ERR(wifi_pkg);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (tbl_rev != 0) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
mvm->geo_rev = tbl_rev;
|
||||
for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
|
||||
for (j = 0; j < ACPI_GEO_TABLE_SIZE; j++) {
|
||||
union acpi_object *entry;
|
||||
|
||||
entry = &wifi_pkg->package.elements[idx++];
|
||||
if ((entry->type != ACPI_TYPE_INTEGER) ||
|
||||
(entry->integer.value > U8_MAX)) {
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
mvm->geo_profiles[i].values[j] = entry->integer.value;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
out_free:
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
|
||||
{
|
||||
union {
|
||||
struct iwl_dev_tx_power_cmd v5;
|
||||
struct iwl_dev_tx_power_cmd_v4 v4;
|
||||
} cmd;
|
||||
int i, j, idx;
|
||||
int profs[ACPI_SAR_NUM_CHAIN_LIMITS] = { prof_a, prof_b };
|
||||
int len;
|
||||
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS < 2);
|
||||
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS * ACPI_SAR_NUM_SUB_BANDS !=
|
||||
ACPI_SAR_TABLE_SIZE);
|
||||
u16 len = 0;
|
||||
|
||||
cmd.v5.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS);
|
||||
|
||||
@@ -848,174 +694,76 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
|
||||
len = sizeof(cmd.v5);
|
||||
else if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_TX_POWER_ACK))
|
||||
len = sizeof(cmd.v4);
|
||||
len = sizeof(struct iwl_dev_tx_power_cmd_v4);
|
||||
else
|
||||
len = sizeof(cmd.v4.v3);
|
||||
|
||||
for (i = 0; i < ACPI_SAR_NUM_CHAIN_LIMITS; i++) {
|
||||
struct iwl_mvm_sar_profile *prof;
|
||||
|
||||
/* don't allow SAR to be disabled (profile 0 means disable) */
|
||||
if (profs[i] == 0)
|
||||
return -EPERM;
|
||||
|
||||
/* we are off by one, so allow up to ACPI_SAR_PROFILE_NUM */
|
||||
if (profs[i] > ACPI_SAR_PROFILE_NUM)
|
||||
return -EINVAL;
|
||||
|
||||
/* profiles go from 1 to 4, so decrement to access the array */
|
||||
prof = &mvm->sar_profiles[profs[i] - 1];
|
||||
|
||||
/* if the profile is disabled, do nothing */
|
||||
if (!prof->enabled) {
|
||||
IWL_DEBUG_RADIO(mvm, "SAR profile %d is disabled.\n",
|
||||
profs[i]);
|
||||
/* if one of the profiles is disabled, we fail all */
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
IWL_DEBUG_INFO(mvm,
|
||||
"SAR EWRD: chain %d profile index %d\n",
|
||||
i, profs[i]);
|
||||
IWL_DEBUG_RADIO(mvm, " Chain[%d]:\n", i);
|
||||
for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
|
||||
idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
|
||||
cmd.v5.v3.per_chain_restriction[i][j] =
|
||||
cpu_to_le16(prof->table[idx]);
|
||||
IWL_DEBUG_RADIO(mvm, " Band[%d] = %d * .125dBm\n",
|
||||
j, prof->table[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
if (iwl_sar_select_profile(&mvm->fwrt, cmd.v5.v3.per_chain_restriction,
|
||||
prof_a, prof_b))
|
||||
return -ENOENT;
|
||||
IWL_DEBUG_RADIO(mvm, "Sending REDUCE_TX_POWER_CMD per chain\n");
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd);
|
||||
}
|
||||
|
||||
static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
|
||||
{
|
||||
/*
|
||||
* The GEO_TX_POWER_LIMIT command is not supported on earlier
|
||||
* firmware versions. Unfortunately, we don't have a TLV API
|
||||
* flag to rely on, so rely on the major version which is in
|
||||
* the first byte of ucode_ver. This was implemented
|
||||
* initially on version 38 and then backported to 17. It was
|
||||
* also backported to 29, but only for 7265D devices. The
|
||||
* intention was to have it in 36 as well, but not all 8000
|
||||
* family got this feature enabled. The 8000 family is the
|
||||
* only one using version 36, so skip this version entirely.
|
||||
*/
|
||||
return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
|
||||
IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17 ||
|
||||
(IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 &&
|
||||
((mvm->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
|
||||
CSR_HW_REV_TYPE_7265D));
|
||||
}
|
||||
|
||||
int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_geo_tx_power_profiles_resp *resp;
|
||||
int ret;
|
||||
union geo_tx_power_profiles_cmd geo_tx_cmd;
|
||||
u16 len;
|
||||
void *data;
|
||||
struct iwl_geo_tx_power_profiles_cmd geo_cmd;
|
||||
struct iwl_geo_tx_power_profiles_cmd_v1 geo_cmd_v1;
|
||||
int ret;
|
||||
struct iwl_host_cmd cmd;
|
||||
|
||||
if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
|
||||
geo_cmd.ops =
|
||||
if (fw_has_api(&mvm->fwrt.fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
|
||||
geo_tx_cmd.geo_cmd.ops =
|
||||
cpu_to_le32(IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE);
|
||||
len = sizeof(geo_cmd);
|
||||
data = &geo_cmd;
|
||||
len = sizeof(geo_tx_cmd.geo_cmd);
|
||||
} else {
|
||||
geo_cmd_v1.ops =
|
||||
geo_tx_cmd.geo_cmd_v1.ops =
|
||||
cpu_to_le32(IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE);
|
||||
len = sizeof(geo_cmd_v1);
|
||||
data = &geo_cmd_v1;
|
||||
len = sizeof(geo_tx_cmd.geo_cmd_v1);
|
||||
}
|
||||
|
||||
if (!iwl_sar_geo_support(&mvm->fwrt))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
cmd = (struct iwl_host_cmd){
|
||||
.id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT),
|
||||
.len = { len, },
|
||||
.flags = CMD_WANT_SKB,
|
||||
.data = { data },
|
||||
.data = { &geo_tx_cmd },
|
||||
};
|
||||
|
||||
if (!iwl_mvm_sar_geo_support(mvm))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
if (ret) {
|
||||
IWL_ERR(mvm, "Failed to get geographic profile info %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
resp = (void *)cmd.resp_pkt->data;
|
||||
ret = le32_to_cpu(resp->profile_idx);
|
||||
if (WARN_ON(ret > ACPI_NUM_GEO_PROFILES)) {
|
||||
ret = -EIO;
|
||||
IWL_WARN(mvm, "Invalid geographic profile idx (%d)\n", ret);
|
||||
}
|
||||
|
||||
ret = iwl_validate_sar_geo_profile(&mvm->fwrt, &cmd);
|
||||
iwl_free_resp(&cmd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct iwl_geo_tx_power_profiles_cmd cmd = {
|
||||
.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES),
|
||||
};
|
||||
int ret, i, j;
|
||||
u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);
|
||||
union geo_tx_power_profiles_cmd cmd;
|
||||
u16 len;
|
||||
|
||||
if (!iwl_mvm_sar_geo_support(mvm))
|
||||
return 0;
|
||||
cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES);
|
||||
|
||||
ret = iwl_mvm_sar_get_wgds_table(mvm);
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"Geo SAR BIOS table invalid or unavailable. (%d)\n",
|
||||
ret);
|
||||
/* we don't fail if the table is not available */
|
||||
return 0;
|
||||
iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table);
|
||||
|
||||
cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
|
||||
|
||||
if (!fw_has_api(&mvm->fwrt.fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
|
||||
len = sizeof(struct iwl_geo_tx_power_profiles_cmd_v1);
|
||||
} else {
|
||||
len = sizeof(cmd.geo_cmd);
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(mvm, "Sending GEO_TX_POWER_LIMIT\n");
|
||||
|
||||
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS *
|
||||
ACPI_WGDS_TABLE_SIZE + 1 != ACPI_WGDS_WIFI_DATA_SIZE);
|
||||
|
||||
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES > IWL_NUM_GEO_PROFILES);
|
||||
|
||||
for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
|
||||
struct iwl_per_chain_offset *chain =
|
||||
(struct iwl_per_chain_offset *)&cmd.table[i];
|
||||
|
||||
for (j = 0; j < ACPI_WGDS_NUM_BANDS; j++) {
|
||||
u8 *value;
|
||||
|
||||
value = &mvm->geo_profiles[i].values[j *
|
||||
ACPI_GEO_PER_CHAIN_SIZE];
|
||||
chain[j].max_tx_power = cpu_to_le16(value[0]);
|
||||
chain[j].chain_a = value[1];
|
||||
chain[j].chain_b = value[2];
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"SAR geographic profile[%d] Band[%d]: chain A = %d chain B = %d max_tx_power = %d\n",
|
||||
i, j, value[1], value[2], value[0]);
|
||||
}
|
||||
}
|
||||
|
||||
cmd.table_revision = cpu_to_le32(mvm->geo_rev);
|
||||
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
|
||||
return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0,
|
||||
sizeof(struct iwl_geo_tx_power_profiles_cmd_v1),
|
||||
&cmd);
|
||||
}
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0, sizeof(cmd), &cmd);
|
||||
return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0, len, &cmd);
|
||||
}
|
||||
|
||||
static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
||||
@@ -1024,7 +772,7 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
||||
int i, j, ret, tbl_rev;
|
||||
int idx = 2;
|
||||
|
||||
mvm->ppag_table.enabled = cpu_to_le32(0);
|
||||
mvm->fwrt.ppag_table.enabled = cpu_to_le32(0);
|
||||
data = iwl_acpi_get_object(mvm->dev, ACPI_PPAG_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
@@ -1049,8 +797,8 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
mvm->ppag_table.enabled = cpu_to_le32(enabled->integer.value);
|
||||
if (!mvm->ppag_table.enabled) {
|
||||
mvm->fwrt.ppag_table.enabled = cpu_to_le32(enabled->integer.value);
|
||||
if (!mvm->fwrt.ppag_table.enabled) {
|
||||
ret = 0;
|
||||
goto out_free;
|
||||
}
|
||||
@@ -1070,11 +818,11 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
|
||||
(j == 0 && ent->integer.value < ACPI_PPAG_MIN_LB) ||
|
||||
(j != 0 && ent->integer.value > ACPI_PPAG_MAX_HB) ||
|
||||
(j != 0 && ent->integer.value < ACPI_PPAG_MIN_HB)) {
|
||||
mvm->ppag_table.enabled = cpu_to_le32(0);
|
||||
mvm->fwrt.ppag_table.enabled = cpu_to_le32(0);
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
mvm->ppag_table.gain[i][j] = ent->integer.value;
|
||||
mvm->fwrt.ppag_table.gain[i][j] = ent->integer.value;
|
||||
}
|
||||
}
|
||||
ret = 0;
|
||||
@@ -1095,20 +843,20 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
|
||||
IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
|
||||
IWL_DEBUG_RADIO(mvm, "PPAG is %s\n",
|
||||
mvm->ppag_table.enabled ? "enabled" : "disabled");
|
||||
mvm->fwrt.ppag_table.enabled ? "enabled" : "disabled");
|
||||
|
||||
for (i = 0; i < ACPI_PPAG_NUM_CHAINS; i++) {
|
||||
for (j = 0; j < ACPI_PPAG_NUM_SUB_BANDS; j++) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG table: chain[%d] band[%d]: gain = %d\n",
|
||||
i, j, mvm->ppag_table.gain[i][j]);
|
||||
i, j, mvm->fwrt.ppag_table.gain[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
|
||||
PER_PLATFORM_ANT_GAIN_CMD),
|
||||
0, sizeof(mvm->ppag_table),
|
||||
&mvm->ppag_table);
|
||||
0, sizeof(mvm->fwrt.ppag_table),
|
||||
&mvm->fwrt.ppag_table);
|
||||
if (ret < 0)
|
||||
IWL_ERR(mvm, "failed to send PER_PLATFORM_ANT_GAIN_CMD (%d)\n",
|
||||
ret);
|
||||
@@ -1131,17 +879,14 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
|
||||
}
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
static int iwl_mvm_sar_get_wrds_table(struct iwl_mvm *mvm)
|
||||
|
||||
inline int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm,
|
||||
int prof_a, int prof_b)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
|
||||
inline int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -1151,17 +896,6 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a,
|
||||
int prof_b)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
@@ -1169,7 +903,7 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
|
||||
static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
@@ -1228,7 +962,7 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = iwl_mvm_sar_get_wrds_table(mvm);
|
||||
ret = iwl_sar_get_wrds_table(&mvm->fwrt);
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"WRDS SAR BIOS table invalid or unavailable. (%d)\n",
|
||||
@@ -1240,16 +974,14 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = iwl_mvm_sar_get_ewrd_table(mvm);
|
||||
ret = iwl_sar_get_ewrd_table(&mvm->fwrt);
|
||||
/* if EWRD is not available, we can still use WRDS, so don't fail */
|
||||
if (ret < 0)
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"EWRD SAR BIOS table invalid or unavailable. (%d)\n",
|
||||
ret);
|
||||
|
||||
/* choose profile 1 (WRDS) as default for both chains */
|
||||
ret = iwl_mvm_sar_select_profile(mvm, 1, 1);
|
||||
|
||||
/*
|
||||
* If we don't have profile 0 from BIOS, just skip it. This
|
||||
* means that SAR Geo will not be enabled either, even if we
|
||||
@@ -1344,12 +1076,12 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
ret = iwl_send_phy_db_data(mvm->phy_db);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
ret = iwl_send_phy_cfg_cmd(mvm);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = iwl_send_phy_cfg_cmd(mvm);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
ret = iwl_mvm_send_bt_init_conf(mvm);
|
||||
if (ret)
|
||||
goto error;
|
||||
@@ -1480,7 +1212,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
ret = iwl_mvm_sar_init(mvm);
|
||||
if (ret == 0) {
|
||||
ret = iwl_mvm_sar_geo_init(mvm);
|
||||
} else if (ret > 0 && !iwl_mvm_sar_get_wgds_table(mvm)) {
|
||||
} else if (ret > 0 && !iwl_sar_get_wgds_table(&mvm->fwrt)) {
|
||||
/*
|
||||
* If basic SAR is not available, we check for WGDS,
|
||||
* which should *not* be available either. If it is
|
||||
|
||||
@@ -4644,7 +4644,7 @@ static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
|
||||
continue;
|
||||
|
||||
if (drop)
|
||||
iwl_mvm_flush_sta_tids(mvm, i, 0xFF, 0);
|
||||
iwl_mvm_flush_sta_tids(mvm, i, 0xFFFF, 0);
|
||||
else
|
||||
iwl_mvm_wait_sta_queues_empty(mvm,
|
||||
iwl_mvm_sta_from_mac80211(sta));
|
||||
|
||||
@@ -188,6 +188,11 @@ enum iwl_power_scheme {
|
||||
IWL_POWER_SCHEME_LP
|
||||
};
|
||||
|
||||
union geo_tx_power_profiles_cmd {
|
||||
struct iwl_geo_tx_power_profiles_cmd geo_cmd;
|
||||
struct iwl_geo_tx_power_profiles_cmd_v1 geo_cmd_v1;
|
||||
};
|
||||
|
||||
#define IWL_CONN_MAX_LISTEN_INTERVAL 10
|
||||
#define IWL_UAPSD_MAX_SP IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
|
||||
|
||||
@@ -774,14 +779,6 @@ enum iwl_mvm_queue_status {
|
||||
|
||||
#define IWL_MVM_NUM_CIPHERS 10
|
||||
|
||||
struct iwl_mvm_sar_profile {
|
||||
bool enabled;
|
||||
u8 table[ACPI_SAR_TABLE_SIZE];
|
||||
};
|
||||
|
||||
struct iwl_mvm_geo_profile {
|
||||
u8 values[ACPI_GEO_TABLE_SIZE];
|
||||
};
|
||||
|
||||
struct iwl_mvm_txq {
|
||||
struct list_head list;
|
||||
@@ -1144,14 +1141,6 @@ struct iwl_mvm {
|
||||
/* sniffer data to include in radiotap */
|
||||
__le16 cur_aid;
|
||||
u8 cur_bssid[ETH_ALEN];
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
struct iwl_mvm_sar_profile sar_profiles[ACPI_SAR_PROFILE_NUM];
|
||||
struct iwl_mvm_geo_profile geo_profiles[ACPI_NUM_GEO_PROFILES];
|
||||
u32 geo_rev;
|
||||
struct iwl_ppag_table_cmd ppag_table;
|
||||
u32 ppag_rev;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Extract MVM priv from op_mode and _hw */
|
||||
|
||||
@@ -692,7 +692,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
op_mode->ops = &iwl_mvm_ops_mq;
|
||||
trans->rx_mpdu_cmd_hdr_size =
|
||||
(trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
IWL_DEVICE_FAMILY_AX210) ?
|
||||
sizeof(struct iwl_rx_mpdu_desc) :
|
||||
IWL_RX_DESC_SIZE_V1;
|
||||
} else {
|
||||
@@ -761,7 +761,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
trans_cfg.no_reclaim_cmds = no_reclaim_cmds;
|
||||
trans_cfg.n_no_reclaim_cmds = ARRAY_SIZE(no_reclaim_cmds);
|
||||
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
rb_size_default = IWL_AMSDU_2K;
|
||||
else
|
||||
rb_size_default = IWL_AMSDU_4K;
|
||||
@@ -787,7 +787,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
|
||||
trans->wide_cmd_header = true;
|
||||
trans_cfg.bc_table_dword =
|
||||
mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_22560;
|
||||
mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210;
|
||||
|
||||
trans_cfg.command_groups = iwl_mvm_groups;
|
||||
trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups);
|
||||
|
||||
@@ -341,9 +341,11 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
|
||||
lq_sta = &mvmsta->lq_sta.rs_fw;
|
||||
|
||||
if (flags & IWL_TLC_NOTIF_FLAG_RATE) {
|
||||
char pretty_rate[100];
|
||||
lq_sta->last_rate_n_flags = le32_to_cpu(notif->rate);
|
||||
IWL_DEBUG_RATE(mvm, "new rate_n_flags: 0x%X\n",
|
||||
lq_sta->last_rate_n_flags);
|
||||
rs_pretty_print_rate(pretty_rate, sizeof(pretty_rate),
|
||||
lq_sta->last_rate_n_flags);
|
||||
IWL_DEBUG_RATE(mvm, "new rate: %s\n", pretty_rate);
|
||||
}
|
||||
|
||||
if (flags & IWL_TLC_NOTIF_FLAG_AMSDU && !mvmsta->orig_amsdu_len) {
|
||||
@@ -384,7 +386,7 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta)
|
||||
u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta)
|
||||
{
|
||||
const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
|
||||
const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
|
||||
|
||||
@@ -1533,6 +1533,8 @@ static void rs_set_amsdu_len(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
int i;
|
||||
|
||||
sta->max_amsdu_len = rs_fw_get_max_amsdu_len(sta);
|
||||
|
||||
/*
|
||||
* In case TLC offload is not active amsdu_enabled is either 0xFFFF
|
||||
* or 0, since there is no per-TID alg.
|
||||
@@ -3683,7 +3685,6 @@ static void rs_free_sta(void *mvm_r, struct ieee80211_sta *sta, void *mvm_sta)
|
||||
IWL_DEBUG_RATE(mvm, "leave\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
{
|
||||
|
||||
@@ -3739,14 +3740,15 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
}
|
||||
|
||||
return scnprintf(buf, bufsz,
|
||||
"%s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n",
|
||||
type, rs_pretty_ant(ant), bw, mcs, nss,
|
||||
"0x%x: %s | ANT: %s BW: %s MCS: %d NSS: %d %s%s%s%s\n",
|
||||
rate, type, rs_pretty_ant(ant), bw, mcs, nss,
|
||||
(rate & RATE_MCS_SGI_MSK) ? "SGI " : "NGI ",
|
||||
(rate & RATE_MCS_STBC_MSK) ? "STBC " : "",
|
||||
(rate & RATE_MCS_LDPC_MSK) ? "LDPC " : "",
|
||||
(rate & RATE_MCS_BF_MSK) ? "BF " : "");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
/**
|
||||
* Program the device to use fixed rate for frame transmit
|
||||
* This is for debugging/testing only
|
||||
|
||||
@@ -452,4 +452,6 @@ int rs_fw_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
|
||||
bool enable);
|
||||
void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
|
||||
struct iwl_rx_cmd_buffer *rxb);
|
||||
|
||||
u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta);
|
||||
#endif /* __rs__ */
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include "iwl-trans.h"
|
||||
@@ -357,7 +358,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||
rx_res = (struct iwl_rx_mpdu_res_start *)pkt->data;
|
||||
hdr = (struct ieee80211_hdr *)(pkt->data + sizeof(*rx_res));
|
||||
len = le16_to_cpu(rx_res->byte_count);
|
||||
rx_pkt_status = le32_to_cpup((__le32 *)
|
||||
rx_pkt_status = get_unaligned_le32((__le32 *)
|
||||
(pkt->data + sizeof(*rx_res) + len));
|
||||
|
||||
/* Dont use dev_alloc_skb(), we'll have enough headroom once
|
||||
|
||||
@@ -1578,7 +1578,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||
if (unlikely(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
|
||||
return;
|
||||
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
rate_n_flags = le32_to_cpu(desc->v3.rate_n_flags);
|
||||
channel = desc->v3.channel;
|
||||
gp2_on_air_rise = le32_to_cpu(desc->v3.gp2_on_air_rise);
|
||||
@@ -1680,7 +1680,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||
u64 tsf_on_air_rise;
|
||||
|
||||
if (mvm->trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560)
|
||||
IWL_DEVICE_FAMILY_AX210)
|
||||
tsf_on_air_rise = le64_to_cpu(desc->v3.tsf_on_air_rise);
|
||||
else
|
||||
tsf_on_air_rise = le64_to_cpu(desc->v1.tsf_on_air_rise);
|
||||
|
||||
@@ -89,6 +89,10 @@
|
||||
#define IWL_SCAN_ADWELL_DEFAULT_LB_N_APS 2
|
||||
/* adaptive dwell default APs number in social channels (1, 6, 11) */
|
||||
#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
|
||||
|
||||
struct iwl_mvm_scan_timing_params {
|
||||
u32 suspend_time;
|
||||
@@ -539,6 +543,7 @@ static void iwl_scan_build_ssids(struct iwl_mvm_scan_params *params,
|
||||
{
|
||||
int i, j;
|
||||
int index;
|
||||
u32 tmp_bitmap = 0;
|
||||
|
||||
/*
|
||||
* copy SSIDs from match list.
|
||||
@@ -558,7 +563,6 @@ static void iwl_scan_build_ssids(struct iwl_mvm_scan_params *params,
|
||||
}
|
||||
|
||||
/* add SSIDs from scan SSID list */
|
||||
*ssid_bitmap = 0;
|
||||
for (j = params->n_ssids - 1;
|
||||
j >= 0 && i < PROBE_OPTION_MAX;
|
||||
i++, j--) {
|
||||
@@ -570,11 +574,13 @@ static void iwl_scan_build_ssids(struct iwl_mvm_scan_params *params,
|
||||
ssids[i].len = params->ssids[j].ssid_len;
|
||||
memcpy(ssids[i].ssid, params->ssids[j].ssid,
|
||||
ssids[i].len);
|
||||
*ssid_bitmap |= BIT(i);
|
||||
tmp_bitmap |= BIT(i);
|
||||
} else {
|
||||
*ssid_bitmap |= BIT(index);
|
||||
tmp_bitmap |= BIT(index);
|
||||
}
|
||||
}
|
||||
if (ssid_bitmap)
|
||||
*ssid_bitmap = tmp_bitmap;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -972,10 +978,6 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
int i;
|
||||
u8 band;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
memset(cmd, 0, ksize(cmd));
|
||||
|
||||
if (WARN_ON(params->n_scan_plans > IWL_MAX_SCHED_SCAN_PLANS))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1405,16 +1407,170 @@ static void iwl_mvm_scan_umac_dwell(struct iwl_mvm *mvm,
|
||||
cmd->ooc_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_2);
|
||||
}
|
||||
|
||||
static u32 iwl_mvm_scan_umac_ooc_priority(struct iwl_mvm_scan_params *params)
|
||||
{
|
||||
return iwl_mvm_is_regular_scan(params) ?
|
||||
IWL_SCAN_PRIORITY_EXT_6 :
|
||||
IWL_SCAN_PRIORITY_EXT_2;
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_dwell_v10(struct iwl_mvm *mvm,
|
||||
struct iwl_scan_general_params_v10 *general_params,
|
||||
struct iwl_mvm_scan_params *params)
|
||||
{
|
||||
struct iwl_mvm_scan_timing_params *timing, *hb_timing;
|
||||
u8 active_dwell, passive_dwell;
|
||||
|
||||
timing = &scan_timing[params->type];
|
||||
active_dwell = params->measurement_dwell ?
|
||||
params->measurement_dwell : IWL_SCAN_DWELL_ACTIVE;
|
||||
passive_dwell = params->measurement_dwell ?
|
||||
params->measurement_dwell : IWL_SCAN_DWELL_PASSIVE;
|
||||
|
||||
general_params->adwell_default_social_chn =
|
||||
IWL_SCAN_ADWELL_DEFAULT_N_APS_SOCIAL;
|
||||
general_params->adwell_default_2g = IWL_SCAN_ADWELL_DEFAULT_LB_N_APS;
|
||||
general_params->adwell_default_5g = IWL_SCAN_ADWELL_DEFAULT_HB_N_APS;
|
||||
|
||||
/* if custom max budget was configured with debugfs */
|
||||
if (IWL_MVM_ADWELL_MAX_BUDGET)
|
||||
general_params->adwell_max_budget =
|
||||
cpu_to_le16(IWL_MVM_ADWELL_MAX_BUDGET);
|
||||
else if (params->ssids && params->ssids[0].ssid_len)
|
||||
general_params->adwell_max_budget =
|
||||
cpu_to_le16(IWL_SCAN_ADWELL_MAX_BUDGET_DIRECTED_SCAN);
|
||||
else
|
||||
general_params->adwell_max_budget =
|
||||
cpu_to_le16(IWL_SCAN_ADWELL_MAX_BUDGET_FULL_SCAN);
|
||||
|
||||
general_params->scan_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6);
|
||||
general_params->max_out_of_time[SCAN_LB_LMAC_IDX] =
|
||||
cpu_to_le32(timing->max_out_time);
|
||||
general_params->suspend_time[SCAN_LB_LMAC_IDX] =
|
||||
cpu_to_le32(timing->suspend_time);
|
||||
|
||||
hb_timing = &scan_timing[params->hb_type];
|
||||
|
||||
general_params->max_out_of_time[SCAN_HB_LMAC_IDX] =
|
||||
cpu_to_le32(hb_timing->max_out_time);
|
||||
general_params->suspend_time[SCAN_HB_LMAC_IDX] =
|
||||
cpu_to_le32(hb_timing->suspend_time);
|
||||
|
||||
general_params->active_dwell[SCAN_LB_LMAC_IDX] = active_dwell;
|
||||
general_params->passive_dwell[SCAN_LB_LMAC_IDX] = passive_dwell;
|
||||
general_params->active_dwell[SCAN_HB_LMAC_IDX] = active_dwell;
|
||||
general_params->passive_dwell[SCAN_HB_LMAC_IDX] = passive_dwell;
|
||||
}
|
||||
|
||||
struct iwl_mvm_scan_channel_segment {
|
||||
u8 start_idx;
|
||||
u8 end_idx;
|
||||
u8 first_channel_id;
|
||||
u8 last_channel_id;
|
||||
u8 channel_spacing_shift;
|
||||
u8 band;
|
||||
};
|
||||
|
||||
static const struct iwl_mvm_scan_channel_segment scan_channel_segments[] = {
|
||||
{
|
||||
.start_idx = 0,
|
||||
.end_idx = 13,
|
||||
.first_channel_id = 1,
|
||||
.last_channel_id = 14,
|
||||
.channel_spacing_shift = 0,
|
||||
.band = PHY_BAND_24
|
||||
},
|
||||
{
|
||||
.start_idx = 14,
|
||||
.end_idx = 41,
|
||||
.first_channel_id = 36,
|
||||
.last_channel_id = 144,
|
||||
.channel_spacing_shift = 2,
|
||||
.band = PHY_BAND_5
|
||||
},
|
||||
{
|
||||
.start_idx = 42,
|
||||
.end_idx = 50,
|
||||
.first_channel_id = 149,
|
||||
.last_channel_id = 181,
|
||||
.channel_spacing_shift = 2,
|
||||
.band = PHY_BAND_5
|
||||
},
|
||||
};
|
||||
|
||||
static int iwl_mvm_scan_ch_and_band_to_idx(u8 channel_id, u8 band)
|
||||
{
|
||||
int i, index;
|
||||
|
||||
if (!channel_id)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(scan_channel_segments); i++) {
|
||||
const struct iwl_mvm_scan_channel_segment *ch_segment =
|
||||
&scan_channel_segments[i];
|
||||
u32 ch_offset;
|
||||
|
||||
if (ch_segment->band != band ||
|
||||
ch_segment->first_channel_id > channel_id ||
|
||||
ch_segment->last_channel_id < channel_id)
|
||||
continue;
|
||||
|
||||
ch_offset = (channel_id - ch_segment->first_channel_id) >>
|
||||
ch_segment->channel_spacing_shift;
|
||||
|
||||
index = scan_channel_segments[i].start_idx + ch_offset;
|
||||
if (index < IWL_SCAN_NUM_CHANNELS)
|
||||
return index;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(p2p_go_friendly_chs); i++) {
|
||||
if (p2p_go_friendly_chs[i] == ch_id) {
|
||||
int ch_idx, bitmap_idx;
|
||||
|
||||
ch_idx = iwl_mvm_scan_ch_and_band_to_idx(ch_id, band);
|
||||
if (ch_idx < 0)
|
||||
return;
|
||||
|
||||
bitmap_idx = ch_idx / 8;
|
||||
if (bitmap_idx >= bitmap_n_entries)
|
||||
return;
|
||||
|
||||
ch_idx = ch_idx % 8;
|
||||
ch_bitmap[bitmap_idx] |= BIT(ch_idx);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_umac_scan_cfg_channels(struct iwl_mvm *mvm,
|
||||
struct ieee80211_channel **channels,
|
||||
int n_channels, u32 ssid_bitmap,
|
||||
int n_channels, u32 flags,
|
||||
struct iwl_scan_channel_cfg_umac *channel_cfg)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_channels; i++) {
|
||||
channel_cfg[i].flags = cpu_to_le32(ssid_bitmap);
|
||||
channel_cfg[i].flags = cpu_to_le32(flags);
|
||||
channel_cfg[i].v1.channel_num = channels[i]->hw_value;
|
||||
if (iwl_mvm_is_scan_ext_chan_supported(mvm)) {
|
||||
enum nl80211_band band = channels[i]->band;
|
||||
@@ -1430,6 +1586,92 @@ iwl_mvm_umac_scan_cfg_channels(struct iwl_mvm *mvm,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_umac_scan_cfg_channels_v4(struct iwl_mvm *mvm,
|
||||
struct ieee80211_channel **channels,
|
||||
struct iwl_scan_channel_params_v4 *cp,
|
||||
int n_channels, u32 flags,
|
||||
enum nl80211_iftype vif_type)
|
||||
{
|
||||
u8 *bitmap = cp->adwell_ch_override_bitmap;
|
||||
size_t bitmap_n_entries = ARRAY_SIZE(cp->adwell_ch_override_bitmap);
|
||||
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];
|
||||
|
||||
cfg->flags = cpu_to_le32(flags);
|
||||
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;
|
||||
|
||||
iwl_mvm_scan_ch_add_n_aps_override(vif_type,
|
||||
cfg->v2.channel_num,
|
||||
cfg->v2.band, bitmap,
|
||||
bitmap_n_entries);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 iwl_mvm_scan_umac_chan_flags_v2(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
u8 flags = 0;
|
||||
|
||||
flags |= IWL_SCAN_CHANNEL_FLAG_ENABLE_CHAN_ORDER;
|
||||
|
||||
if (iwl_mvm_scan_use_ebs(mvm, vif))
|
||||
flags |= IWL_SCAN_CHANNEL_FLAG_EBS |
|
||||
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
||||
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD;
|
||||
|
||||
/* set fragmented ebs for fragmented scan on HB channels */
|
||||
if (iwl_mvm_is_scan_fragmented(params->hb_type))
|
||||
flags |= IWL_SCAN_CHANNEL_FLAG_EBS_FRAG;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static u16 iwl_mvm_scan_umac_flags_v2(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
int type)
|
||||
{
|
||||
u16 flags = 0;
|
||||
|
||||
if (params->n_ssids == 0)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE;
|
||||
|
||||
if (iwl_mvm_is_scan_fragmented(params->type))
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1;
|
||||
|
||||
if (iwl_mvm_is_scan_fragmented(params->hb_type))
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2;
|
||||
|
||||
if (params->pass_all)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL;
|
||||
else
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH;
|
||||
|
||||
if (!iwl_mvm_is_regular_scan(params))
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC;
|
||||
|
||||
if (params->measurement_dwell ||
|
||||
mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE;
|
||||
|
||||
if (IWL_MVM_ADWELL_ENABLE)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL;
|
||||
|
||||
if (type == IWL_MVM_SCAN_SCHED || type == IWL_MVM_SCAN_NETDETECT)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static u16 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif)
|
||||
@@ -1473,8 +1715,7 @@ static u16 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
|
||||
if (mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE;
|
||||
|
||||
if (iwl_mvm_is_adaptive_dwell_supported(mvm) && IWL_MVM_ADWELL_ENABLE &&
|
||||
vif->type != NL80211_IFTYPE_P2P_DEVICE)
|
||||
if (iwl_mvm_is_adaptive_dwell_supported(mvm) && IWL_MVM_ADWELL_ENABLE)
|
||||
flags |= IWL_UMAC_SCAN_GEN_FLAGS_ADAPTIVE_DWELL;
|
||||
|
||||
/*
|
||||
@@ -1509,9 +1750,42 @@ static u16 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
|
||||
return flags;
|
||||
}
|
||||
|
||||
static int
|
||||
iwl_mvm_fill_scan_sched_params(struct iwl_mvm_scan_params *params,
|
||||
struct iwl_scan_umac_schedule *schedule,
|
||||
__le16 *delay)
|
||||
{
|
||||
int i;
|
||||
if (WARN_ON(!params->n_scan_plans ||
|
||||
params->n_scan_plans > IWL_MAX_SCHED_SCAN_PLANS))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < params->n_scan_plans; i++) {
|
||||
struct cfg80211_sched_scan_plan *scan_plan =
|
||||
¶ms->scan_plans[i];
|
||||
|
||||
schedule[i].iter_count = scan_plan->iterations;
|
||||
schedule[i].interval =
|
||||
cpu_to_le16(scan_plan->interval);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the number of iterations of the last scan plan is set to
|
||||
* zero, it should run infinitely. However, this is not always the case.
|
||||
* For example, when regular scan is requested the driver sets one scan
|
||||
* plan with one iteration.
|
||||
*/
|
||||
if (!schedule[params->n_scan_plans - 1].iter_count)
|
||||
schedule[params->n_scan_plans - 1].iter_count = 0xff;
|
||||
|
||||
*delay = cpu_to_le16(params->delay);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
int type)
|
||||
int type, int uid)
|
||||
{
|
||||
struct iwl_scan_req_umac *cmd = mvm->scan_cmd;
|
||||
struct iwl_scan_umac_chan_param *chan_param;
|
||||
@@ -1522,7 +1796,7 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
(struct iwl_scan_req_umac_tail_v2 *)sec_part;
|
||||
struct iwl_scan_req_umac_tail_v1 *tail_v1;
|
||||
struct iwl_ssid_ie *direct_scan;
|
||||
int uid, i;
|
||||
int ret = 0;
|
||||
u32 ssid_bitmap = 0;
|
||||
u8 channel_flags = 0;
|
||||
u16 gen_flags;
|
||||
@@ -1530,17 +1804,6 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
chan_param = iwl_mvm_get_scan_req_umac_channel(mvm);
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (WARN_ON(params->n_scan_plans > IWL_MAX_SCHED_SCAN_PLANS))
|
||||
return -EINVAL;
|
||||
|
||||
uid = iwl_mvm_scan_uid_by_status(mvm, 0);
|
||||
if (uid < 0)
|
||||
return uid;
|
||||
|
||||
memset(cmd, 0, ksize(cmd));
|
||||
|
||||
iwl_mvm_scan_umac_dwell(mvm, cmd, params);
|
||||
|
||||
mvm->scan_uid_status[uid] = type;
|
||||
@@ -1583,25 +1846,10 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
chan_param->flags = channel_flags;
|
||||
chan_param->count = params->n_channels;
|
||||
|
||||
for (i = 0; i < params->n_scan_plans; i++) {
|
||||
struct cfg80211_sched_scan_plan *scan_plan =
|
||||
¶ms->scan_plans[i];
|
||||
|
||||
tail_v2->schedule[i].iter_count = scan_plan->iterations;
|
||||
tail_v2->schedule[i].interval =
|
||||
cpu_to_le16(scan_plan->interval);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the number of iterations of the last scan plan is set to
|
||||
* zero, it should run infinitely. However, this is not always the case.
|
||||
* For example, when regular scan is requested the driver sets one scan
|
||||
* plan with one iteration.
|
||||
*/
|
||||
if (!tail_v2->schedule[i - 1].iter_count)
|
||||
tail_v2->schedule[i - 1].iter_count = 0xff;
|
||||
|
||||
tail_v2->delay = cpu_to_le16(params->delay);
|
||||
ret = iwl_mvm_fill_scan_sched_params(params, tail_v2->schedule,
|
||||
&tail_v2->delay);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (iwl_mvm_is_scan_ext_chan_supported(mvm)) {
|
||||
tail_v2->preq = params->preq;
|
||||
@@ -1619,6 +1867,128 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_general_p_v10(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_scan_general_params_v10 *gp,
|
||||
u16 gen_flags)
|
||||
{
|
||||
struct iwl_mvm_vif *scan_vif = iwl_mvm_vif_from_mac80211(vif);
|
||||
|
||||
iwl_mvm_scan_umac_dwell_v10(mvm, gp, params);
|
||||
|
||||
gp->flags = cpu_to_le16(gen_flags);
|
||||
|
||||
if (gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1)
|
||||
gp->num_of_fragments[SCAN_LB_LMAC_IDX] = IWL_SCAN_NUM_OF_FRAGS;
|
||||
if (gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2)
|
||||
gp->num_of_fragments[SCAN_HB_LMAC_IDX] = IWL_SCAN_NUM_OF_FRAGS;
|
||||
|
||||
gp->scan_start_mac_id = scan_vif->id;
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_probe_p_v3(struct iwl_mvm_scan_params *params,
|
||||
struct iwl_scan_probe_params_v3 *pp)
|
||||
{
|
||||
pp->preq = params->preq;
|
||||
pp->ssid_num = params->n_ssids;
|
||||
iwl_scan_build_ssids(params, pp->direct_scan, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_ch_p_v3(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_scan_channel_params_v3 *cp)
|
||||
{
|
||||
cp->flags = iwl_mvm_scan_umac_chan_flags_v2(mvm, params, vif);
|
||||
cp->count = params->n_channels;
|
||||
|
||||
iwl_mvm_umac_scan_cfg_channels(mvm, params->channels,
|
||||
params->n_channels, 0,
|
||||
cp->channel_config);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_ch_p_v4(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_scan_channel_params_v4 *cp)
|
||||
{
|
||||
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;
|
||||
|
||||
iwl_mvm_umac_scan_cfg_channels_v4(mvm, params->channels, cp,
|
||||
params->n_channels, 0, vif->type);
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v11(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type,
|
||||
int uid)
|
||||
{
|
||||
struct iwl_scan_req_umac_v11 *cmd = mvm->scan_cmd;
|
||||
struct iwl_scan_req_params_v11 *scan_p = &cmd->scan_params;
|
||||
int ret;
|
||||
u16 gen_flags;
|
||||
|
||||
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_v3(params, &scan_p->probe_params);
|
||||
iwl_mvm_scan_umac_fill_ch_p_v3(mvm, params, vif,
|
||||
&scan_p->channel_params);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v12(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type,
|
||||
int uid)
|
||||
{
|
||||
struct iwl_scan_req_umac_v12 *cmd = mvm->scan_cmd;
|
||||
struct iwl_scan_req_params_v12 *scan_p = &cmd->scan_params;
|
||||
int ret;
|
||||
u16 gen_flags;
|
||||
|
||||
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_v3(params, &scan_p->probe_params);
|
||||
iwl_mvm_scan_umac_fill_ch_p_v4(mvm, params, vif,
|
||||
&scan_p->channel_params);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_num_scans(struct iwl_mvm *mvm)
|
||||
{
|
||||
return hweight32(mvm->scan_status & IWL_MVM_SCAN_MASK);
|
||||
@@ -1721,6 +2091,63 @@ static void iwl_mvm_fill_scan_type(struct iwl_mvm *mvm,
|
||||
}
|
||||
}
|
||||
|
||||
struct iwl_scan_umac_handler {
|
||||
u8 version;
|
||||
int (*handler)(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type, int uid);
|
||||
};
|
||||
|
||||
#define IWL_SCAN_UMAC_HANDLER(_ver) { \
|
||||
.version = _ver, \
|
||||
.handler = iwl_mvm_scan_umac_v##_ver, \
|
||||
}
|
||||
|
||||
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(12),
|
||||
IWL_SCAN_UMAC_HANDLER(11),
|
||||
};
|
||||
|
||||
static int iwl_mvm_build_scan_cmd(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_host_cmd *hcmd,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
int type)
|
||||
{
|
||||
int uid, i;
|
||||
u8 scan_ver;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
memset(mvm->scan_cmd, 0, ksize(mvm->scan_cmd));
|
||||
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
|
||||
hcmd->id = SCAN_OFFLOAD_REQUEST_CMD;
|
||||
|
||||
return iwl_mvm_scan_lmac(mvm, vif, params);
|
||||
}
|
||||
|
||||
uid = iwl_mvm_scan_uid_by_status(mvm, 0);
|
||||
if (uid < 0)
|
||||
return uid;
|
||||
|
||||
hcmd->id = iwl_cmd_id(SCAN_REQ_UMAC, IWL_ALWAYS_LONG_GROUP, 0);
|
||||
|
||||
scan_ver = iwl_mvm_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP,
|
||||
SCAN_REQ_UMAC);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(iwl_scan_umac_handlers); i++) {
|
||||
const struct iwl_scan_umac_handler *ver_handler =
|
||||
&iwl_scan_umac_handlers[i];
|
||||
|
||||
if (ver_handler->version != scan_ver)
|
||||
continue;
|
||||
|
||||
return ver_handler->handler(mvm, vif, params, type, uid);
|
||||
}
|
||||
|
||||
return iwl_mvm_scan_umac(mvm, vif, params, type, uid);
|
||||
}
|
||||
|
||||
int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct cfg80211_scan_request *req,
|
||||
struct ieee80211_scan_ies *ies)
|
||||
@@ -1778,14 +2205,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
iwl_mvm_build_scan_probe(mvm, vif, ies, ¶ms);
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
|
||||
hcmd.id = iwl_cmd_id(SCAN_REQ_UMAC, IWL_ALWAYS_LONG_GROUP, 0);
|
||||
ret = iwl_mvm_scan_umac(mvm, vif, ¶ms,
|
||||
IWL_MVM_SCAN_REGULAR);
|
||||
} else {
|
||||
hcmd.id = SCAN_OFFLOAD_REQUEST_CMD;
|
||||
ret = iwl_mvm_scan_lmac(mvm, vif, ¶ms);
|
||||
}
|
||||
ret = iwl_mvm_build_scan_cmd(mvm, vif, &hcmd, ¶ms,
|
||||
IWL_MVM_SCAN_REGULAR);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1883,13 +2304,7 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
|
||||
|
||||
iwl_mvm_build_scan_probe(mvm, vif, ies, ¶ms);
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
|
||||
hcmd.id = iwl_cmd_id(SCAN_REQ_UMAC, IWL_ALWAYS_LONG_GROUP, 0);
|
||||
ret = iwl_mvm_scan_umac(mvm, vif, ¶ms, type);
|
||||
} else {
|
||||
hcmd.id = SCAN_OFFLOAD_REQUEST_CMD;
|
||||
ret = iwl_mvm_scan_lmac(mvm, vif, ¶ms);
|
||||
}
|
||||
ret = iwl_mvm_build_scan_cmd(mvm, vif, &hcmd, ¶ms, type);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -2040,10 +2455,30 @@ static int iwl_mvm_scan_stop_wait(struct iwl_mvm *mvm, int type)
|
||||
1 * HZ);
|
||||
}
|
||||
|
||||
#define IWL_SCAN_REQ_UMAC_HANDLE_SIZE(_ver) { \
|
||||
case (_ver): return sizeof(struct iwl_scan_req_umac_v##_ver); \
|
||||
}
|
||||
|
||||
static int iwl_scan_req_umac_get_size(u8 scan_ver)
|
||||
{
|
||||
switch (scan_ver) {
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(12);
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(11);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_mvm_scan_size(struct iwl_mvm *mvm)
|
||||
{
|
||||
int base_size = IWL_SCAN_REQ_UMAC_SIZE_V1;
|
||||
int tail_size;
|
||||
int base_size, tail_size;
|
||||
u8 scan_ver = iwl_mvm_lookup_cmd_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP,
|
||||
SCAN_REQ_UMAC);
|
||||
|
||||
base_size = iwl_scan_req_umac_get_size(scan_ver);
|
||||
if (base_size)
|
||||
return base_size;
|
||||
|
||||
|
||||
if (iwl_mvm_is_adaptive_dwell_v2_supported(mvm))
|
||||
base_size = IWL_SCAN_REQ_UMAC_SIZE_V8;
|
||||
@@ -2051,6 +2486,8 @@ int iwl_mvm_scan_size(struct iwl_mvm *mvm)
|
||||
base_size = IWL_SCAN_REQ_UMAC_SIZE_V7;
|
||||
else if (iwl_mvm_cdb_scan_api(mvm))
|
||||
base_size = IWL_SCAN_REQ_UMAC_SIZE_V6;
|
||||
else
|
||||
base_size = IWL_SCAN_REQ_UMAC_SIZE_V1;
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
|
||||
if (iwl_mvm_is_scan_ext_chan_supported(mvm))
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright(c) 2013 - 2014, 2019 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 - 2016 Intel Deutschland GmbH
|
||||
* Copyright(c) 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
|
||||
@@ -30,6 +31,7 @@
|
||||
* Copyright(c) 2012 - 2014, 2019 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 - 2016 Intel Deutschland GmbH
|
||||
* Copyright(c) 2019 Intel Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -482,26 +484,27 @@ static const struct iwl_tt_params iwl_mvm_default_tt_params = {
|
||||
|
||||
/* budget in mWatt */
|
||||
static const u32 iwl_mvm_cdev_budgets[] = {
|
||||
2000, /* cooling state 0 */
|
||||
1800, /* cooling state 1 */
|
||||
1600, /* cooling state 2 */
|
||||
1400, /* cooling state 3 */
|
||||
1200, /* cooling state 4 */
|
||||
1000, /* cooling state 5 */
|
||||
900, /* cooling state 6 */
|
||||
800, /* cooling state 7 */
|
||||
700, /* cooling state 8 */
|
||||
650, /* cooling state 9 */
|
||||
600, /* cooling state 10 */
|
||||
550, /* cooling state 11 */
|
||||
500, /* cooling state 12 */
|
||||
450, /* cooling state 13 */
|
||||
400, /* cooling state 14 */
|
||||
350, /* cooling state 15 */
|
||||
300, /* cooling state 16 */
|
||||
250, /* cooling state 17 */
|
||||
200, /* cooling state 18 */
|
||||
150, /* cooling state 19 */
|
||||
2400, /* cooling state 0 */
|
||||
2000, /* cooling state 1 */
|
||||
1800, /* cooling state 2 */
|
||||
1600, /* cooling state 3 */
|
||||
1400, /* cooling state 4 */
|
||||
1200, /* cooling state 5 */
|
||||
1000, /* cooling state 6 */
|
||||
900, /* cooling state 7 */
|
||||
800, /* cooling state 8 */
|
||||
700, /* cooling state 9 */
|
||||
650, /* cooling state 10 */
|
||||
600, /* cooling state 11 */
|
||||
550, /* cooling state 12 */
|
||||
500, /* cooling state 13 */
|
||||
450, /* cooling state 14 */
|
||||
400, /* cooling state 15 */
|
||||
350, /* cooling state 16 */
|
||||
300, /* cooling state 17 */
|
||||
250, /* cooling state 18 */
|
||||
200, /* cooling state 19 */
|
||||
150, /* cooling state 20 */
|
||||
};
|
||||
|
||||
int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
|
||||
|
||||
@@ -550,7 +550,7 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
}
|
||||
|
||||
if (mvm->trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) {
|
||||
IWL_DEVICE_FAMILY_AX210) {
|
||||
struct iwl_tx_cmd_gen3 *cmd = (void *)dev_cmd->payload;
|
||||
|
||||
cmd->offload_assist |= cpu_to_le32(offload_assist);
|
||||
@@ -2059,7 +2059,7 @@ int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool internal, u32 flags)
|
||||
|
||||
if (iwl_mvm_has_new_tx_api(mvm))
|
||||
return iwl_mvm_flush_sta_tids(mvm, mvm_sta->sta_id,
|
||||
0xff | BIT(IWL_MGMT_TID), flags);
|
||||
0xffff, flags);
|
||||
|
||||
if (internal)
|
||||
return iwl_mvm_flush_tx_path(mvm, int_sta->tfd_queue_msk,
|
||||
|
||||
@@ -166,7 +166,7 @@ struct iwl_rx_completion_desc {
|
||||
* @id: queue index
|
||||
* @bd: driver's pointer to buffer of receive buffer descriptors (rbd).
|
||||
* Address size is 32 bit in pre-9000 devices and 64 bit in 9000 devices.
|
||||
* In 22560 devices it is a pointer to a list of iwl_rx_transfer_desc's
|
||||
* In AX210 devices it is a pointer to a list of iwl_rx_transfer_desc's
|
||||
* @bd_dma: bus address of buffer of receive buffer descriptors (rbd)
|
||||
* @ubd: driver's pointer to buffer of used receive buffer descriptors (rbd)
|
||||
* @ubd_dma: physical address of buffer of used receive buffer descriptors (rbd)
|
||||
@@ -264,7 +264,7 @@ static inline int iwl_queue_inc_wrap(struct iwl_trans *trans, int index)
|
||||
static inline __le16 iwl_get_closed_rb_stts(struct iwl_trans *trans,
|
||||
struct iwl_rxq *rxq)
|
||||
{
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
__le16 *rb_stts = rxq->rb_stts;
|
||||
|
||||
return READ_ONCE(*rb_stts);
|
||||
@@ -702,9 +702,6 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
|
||||
struct sk_buff_head *skbs);
|
||||
void iwl_trans_pcie_set_q_ptrs(struct iwl_trans *trans, int txq_id, int ptr);
|
||||
void iwl_trans_pcie_tx_reset(struct iwl_trans *trans);
|
||||
void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans_pcie *trans_pcie,
|
||||
struct iwl_txq *txq, u16 byte_cnt,
|
||||
int num_tbs);
|
||||
|
||||
static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *_tfd,
|
||||
u8 idx)
|
||||
|
||||
@@ -200,8 +200,8 @@ static inline __le32 iwl_pcie_dma_addr2rbd_ptr(dma_addr_t dma_addr)
|
||||
*/
|
||||
int iwl_pcie_rx_stop(struct iwl_trans *trans)
|
||||
{
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
/* TODO: remove this for 22560 once fw does it */
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
/* TODO: remove this once fw does it */
|
||||
iwl_write_umac_prph(trans, RFH_RXF_DMA_CFG_GEN3, 0);
|
||||
return iwl_poll_umac_prph_bit(trans, RFH_GEN_STATUS_GEN3,
|
||||
RXF_DMA_IDLE, RXF_DMA_IDLE, 1000);
|
||||
@@ -247,11 +247,7 @@ static void iwl_pcie_rxq_inc_wr_ptr(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
rxq->write_actual = round_down(rxq->write, 8);
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_22560)
|
||||
iwl_write32(trans, HBUS_TARG_WRPTR,
|
||||
(rxq->write_actual |
|
||||
((FIRST_RX_QUEUE + rxq->id) << 16)));
|
||||
else if (trans->trans_cfg->mq_rx_supported)
|
||||
if (trans->trans_cfg->mq_rx_supported)
|
||||
iwl_write32(trans, RFH_Q_FRBDCB_WIDX_TRG(rxq->id),
|
||||
rxq->write_actual);
|
||||
else
|
||||
@@ -279,7 +275,7 @@ static void iwl_pcie_restock_bd(struct iwl_trans *trans,
|
||||
struct iwl_rxq *rxq,
|
||||
struct iwl_rx_mem_buffer *rxb)
|
||||
{
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
struct iwl_rx_transfer_desc *bd = rxq->bd;
|
||||
|
||||
BUILD_BUG_ON(sizeof(*bd) != 2 * sizeof(u64));
|
||||
@@ -691,7 +687,7 @@ static void iwl_pcie_free_rxq_dma(struct iwl_trans *trans,
|
||||
{
|
||||
struct device *dev = trans->dev;
|
||||
bool use_rx_td = (trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560);
|
||||
IWL_DEVICE_FAMILY_AX210);
|
||||
int free_size = iwl_pcie_free_bd_size(trans, use_rx_td);
|
||||
|
||||
if (rxq->bd)
|
||||
@@ -712,7 +708,7 @@ static void iwl_pcie_free_rxq_dma(struct iwl_trans *trans,
|
||||
rxq->used_bd_dma = 0;
|
||||
rxq->used_bd = NULL;
|
||||
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
return;
|
||||
|
||||
if (rxq->tr_tail)
|
||||
@@ -736,7 +732,7 @@ static int iwl_pcie_alloc_rxq_dma(struct iwl_trans *trans,
|
||||
int i;
|
||||
int free_size;
|
||||
bool use_rx_td = (trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560);
|
||||
IWL_DEVICE_FAMILY_AX210);
|
||||
size_t rb_stts_size = use_rx_td ? sizeof(__le16) :
|
||||
sizeof(struct iwl_rb_status);
|
||||
|
||||
@@ -784,11 +780,6 @@ static int iwl_pcie_alloc_rxq_dma(struct iwl_trans *trans,
|
||||
&rxq->cr_tail_dma, GFP_KERNEL);
|
||||
if (!rxq->cr_tail)
|
||||
goto err;
|
||||
/*
|
||||
* W/A 22560 device step Z0 must be non zero bug
|
||||
* TODO: remove this when stop supporting Z0
|
||||
*/
|
||||
*rxq->cr_tail = cpu_to_le16(500);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -808,7 +799,7 @@ int iwl_pcie_rx_alloc(struct iwl_trans *trans)
|
||||
struct iwl_rb_allocator *rba = &trans_pcie->rba;
|
||||
int i, ret;
|
||||
size_t rb_stts_size = trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560 ?
|
||||
IWL_DEVICE_FAMILY_AX210 ?
|
||||
sizeof(__le16) : sizeof(struct iwl_rb_status);
|
||||
|
||||
if (WARN_ON(trans_pcie->rxq))
|
||||
@@ -1074,8 +1065,9 @@ int _iwl_pcie_rx_init(struct iwl_trans *trans)
|
||||
rxq->read = 0;
|
||||
rxq->write = 0;
|
||||
rxq->write_actual = 0;
|
||||
memset(rxq->rb_stts, 0, (trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
memset(rxq->rb_stts, 0,
|
||||
(trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_AX210) ?
|
||||
sizeof(__le16) : sizeof(struct iwl_rb_status));
|
||||
|
||||
iwl_pcie_rx_init_rxb_lists(rxq);
|
||||
@@ -1152,7 +1144,7 @@ void iwl_pcie_rx_free(struct iwl_trans *trans)
|
||||
struct iwl_rb_allocator *rba = &trans_pcie->rba;
|
||||
int i;
|
||||
size_t rb_stts_size = trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560 ?
|
||||
IWL_DEVICE_FAMILY_AX210 ?
|
||||
sizeof(__le16) : sizeof(struct iwl_rb_status);
|
||||
|
||||
/*
|
||||
@@ -1347,7 +1339,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
page_stolen |= rxcb._page_stolen;
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
break;
|
||||
offset += ALIGN(len, FH_RSCSR_FRAME_ALIGN);
|
||||
}
|
||||
@@ -1399,7 +1391,7 @@ static struct iwl_rx_mem_buffer *iwl_pcie_get_rxb(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
/* used_bd is a 32/16 bit but only 12 are used to retrieve the vid */
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
vid = le16_to_cpu(rxq->cd[i].rbid) & 0x0FFF;
|
||||
else
|
||||
vid = le32_to_cpu(rxq->bd_32[i]) & 0x0FFF;
|
||||
@@ -1515,7 +1507,7 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue)
|
||||
/* Backtrack one entry */
|
||||
rxq->read = i;
|
||||
/* update cr tail with the rxq read pointer */
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
*rxq->cr_tail = cpu_to_le16(r);
|
||||
spin_unlock(&rxq->lock);
|
||||
|
||||
@@ -2152,8 +2144,7 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
|
||||
|
||||
/* Error detected by uCode */
|
||||
if ((inta_fh & MSIX_FH_INT_CAUSES_FH_ERR) ||
|
||||
(inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR) ||
|
||||
(inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR_V2)) {
|
||||
(inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR)) {
|
||||
IWL_ERR(trans,
|
||||
"Microcode SW error detected. Restarting 0x%X.\n",
|
||||
inta_fh);
|
||||
@@ -2185,17 +2176,7 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_22560 &&
|
||||
inta_hw & MSIX_HW_INT_CAUSES_REG_IPC) {
|
||||
/* Reflect IML transfer status */
|
||||
int res = iwl_read32(trans, CSR_IML_RESP_ADDR);
|
||||
|
||||
IWL_DEBUG_ISR(trans, "IML transfer status: %d\n", res);
|
||||
if (res == IWL_IMAGE_RESP_FAIL) {
|
||||
isr_stats->sw++;
|
||||
iwl_pcie_irq_handle_error(trans);
|
||||
}
|
||||
} else if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP) {
|
||||
if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP) {
|
||||
u32 sleep_notif =
|
||||
le32_to_cpu(trans_pcie->prph_info->sleep_notif);
|
||||
if (sleep_notif == IWL_D3_SLEEP_STATUS_SUSPEND ||
|
||||
|
||||
@@ -193,7 +193,7 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans)
|
||||
}
|
||||
|
||||
iwl_pcie_ctxt_info_free_paging(trans);
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
iwl_pcie_ctxt_info_gen3_free(trans);
|
||||
else
|
||||
iwl_pcie_ctxt_info_free(trans);
|
||||
@@ -365,7 +365,7 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
ret = iwl_pcie_ctxt_info_gen3_init(trans, fw);
|
||||
else
|
||||
ret = iwl_pcie_ctxt_info_init(trans, fw);
|
||||
|
||||
@@ -1135,30 +1135,12 @@ static struct iwl_causes_list causes_list[] = {
|
||||
{MSIX_HW_INT_CAUSES_REG_HAP, CSR_MSIX_HW_INT_MASK_AD, 0x2E},
|
||||
};
|
||||
|
||||
static struct iwl_causes_list causes_list_v2[] = {
|
||||
{MSIX_FH_INT_CAUSES_D2S_CH0_NUM, CSR_MSIX_FH_INT_MASK_AD, 0},
|
||||
{MSIX_FH_INT_CAUSES_D2S_CH1_NUM, CSR_MSIX_FH_INT_MASK_AD, 0x1},
|
||||
{MSIX_FH_INT_CAUSES_S2D, CSR_MSIX_FH_INT_MASK_AD, 0x3},
|
||||
{MSIX_FH_INT_CAUSES_FH_ERR, CSR_MSIX_FH_INT_MASK_AD, 0x5},
|
||||
{MSIX_HW_INT_CAUSES_REG_ALIVE, CSR_MSIX_HW_INT_MASK_AD, 0x10},
|
||||
{MSIX_HW_INT_CAUSES_REG_IPC, CSR_MSIX_HW_INT_MASK_AD, 0x11},
|
||||
{MSIX_HW_INT_CAUSES_REG_SW_ERR_V2, CSR_MSIX_HW_INT_MASK_AD, 0x15},
|
||||
{MSIX_HW_INT_CAUSES_REG_CT_KILL, CSR_MSIX_HW_INT_MASK_AD, 0x16},
|
||||
{MSIX_HW_INT_CAUSES_REG_RF_KILL, CSR_MSIX_HW_INT_MASK_AD, 0x17},
|
||||
{MSIX_HW_INT_CAUSES_REG_PERIODIC, CSR_MSIX_HW_INT_MASK_AD, 0x18},
|
||||
{MSIX_HW_INT_CAUSES_REG_SCD, CSR_MSIX_HW_INT_MASK_AD, 0x2A},
|
||||
{MSIX_HW_INT_CAUSES_REG_FH_TX, CSR_MSIX_HW_INT_MASK_AD, 0x2B},
|
||||
{MSIX_HW_INT_CAUSES_REG_HW_ERR, CSR_MSIX_HW_INT_MASK_AD, 0x2D},
|
||||
{MSIX_HW_INT_CAUSES_REG_HAP, CSR_MSIX_HW_INT_MASK_AD, 0x2E},
|
||||
};
|
||||
|
||||
static void iwl_pcie_map_non_rx_causes(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
int val = trans_pcie->def_irq | MSIX_NON_AUTO_CLEAR_CAUSE;
|
||||
int i, arr_size =
|
||||
(trans->trans_cfg->device_family != IWL_DEVICE_FAMILY_22560) ?
|
||||
ARRAY_SIZE(causes_list) : ARRAY_SIZE(causes_list_v2);
|
||||
int i, arr_size = ARRAY_SIZE(causes_list);
|
||||
struct iwl_causes_list *causes = causes_list;
|
||||
|
||||
/*
|
||||
* Access all non RX causes and map them to the default irq.
|
||||
@@ -1166,11 +1148,6 @@ static void iwl_pcie_map_non_rx_causes(struct iwl_trans *trans)
|
||||
* the first interrupt vector will serve non-RX and FBQ causes.
|
||||
*/
|
||||
for (i = 0; i < arr_size; i++) {
|
||||
struct iwl_causes_list *causes =
|
||||
(trans->trans_cfg->device_family !=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
causes_list : causes_list_v2;
|
||||
|
||||
iwl_write8(trans, CSR_MSIX_IVAR(causes[i].addr), val);
|
||||
iwl_clear_bit(trans, causes[i].mask_reg,
|
||||
causes[i].cause_num);
|
||||
@@ -1894,7 +1871,7 @@ static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs)
|
||||
|
||||
static u32 iwl_trans_pcie_prph_msk(struct iwl_trans *trans)
|
||||
{
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
return 0x00FFFFFF;
|
||||
else
|
||||
return 0x000FFFFF;
|
||||
@@ -2582,7 +2559,7 @@ static ssize_t iwl_dbgfs_rx_queue_read(struct file *file,
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
char *buf;
|
||||
int pos = 0, i, ret;
|
||||
size_t bufsz = sizeof(buf);
|
||||
size_t bufsz;
|
||||
|
||||
bufsz = sizeof(char) * 121 * trans->num_rx_queues;
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ void iwl_pcie_gen2_tx_stop(struct iwl_trans *trans)
|
||||
/*
|
||||
* iwl_pcie_txq_update_byte_tbl - Set up entry in Tx byte-count array
|
||||
*/
|
||||
void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans_pcie *trans_pcie,
|
||||
struct iwl_txq *txq, u16 byte_cnt,
|
||||
int num_tbs)
|
||||
static void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans_pcie *trans_pcie,
|
||||
struct iwl_txq *txq, u16 byte_cnt,
|
||||
int num_tbs)
|
||||
{
|
||||
struct iwlagn_scd_bc_tbl *scd_bc_tbl = txq->bc_tbl.addr;
|
||||
struct iwl_trans *trans = iwl_trans_pcie_get_trans(trans_pcie);
|
||||
@@ -113,14 +113,14 @@ void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans_pcie *trans_pcie,
|
||||
*/
|
||||
num_fetch_chunks = DIV_ROUND_UP(filled_tfd_size, 64) - 1;
|
||||
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
/* Starting from 22560, the HW expects bytes */
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
/* Starting from AX210, the HW expects bytes */
|
||||
WARN_ON(trans_pcie->bc_table_dword);
|
||||
WARN_ON(len > 0x3FFF);
|
||||
bc_ent = cpu_to_le16(len | (num_fetch_chunks << 14));
|
||||
scd_bc_tbl_gen3->tfd_offset[idx] = bc_ent;
|
||||
} else {
|
||||
/* Until 22560, the HW expects DW */
|
||||
/* Before AX210, the HW expects DW */
|
||||
WARN_ON(!trans_pcie->bc_table_dword);
|
||||
len = DIV_ROUND_UP(len, 4);
|
||||
WARN_ON(len > 0xFFF);
|
||||
@@ -547,7 +547,7 @@ struct iwl_tfh_tfd *iwl_pcie_gen2_build_tfd(struct iwl_trans *trans,
|
||||
|
||||
memset(tfd, 0, sizeof(*tfd));
|
||||
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_22560)
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
len = sizeof(struct iwl_tx_cmd_gen2);
|
||||
else
|
||||
len = sizeof(struct iwl_tx_cmd_gen3);
|
||||
@@ -629,7 +629,7 @@ int iwl_trans_pcie_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
struct iwl_tx_cmd_gen3 *tx_cmd_gen3 =
|
||||
(void *)dev_cmd->payload;
|
||||
|
||||
@@ -1130,7 +1130,7 @@ int iwl_trans_pcie_dyn_txq_alloc_dma(struct iwl_trans *trans,
|
||||
return -ENOMEM;
|
||||
ret = iwl_pcie_alloc_dma_ptr(trans, &txq->bc_tbl,
|
||||
(trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
IWL_DEVICE_FAMILY_AX210) ?
|
||||
sizeof(struct iwl_gen3_bc_tbl) :
|
||||
sizeof(struct iwlagn_scd_bc_tbl));
|
||||
if (ret) {
|
||||
|
||||
@@ -949,7 +949,7 @@ static int iwl_pcie_tx_alloc(struct iwl_trans *trans)
|
||||
u16 bc_tbls_size = trans->trans_cfg->base_params->num_of_queues;
|
||||
|
||||
bc_tbls_size *= (trans->trans_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22560) ?
|
||||
IWL_DEVICE_FAMILY_AX210) ?
|
||||
sizeof(struct iwl_gen3_bc_tbl) :
|
||||
sizeof(struct iwlagn_scd_bc_tbl);
|
||||
|
||||
|
||||
@@ -897,6 +897,45 @@ static int qtnf_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int qtnf_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
int *dbm)
|
||||
{
|
||||
struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
|
||||
int ret;
|
||||
|
||||
ret = qtnf_cmd_get_tx_power(vif, dbm);
|
||||
if (ret)
|
||||
pr_err("MAC%u: failed to get Tx power\n", vif->mac->macid);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int qtnf_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
enum nl80211_tx_power_setting type, int mbm)
|
||||
{
|
||||
struct qtnf_vif *vif;
|
||||
int ret;
|
||||
|
||||
if (wdev) {
|
||||
vif = qtnf_netdev_get_priv(wdev->netdev);
|
||||
} else {
|
||||
struct qtnf_wmac *mac = wiphy_priv(wiphy);
|
||||
|
||||
vif = qtnf_mac_get_base_vif(mac);
|
||||
if (!vif) {
|
||||
pr_err("MAC%u: primary VIF is not configured\n",
|
||||
mac->macid);
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
ret = qtnf_cmd_set_tx_power(vif, type, mbm);
|
||||
if (ret)
|
||||
pr_err("MAC%u: failed to set Tx power\n", vif->mac->macid);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int qtnf_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wowlan)
|
||||
{
|
||||
@@ -991,6 +1030,8 @@ static struct cfg80211_ops qtn_cfg80211_ops = {
|
||||
.start_radar_detection = qtnf_start_radar_detection,
|
||||
.set_mac_acl = qtnf_set_mac_acl,
|
||||
.set_power_mgmt = qtnf_set_power_mgmt,
|
||||
.get_tx_power = qtnf_get_tx_power,
|
||||
.set_tx_power = qtnf_set_tx_power,
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = qtnf_suspend,
|
||||
.resume = qtnf_resume,
|
||||
|
||||
@@ -83,6 +83,7 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
|
||||
struct qlink_cmd *cmd;
|
||||
struct qlink_resp *resp = NULL;
|
||||
struct sk_buff *resp_skb = NULL;
|
||||
int resp_res = 0;
|
||||
u16 cmd_id;
|
||||
u8 mac_id;
|
||||
u8 vif_id;
|
||||
@@ -113,6 +114,7 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
|
||||
}
|
||||
|
||||
resp = (struct qlink_resp *)resp_skb->data;
|
||||
resp_res = le16_to_cpu(resp->result);
|
||||
ret = qtnf_cmd_check_reply_header(resp, cmd_id, mac_id, vif_id,
|
||||
const_resp_size);
|
||||
if (ret)
|
||||
@@ -128,8 +130,8 @@ static int qtnf_cmd_send_with_reply(struct qtnf_bus *bus,
|
||||
else
|
||||
consume_skb(resp_skb);
|
||||
|
||||
if (!ret && resp)
|
||||
return qtnf_cmd_resp_result_decode(le16_to_cpu(resp->result));
|
||||
if (!ret)
|
||||
return qtnf_cmd_resp_result_decode(resp_res);
|
||||
|
||||
pr_warn("VIF%u.%u: cmd 0x%.4X failed: %d\n",
|
||||
mac_id, vif_id, cmd_id, ret);
|
||||
@@ -2641,6 +2643,71 @@ int qtnf_cmd_send_pm_set(const struct qtnf_vif *vif, u8 pm_mode, int timeout)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qtnf_cmd_get_tx_power(const struct qtnf_vif *vif, int *dbm)
|
||||
{
|
||||
struct qtnf_bus *bus = vif->mac->bus;
|
||||
const struct qlink_resp_txpwr *resp;
|
||||
struct sk_buff *resp_skb = NULL;
|
||||
struct qlink_cmd_txpwr *cmd;
|
||||
struct sk_buff *cmd_skb;
|
||||
int ret = 0;
|
||||
|
||||
cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
|
||||
QLINK_CMD_TXPWR, sizeof(*cmd));
|
||||
if (!cmd_skb)
|
||||
return -ENOMEM;
|
||||
|
||||
cmd = (struct qlink_cmd_txpwr *)cmd_skb->data;
|
||||
cmd->op_type = QLINK_TXPWR_GET;
|
||||
|
||||
qtnf_bus_lock(bus);
|
||||
|
||||
ret = qtnf_cmd_send_with_reply(bus, cmd_skb, &resp_skb,
|
||||
sizeof(*resp), NULL);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
resp = (const struct qlink_resp_txpwr *)resp_skb->data;
|
||||
*dbm = MBM_TO_DBM(le32_to_cpu(resp->txpwr));
|
||||
|
||||
out:
|
||||
qtnf_bus_unlock(bus);
|
||||
consume_skb(resp_skb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qtnf_cmd_set_tx_power(const struct qtnf_vif *vif,
|
||||
enum nl80211_tx_power_setting type, int mbm)
|
||||
{
|
||||
struct qtnf_bus *bus = vif->mac->bus;
|
||||
const struct qlink_resp_txpwr *resp;
|
||||
struct sk_buff *resp_skb = NULL;
|
||||
struct qlink_cmd_txpwr *cmd;
|
||||
struct sk_buff *cmd_skb;
|
||||
int ret = 0;
|
||||
|
||||
cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
|
||||
QLINK_CMD_TXPWR, sizeof(*cmd));
|
||||
if (!cmd_skb)
|
||||
return -ENOMEM;
|
||||
|
||||
cmd = (struct qlink_cmd_txpwr *)cmd_skb->data;
|
||||
cmd->op_type = QLINK_TXPWR_SET;
|
||||
cmd->txpwr_setting = type;
|
||||
cmd->txpwr = cpu_to_le32(mbm);
|
||||
|
||||
qtnf_bus_lock(bus);
|
||||
|
||||
ret = qtnf_cmd_send_with_reply(bus, cmd_skb, &resp_skb,
|
||||
sizeof(*resp), NULL);
|
||||
|
||||
qtnf_bus_unlock(bus);
|
||||
consume_skb(resp_skb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qtnf_cmd_send_wowlan_set(const struct qtnf_vif *vif,
|
||||
const struct cfg80211_wowlan *wowl)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,9 @@ int qtnf_cmd_start_cac(const struct qtnf_vif *vif,
|
||||
int qtnf_cmd_set_mac_acl(const struct qtnf_vif *vif,
|
||||
const struct cfg80211_acl_data *params);
|
||||
int qtnf_cmd_send_pm_set(const struct qtnf_vif *vif, u8 pm_mode, int timeout);
|
||||
int qtnf_cmd_get_tx_power(const struct qtnf_vif *vif, int *dbm);
|
||||
int qtnf_cmd_set_tx_power(const struct qtnf_vif *vif,
|
||||
enum nl80211_tx_power_setting type, int mbm);
|
||||
int qtnf_cmd_send_wowlan_set(const struct qtnf_vif *vif,
|
||||
const struct cfg80211_wowlan *wowl);
|
||||
|
||||
|
||||
@@ -67,6 +67,14 @@ static int qtnf_netdev_close(struct net_device *ndev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void qtnf_packet_send_hi_pri(struct sk_buff *skb)
|
||||
{
|
||||
struct qtnf_vif *vif = qtnf_netdev_get_priv(skb->dev);
|
||||
|
||||
skb_queue_tail(&vif->high_pri_tx_queue, skb);
|
||||
queue_work(vif->mac->bus->hprio_workqueue, &vif->high_pri_tx_work);
|
||||
}
|
||||
|
||||
/* Netdev handler for data transmission.
|
||||
*/
|
||||
static netdev_tx_t
|
||||
@@ -107,6 +115,12 @@ qtnf_netdev_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
/* tx path is enabled: reset vif timeout */
|
||||
vif->cons_tx_timeout_cnt = 0;
|
||||
|
||||
if (unlikely(skb->protocol == htons(ETH_P_PAE))) {
|
||||
qtnf_packet_send_hi_pri(skb);
|
||||
qtnf_update_tx_stats(ndev, skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
return qtnf_bus_data_tx(mac->bus, skb);
|
||||
}
|
||||
|
||||
@@ -841,15 +855,6 @@ void qtnf_update_tx_stats(struct net_device *ndev, const struct sk_buff *skb)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qtnf_update_tx_stats);
|
||||
|
||||
void qtnf_packet_send_hi_pri(struct sk_buff *skb)
|
||||
{
|
||||
struct qtnf_vif *vif = qtnf_netdev_get_priv(skb->dev);
|
||||
|
||||
skb_queue_tail(&vif->high_pri_tx_queue, skb);
|
||||
queue_work(vif->mac->bus->hprio_workqueue, &vif->high_pri_tx_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qtnf_packet_send_hi_pri);
|
||||
|
||||
struct dentry *qtnf_get_debugfs_dir(void)
|
||||
{
|
||||
return qtnf_debugfs_dir;
|
||||
|
||||
@@ -152,7 +152,6 @@ void qtnf_virtual_intf_cleanup(struct net_device *ndev);
|
||||
|
||||
void qtnf_netdev_updown(struct net_device *ndev, bool up);
|
||||
void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted);
|
||||
void qtnf_packet_send_hi_pri(struct sk_buff *skb);
|
||||
struct dentry *qtnf_get_debugfs_dir(void);
|
||||
|
||||
static inline struct qtnf_vif *qtnf_netdev_get_priv(struct net_device *dev)
|
||||
|
||||
@@ -171,8 +171,9 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif,
|
||||
return -EPROTO;
|
||||
}
|
||||
|
||||
pr_debug("VIF%u.%u: BSSID:%pM status:%u\n",
|
||||
vif->mac->macid, vif->vifid, join_info->bssid, status);
|
||||
pr_debug("VIF%u.%u: BSSID:%pM chan:%u status:%u\n",
|
||||
vif->mac->macid, vif->vifid, join_info->bssid,
|
||||
le16_to_cpu(join_info->chan.chan.center_freq), status);
|
||||
|
||||
if (status != WLAN_STATUS_SUCCESS)
|
||||
goto done;
|
||||
@@ -181,7 +182,7 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif,
|
||||
if (!cfg80211_chandef_valid(&chandef)) {
|
||||
pr_warn("MAC%u.%u: bad channel freq=%u cf1=%u cf2=%u bw=%u\n",
|
||||
vif->mac->macid, vif->vifid,
|
||||
chandef.chan->center_freq,
|
||||
chandef.chan ? chandef.chan->center_freq : 0,
|
||||
chandef.center_freq1,
|
||||
chandef.center_freq2,
|
||||
chandef.width);
|
||||
@@ -617,6 +618,42 @@ qtnf_event_handle_external_auth(struct qtnf_vif *vif,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
qtnf_event_handle_mic_failure(struct qtnf_vif *vif,
|
||||
const struct qlink_event_mic_failure *mic_ev,
|
||||
u16 len)
|
||||
{
|
||||
struct wiphy *wiphy = priv_to_wiphy(vif->mac);
|
||||
u8 pairwise;
|
||||
|
||||
if (len < sizeof(*mic_ev)) {
|
||||
pr_err("VIF%u.%u: payload is too short (%u < %zu)\n",
|
||||
vif->mac->macid, vif->vifid, len,
|
||||
sizeof(struct qlink_event_mic_failure));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!wiphy->registered || !vif->netdev)
|
||||
return 0;
|
||||
|
||||
if (vif->wdev.iftype != NL80211_IFTYPE_STATION) {
|
||||
pr_err("VIF%u.%u: MIC_FAILURE event when not in STA mode\n",
|
||||
vif->mac->macid, vif->vifid);
|
||||
return -EPROTO;
|
||||
}
|
||||
|
||||
pairwise = mic_ev->pairwise ?
|
||||
NL80211_KEYTYPE_PAIRWISE : NL80211_KEYTYPE_GROUP;
|
||||
|
||||
pr_info("%s: MIC error: src=%pM key_index=%u pairwise=%u\n",
|
||||
vif->netdev->name, mic_ev->src, mic_ev->key_index, pairwise);
|
||||
|
||||
cfg80211_michael_mic_failure(vif->netdev, mic_ev->src, pairwise,
|
||||
mic_ev->key_index, NULL, GFP_KERNEL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qtnf_event_parse(struct qtnf_wmac *mac,
|
||||
const struct sk_buff *event_skb)
|
||||
{
|
||||
@@ -679,6 +716,10 @@ static int qtnf_event_parse(struct qtnf_wmac *mac,
|
||||
ret = qtnf_event_handle_external_auth(vif, (const void *)event,
|
||||
event_len);
|
||||
break;
|
||||
case QLINK_EVENT_MIC_FAILURE:
|
||||
ret = qtnf_event_handle_mic_failure(vif, (const void *)event,
|
||||
event_len);
|
||||
break;
|
||||
default:
|
||||
pr_warn("unknown event type: %x\n", event_id);
|
||||
break;
|
||||
|
||||
@@ -33,7 +33,7 @@ static unsigned int tx_bd_size_param;
|
||||
module_param(tx_bd_size_param, uint, 0644);
|
||||
MODULE_PARM_DESC(tx_bd_size_param, "Tx descriptors queue size");
|
||||
|
||||
static unsigned int rx_bd_size_param = 256;
|
||||
static unsigned int rx_bd_size_param;
|
||||
module_param(rx_bd_size_param, uint, 0644);
|
||||
MODULE_PARM_DESC(rx_bd_size_param, "Rx descriptors queue size");
|
||||
|
||||
@@ -130,6 +130,8 @@ static int qtnf_dbg_shm_stats(struct seq_file *s, void *data)
|
||||
|
||||
int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus)
|
||||
{
|
||||
struct qtnf_pcie_bus_priv *priv = get_bus_priv(bus);
|
||||
char card_id[64];
|
||||
int ret;
|
||||
|
||||
bus->fw_state = QTNF_FW_STATE_BOOT_DONE;
|
||||
@@ -137,7 +139,9 @@ int qtnf_pcie_fw_boot_done(struct qtnf_bus *bus)
|
||||
if (ret) {
|
||||
pr_err("failed to attach core\n");
|
||||
} else {
|
||||
qtnf_debugfs_init(bus, DRV_NAME);
|
||||
snprintf(card_id, sizeof(card_id), "%s:%s",
|
||||
DRV_NAME, pci_name(priv->pdev));
|
||||
qtnf_debugfs_init(bus, card_id);
|
||||
qtnf_debugfs_add_entry(bus, "mps", qtnf_dbg_mps_show);
|
||||
qtnf_debugfs_add_entry(bus, "msi_enabled", qtnf_dbg_msi_show);
|
||||
qtnf_debugfs_add_entry(bus, "shm_stats", qtnf_dbg_shm_stats);
|
||||
@@ -337,7 +341,6 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
bus->fw_state = QTNF_FW_STATE_DETACHED;
|
||||
pcie_priv->pdev = pdev;
|
||||
pcie_priv->tx_stopped = 0;
|
||||
pcie_priv->rx_bd_num = rx_bd_size_param;
|
||||
pcie_priv->flashboot = flashboot;
|
||||
|
||||
if (fw_blksize_param > QTN_PCIE_MAX_FW_BUFSZ)
|
||||
@@ -354,7 +357,6 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pcie_priv->pcie_irq_count = 0;
|
||||
pcie_priv->tx_reclaim_done = 0;
|
||||
pcie_priv->tx_reclaim_req = 0;
|
||||
pcie_priv->tx_eapol = 0;
|
||||
|
||||
pcie_priv->workqueue = create_singlethread_workqueue("QTNF_PCIE");
|
||||
if (!pcie_priv->workqueue) {
|
||||
@@ -377,7 +379,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
pcie_priv->epmem_bar = epmem_bar;
|
||||
pci_save_state(pdev);
|
||||
|
||||
ret = pcie_priv->probe_cb(bus, tx_bd_size_param);
|
||||
ret = pcie_priv->probe_cb(bus, tx_bd_size_param, rx_bd_size_param);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
struct qtnf_pcie_bus_priv {
|
||||
struct pci_dev *pdev;
|
||||
|
||||
int (*probe_cb)(struct qtnf_bus *bus, unsigned int tx_bd_size);
|
||||
int (*probe_cb)(struct qtnf_bus *bus, unsigned int tx_bd_size,
|
||||
unsigned int rx_bd_size);
|
||||
void (*remove_cb)(struct qtnf_bus *bus);
|
||||
int (*suspend_cb)(struct qtnf_bus *bus);
|
||||
int (*resume_cb)(struct qtnf_bus *bus);
|
||||
@@ -62,7 +63,6 @@ struct qtnf_pcie_bus_priv {
|
||||
u32 tx_done_count;
|
||||
u32 tx_reclaim_done;
|
||||
u32 tx_reclaim_req;
|
||||
u32 tx_eapol;
|
||||
|
||||
u8 msi_enabled;
|
||||
u8 tx_stopped;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
#define PEARL_TX_BD_SIZE_DEFAULT 32
|
||||
#define PEARL_RX_BD_SIZE_DEFAULT 256
|
||||
|
||||
struct qtnf_pearl_bda {
|
||||
__le16 bda_len;
|
||||
@@ -397,7 +398,8 @@ static int pearl_hhbm_init(struct qtnf_pcie_pearl_state *ps)
|
||||
}
|
||||
|
||||
static int qtnf_pcie_pearl_init_xfer(struct qtnf_pcie_pearl_state *ps,
|
||||
unsigned int tx_bd_size)
|
||||
unsigned int tx_bd_size,
|
||||
unsigned int rx_bd_size)
|
||||
{
|
||||
struct qtnf_pcie_bus_priv *priv = &ps->base;
|
||||
int ret;
|
||||
@@ -409,28 +411,29 @@ static int qtnf_pcie_pearl_init_xfer(struct qtnf_pcie_pearl_state *ps,
|
||||
val = tx_bd_size * sizeof(struct qtnf_pearl_tx_bd);
|
||||
|
||||
if (!is_power_of_2(tx_bd_size) || val > PCIE_HHBM_MAX_SIZE) {
|
||||
pr_warn("bad tx_bd_size value %u\n", tx_bd_size);
|
||||
pr_warn("invalid tx_bd_size value %u, use default %u\n",
|
||||
tx_bd_size, PEARL_TX_BD_SIZE_DEFAULT);
|
||||
priv->tx_bd_num = PEARL_TX_BD_SIZE_DEFAULT;
|
||||
} else {
|
||||
priv->tx_bd_num = tx_bd_size;
|
||||
}
|
||||
|
||||
if (rx_bd_size == 0)
|
||||
rx_bd_size = PEARL_RX_BD_SIZE_DEFAULT;
|
||||
|
||||
val = rx_bd_size * sizeof(dma_addr_t);
|
||||
|
||||
if (!is_power_of_2(rx_bd_size) || val > PCIE_HHBM_MAX_SIZE) {
|
||||
pr_warn("invalid rx_bd_size value %u, use default %u\n",
|
||||
rx_bd_size, PEARL_RX_BD_SIZE_DEFAULT);
|
||||
priv->rx_bd_num = PEARL_RX_BD_SIZE_DEFAULT;
|
||||
} else {
|
||||
priv->rx_bd_num = rx_bd_size;
|
||||
}
|
||||
|
||||
priv->rx_bd_w_index = 0;
|
||||
priv->rx_bd_r_index = 0;
|
||||
|
||||
if (!priv->rx_bd_num || !is_power_of_2(priv->rx_bd_num)) {
|
||||
pr_err("rx_bd_size_param %u is not power of two\n",
|
||||
priv->rx_bd_num);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
val = priv->rx_bd_num * sizeof(dma_addr_t);
|
||||
if (val > PCIE_HHBM_MAX_SIZE) {
|
||||
pr_err("rx_bd_size_param %u is too large\n",
|
||||
priv->rx_bd_num);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = pearl_hhbm_init(ps);
|
||||
if (ret) {
|
||||
pr_err("failed to init h/w queues\n");
|
||||
@@ -1064,7 +1067,8 @@ static u64 qtnf_pearl_dma_mask_get(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size)
|
||||
static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size,
|
||||
unsigned int rx_bd_size)
|
||||
{
|
||||
struct qtnf_shm_ipc_int ipc_int;
|
||||
struct qtnf_pcie_pearl_state *ps = get_bus_priv(bus);
|
||||
@@ -1079,7 +1083,7 @@ static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size)
|
||||
ps->bda = ps->base.epmem_bar;
|
||||
writel(ps->base.msi_enabled, &ps->bda->bda_rc_msi_enabled);
|
||||
|
||||
ret = qtnf_pcie_pearl_init_xfer(ps, tx_bd_size);
|
||||
ret = qtnf_pcie_pearl_init_xfer(ps, tx_bd_size, rx_bd_size);
|
||||
if (ret) {
|
||||
pr_err("PCIE xfer init failed\n");
|
||||
return ret;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
#define TOPAZ_TX_BD_SIZE_DEFAULT 128
|
||||
#define TOPAZ_RX_BD_SIZE_DEFAULT 256
|
||||
|
||||
struct qtnf_topaz_tx_bd {
|
||||
__le32 addr;
|
||||
@@ -331,7 +332,8 @@ static void qtnf_topaz_free_xfer_buffers(struct qtnf_pcie_topaz_state *ts)
|
||||
}
|
||||
|
||||
static int qtnf_pcie_topaz_init_xfer(struct qtnf_pcie_topaz_state *ts,
|
||||
unsigned int tx_bd_size)
|
||||
unsigned int tx_bd_size,
|
||||
unsigned int rx_bd_size)
|
||||
{
|
||||
struct qtnf_topaz_bda __iomem *bda = ts->bda;
|
||||
struct qtnf_pcie_bus_priv *priv = &ts->base;
|
||||
@@ -349,6 +351,17 @@ static int qtnf_pcie_topaz_init_xfer(struct qtnf_pcie_topaz_state *ts,
|
||||
|
||||
priv->tx_bd_num = tx_bd_size;
|
||||
qtnf_non_posted_write(priv->tx_bd_num, &bda->bda_rc_tx_bd_num);
|
||||
|
||||
if (rx_bd_size == 0)
|
||||
rx_bd_size = TOPAZ_RX_BD_SIZE_DEFAULT;
|
||||
|
||||
if (rx_bd_size > TOPAZ_RX_BD_SIZE_DEFAULT) {
|
||||
pr_warn("RX BD queue cannot exceed %d\n",
|
||||
TOPAZ_RX_BD_SIZE_DEFAULT);
|
||||
rx_bd_size = TOPAZ_RX_BD_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
priv->rx_bd_num = rx_bd_size;
|
||||
qtnf_non_posted_write(priv->rx_bd_num, &bda->bda_rc_rx_bd_num);
|
||||
|
||||
priv->rx_bd_w_index = 0;
|
||||
@@ -496,13 +509,6 @@ static int qtnf_pcie_data_tx(struct qtnf_bus *bus, struct sk_buff *skb)
|
||||
int len;
|
||||
int i;
|
||||
|
||||
if (unlikely(skb->protocol == htons(ETH_P_PAE))) {
|
||||
qtnf_packet_send_hi_pri(skb);
|
||||
qtnf_update_tx_stats(skb->dev, skb);
|
||||
priv->tx_eapol++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&priv->tx_lock, flags);
|
||||
|
||||
if (!qtnf_tx_queue_ready(ts)) {
|
||||
@@ -766,7 +772,6 @@ static int qtnf_dbg_pkt_stats(struct seq_file *s, void *data)
|
||||
seq_printf(s, "tx_done_count(%u)\n", priv->tx_done_count);
|
||||
seq_printf(s, "tx_reclaim_done(%u)\n", priv->tx_reclaim_done);
|
||||
seq_printf(s, "tx_reclaim_req(%u)\n", priv->tx_reclaim_req);
|
||||
seq_printf(s, "tx_eapol(%u)\n", priv->tx_eapol);
|
||||
|
||||
seq_printf(s, "tx_bd_r_index(%u)\n", priv->tx_bd_r_index);
|
||||
seq_printf(s, "tx_done_index(%u)\n", tx_done_index);
|
||||
@@ -1111,7 +1116,8 @@ static u64 qtnf_topaz_dma_mask_get(void)
|
||||
return DMA_BIT_MASK(32);
|
||||
}
|
||||
|
||||
static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus, unsigned int tx_bd_num)
|
||||
static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus,
|
||||
unsigned int tx_bd_num, unsigned int rx_bd_num)
|
||||
{
|
||||
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
|
||||
struct pci_dev *pdev = ts->base.pdev;
|
||||
@@ -1145,7 +1151,7 @@ static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus, unsigned int tx_bd_num)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = qtnf_pcie_topaz_init_xfer(ts, tx_bd_num);
|
||||
ret = qtnf_pcie_topaz_init_xfer(ts, tx_bd_num, rx_bd_num);
|
||||
if (ret) {
|
||||
pr_err("PCIE xfer init failed\n");
|
||||
return ret;
|
||||
|
||||
@@ -217,6 +217,8 @@ struct qlink_sta_info_state {
|
||||
* command is supported only if device reports QLINK_HW_SUPPORTS_REG_UPDATE
|
||||
* capability.
|
||||
* @QLINK_CMD_START_CAC: start radar detection procedure on a specified channel.
|
||||
* @QLINK_CMD_TXPWR: get or set current channel transmit power for
|
||||
* the specified MAC.
|
||||
*/
|
||||
enum qlink_cmd_type {
|
||||
QLINK_CMD_FW_INIT = 0x0001,
|
||||
@@ -254,6 +256,7 @@ enum qlink_cmd_type {
|
||||
QLINK_CMD_PM_SET = 0x0062,
|
||||
QLINK_CMD_WOWLAN_SET = 0x0063,
|
||||
QLINK_CMD_EXTERNAL_AUTH = 0x0066,
|
||||
QLINK_CMD_TXPWR = 0x0067,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -718,6 +721,32 @@ struct qlink_cmd_pm_set {
|
||||
u8 pm_mode;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* enum qlink_txpwr_op - transmit power operation type
|
||||
* @QLINK_TXPWR_SET: set tx power
|
||||
* @QLINK_TXPWR_GET: get current tx power setting
|
||||
*/
|
||||
enum qlink_txpwr_op {
|
||||
QLINK_TXPWR_SET,
|
||||
QLINK_TXPWR_GET
|
||||
};
|
||||
|
||||
/**
|
||||
* struct qlink_cmd_txpwr - get or set current transmit power
|
||||
*
|
||||
* @txpwr: new transmit power setting, in mBm
|
||||
* @txpwr_setting: transmit power setting type, one of
|
||||
* &enum nl80211_tx_power_setting
|
||||
* @op_type: type of operation, one of &enum qlink_txpwr_op
|
||||
*/
|
||||
struct qlink_cmd_txpwr {
|
||||
struct qlink_cmd chdr;
|
||||
__le32 txpwr;
|
||||
u8 txpwr_setting;
|
||||
u8 op_type;
|
||||
u8 rsvd[2];
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* enum qlink_wowlan_trigger
|
||||
*
|
||||
@@ -944,6 +973,19 @@ struct qlink_resp_channel_get {
|
||||
struct qlink_chandef chan;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct qlink_resp_txpwr - response for QLINK_CMD_TXPWR command
|
||||
*
|
||||
* This response is intended for QLINK_TXPWR_GET operation and does not
|
||||
* contain any meaningful information in case of QLINK_TXPWR_SET operation.
|
||||
*
|
||||
* @txpwr: current transmit power setting, in mBm
|
||||
*/
|
||||
struct qlink_resp_txpwr {
|
||||
struct qlink_resp rhdr;
|
||||
__le32 txpwr;
|
||||
} __packed;
|
||||
|
||||
/* QLINK Events messages related definitions
|
||||
*/
|
||||
|
||||
@@ -958,6 +1000,7 @@ enum qlink_event_type {
|
||||
QLINK_EVENT_FREQ_CHANGE = 0x0028,
|
||||
QLINK_EVENT_RADAR = 0x0029,
|
||||
QLINK_EVENT_EXTERNAL_AUTH = 0x0030,
|
||||
QLINK_EVENT_MIC_FAILURE = 0x0031,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1151,6 +1194,20 @@ struct qlink_event_external_auth {
|
||||
u8 action;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct qlink_event_mic_failure - data for QLINK_EVENT_MIC_FAILURE event
|
||||
*
|
||||
* @src: source MAC address of the frame
|
||||
* @key_index: index of the key being reported
|
||||
* @pairwise: whether the key is pairwise or group
|
||||
*/
|
||||
struct qlink_event_mic_failure {
|
||||
struct qlink_event ehdr;
|
||||
u8 src[ETH_ALEN];
|
||||
u8 key_index;
|
||||
u8 pairwise;
|
||||
} __packed;
|
||||
|
||||
/* QLINK TLVs (Type-Length Values) definitions
|
||||
*/
|
||||
|
||||
|
||||
@@ -5839,8 +5839,7 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
|
||||
rt2800_register_write(rt2x00dev, TX_TXBF_CFG_0, 0x8000fc21);
|
||||
rt2800_register_write(rt2x00dev, TX_TXBF_CFG_3, 0x00009c40);
|
||||
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
||||
rt2x00_rt(rt2x00dev, RT5392) ||
|
||||
rt2x00_rt(rt2x00dev, RT6352)) {
|
||||
rt2x00_rt(rt2x00dev, RT5392)) {
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||
@@ -5854,8 +5853,6 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
|
||||
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
||||
rt2800_register_write(rt2x00dev, MIMO_PS_CFG, 0x00000002);
|
||||
rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0x00150F0F);
|
||||
rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
|
||||
rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
|
||||
rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0);
|
||||
|
||||
@@ -37,53 +37,11 @@ static const u8 cck_ofdm_gain_settings[] = {
|
||||
0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
|
||||
};
|
||||
|
||||
static const u8 rtl8225se_tx_gain_cck_ofdm[] = {
|
||||
0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e
|
||||
};
|
||||
|
||||
static const u8 rtl8225se_tx_power_cck[] = {
|
||||
0x18, 0x17, 0x15, 0x11, 0x0c, 0x08, 0x04, 0x02,
|
||||
0x1b, 0x1a, 0x17, 0x13, 0x0e, 0x09, 0x04, 0x02,
|
||||
0x1f, 0x1e, 0x1a, 0x15, 0x10, 0x0a, 0x05, 0x02,
|
||||
0x22, 0x21, 0x1d, 0x18, 0x11, 0x0b, 0x06, 0x02,
|
||||
0x26, 0x25, 0x21, 0x1b, 0x14, 0x0d, 0x06, 0x03,
|
||||
0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03
|
||||
};
|
||||
|
||||
static const u8 rtl8225se_tx_power_cck_ch14[] = {
|
||||
0x18, 0x17, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1b, 0x1a, 0x17, 0x0e, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x1e, 0x1a, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x21, 0x1d, 0x11, 0x00, 0x00, 0x00, 0x00,
|
||||
0x26, 0x25, 0x21, 0x13, 0x00, 0x00, 0x00, 0x00,
|
||||
0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const u8 rtl8225se_tx_power_ofdm[] = {
|
||||
0x80, 0x90, 0xa2, 0xb5, 0xcb, 0xe4
|
||||
};
|
||||
|
||||
static const u32 rtl8225se_chan[] = {
|
||||
0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380,
|
||||
0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x074A,
|
||||
};
|
||||
|
||||
static const u8 rtl8225sez2_tx_power_cck_ch14[] = {
|
||||
0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const u8 rtl8225sez2_tx_power_cck_B[] = {
|
||||
0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x04
|
||||
};
|
||||
|
||||
static const u8 rtl8225sez2_tx_power_cck_A[] = {
|
||||
0x33, 0x32, 0x2b, 0x23, 0x1a, 0x11, 0x08, 0x04
|
||||
};
|
||||
|
||||
static const u8 rtl8225sez2_tx_power_cck[] = {
|
||||
0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04
|
||||
};
|
||||
|
||||
static const u8 ZEBRA_AGC[] = {
|
||||
0x7E, 0x7E, 0x7E, 0x7E, 0x7D, 0x7C, 0x7B, 0x7A,
|
||||
0x79, 0x78, 0x77, 0x76, 0x75, 0x74, 0x73, 0x72,
|
||||
|
||||
@@ -1255,7 +1255,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
|
||||
void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl8xxxu_priv *priv = hw->priv;
|
||||
u32 val32, rsr;
|
||||
u32 val32;
|
||||
u8 val8, subchannel;
|
||||
u16 rf_mode_bw;
|
||||
bool ht = true;
|
||||
@@ -1264,7 +1264,6 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
|
||||
|
||||
rf_mode_bw = rtl8xxxu_read16(priv, REG_WMAC_TRXPTCL_CTL);
|
||||
rf_mode_bw &= ~WMAC_TRXPTCL_CTL_BW_MASK;
|
||||
rsr = rtl8xxxu_read32(priv, REG_RESPONSE_RATE_SET);
|
||||
channel = hw->conf.chandef.chan->hw_value;
|
||||
|
||||
/* Hack */
|
||||
@@ -6481,7 +6480,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface,
|
||||
}
|
||||
break;
|
||||
case 0x7392:
|
||||
if (id->idProduct == 0x7811)
|
||||
if (id->idProduct == 0x7811 || id->idProduct == 0xa611)
|
||||
untested = 0;
|
||||
break;
|
||||
case 0x050d:
|
||||
@@ -6689,6 +6688,8 @@ static const struct usb_device_id dev_table[] = {
|
||||
.driver_info = (unsigned long)&rtl8192eu_fops},
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0xb720, 0xff, 0xff, 0xff),
|
||||
.driver_info = (unsigned long)&rtl8723bu_fops},
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xa611, 0xff, 0xff, 0xff),
|
||||
.driver_info = (unsigned long)&rtl8723bu_fops},
|
||||
#ifdef CONFIG_RTL8XXXU_UNTESTED
|
||||
/* Still supported by rtlwifi */
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x8176, 0xff, 0xff, 0xff),
|
||||
|
||||
@@ -1540,6 +1540,8 @@ static bool usb_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
* This is maybe necessary:
|
||||
* rtlpriv->cfg->ops->fill_tx_cmddesc(hw, buffer, 1, 1, skb);
|
||||
*/
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1176,6 +1176,7 @@ void rtl92de_enable_interrupt(struct ieee80211_hw *hw)
|
||||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
|
||||
rtlpci->irq_enabled = true;
|
||||
}
|
||||
|
||||
void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
||||
@@ -1185,7 +1186,7 @@ void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
||||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
|
||||
synchronize_irq(rtlpci->pdev->irq);
|
||||
rtlpci->irq_enabled = false;
|
||||
}
|
||||
|
||||
static void _rtl92de_poweroff_adapter(struct ieee80211_hw *hw)
|
||||
@@ -1351,7 +1352,7 @@ void rtl92de_set_beacon_related_registers(struct ieee80211_hw *hw)
|
||||
|
||||
bcn_interval = mac->beacon_interval;
|
||||
atim_window = 2;
|
||||
/*rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_ATIMWND, atim_window);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
rtl_write_word(rtlpriv, REG_BCNTCFG, 0x660f);
|
||||
@@ -1371,9 +1372,9 @@ void rtl92de_set_beacon_interval(struct ieee80211_hw *hw)
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
|
||||
"beacon_interval:%d\n", bcn_interval);
|
||||
/* rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
/* rtl92de_enable_interrupt(hw); */
|
||||
rtl92de_enable_interrupt(hw);
|
||||
}
|
||||
|
||||
void rtl92de_update_interrupt_mask(struct ieee80211_hw *hw,
|
||||
|
||||
@@ -216,6 +216,7 @@ static struct rtl_hal_ops rtl8192de_hal_ops = {
|
||||
.led_control = rtl92de_led_control,
|
||||
.set_desc = rtl92de_set_desc,
|
||||
.get_desc = rtl92de_get_desc,
|
||||
.is_tx_desc_closed = rtl92de_is_tx_desc_closed,
|
||||
.tx_polling = rtl92de_tx_polling,
|
||||
.enable_hw_sec = rtl92de_enable_hw_security_config,
|
||||
.set_key = rtl92de_set_key,
|
||||
|
||||
@@ -804,13 +804,15 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
|
||||
switch (desc_name) {
|
||||
case HW_DESC_OWN:
|
||||
ret = GET_RX_DESC_OWN(pdesc);
|
||||
ret = GET_RX_DESC_OWN(p_desc);
|
||||
break;
|
||||
case HW_DESC_RXPKT_LEN:
|
||||
ret = GET_RX_DESC_PKT_LEN(pdesc);
|
||||
ret = GET_RX_DESC_PKT_LEN(p_desc);
|
||||
break;
|
||||
case HW_DESC_RXBUFF_ADDR:
|
||||
ret = GET_RX_DESC_BUFF_ADDR(p_desc);
|
||||
break;
|
||||
default:
|
||||
WARN_ONCE(true, "rtl8192de: ERR rxdesc :%d not processed\n",
|
||||
@@ -821,6 +823,23 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||
u8 hw_queue, u16 index)
|
||||
{
|
||||
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
|
||||
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
|
||||
u8 *entry = (u8 *)(&ring->desc[ring->idx]);
|
||||
u8 own = (u8)rtl92de_get_desc(hw, entry, true, HW_DESC_OWN);
|
||||
|
||||
/* a beacon packet will only use the first
|
||||
* descriptor by defaut, and the own bit may not
|
||||
* be cleared by the hardware
|
||||
*/
|
||||
if (own)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
@@ -715,6 +715,8 @@ void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
||||
u8 desc_name, u8 *val);
|
||||
u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
u8 *p_desc, bool istx, u8 desc_name);
|
||||
bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||
u8 hw_queue, u16 index);
|
||||
void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
|
||||
void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
|
||||
bool b_firstseg, bool b_lastseg,
|
||||
|
||||
@@ -1024,8 +1024,11 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context)
|
||||
struct rtw_fw_state *fw = &rtwdev->fw;
|
||||
const struct rtw_fw_hdr *fw_hdr;
|
||||
|
||||
if (!firmware)
|
||||
if (!firmware || !firmware->data) {
|
||||
rtw_err(rtwdev, "failed to request firmware\n");
|
||||
complete_all(&fw->completion);
|
||||
return;
|
||||
}
|
||||
|
||||
fw_hdr = (const struct rtw_fw_hdr *)firmware->data;
|
||||
fw->h2c_version = le16_to_cpu(fw_hdr->h2c_fmt_ver);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user