Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor conflict in mlx5 because changes happened to code that has moved meanwhile. Signed-off-by: David S. Miller <davem@davemloft.net>
Este cometimento está contido em:
@@ -154,5 +154,6 @@
|
||||
#define IWL_MVM_D3_DEBUG false
|
||||
#define IWL_MVM_USE_TWT false
|
||||
#define IWL_MVM_AMPDU_CONSEC_DROPS_DELBA 10
|
||||
#define IWL_MVM_USE_NSSN_SYNC 0
|
||||
|
||||
#endif /* __MVM_CONSTANTS_H */
|
||||
|
@@ -841,9 +841,13 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mvm->fwrt.ppag_table.enabled) {
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"PPAG not enabled, command not sent.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
|
||||
IWL_DEBUG_RADIO(mvm, "PPAG is %s\n",
|
||||
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++) {
|
||||
|
@@ -256,7 +256,8 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
|
||||
__le32_to_cpu(resp->n_channels),
|
||||
resp->channels,
|
||||
__le16_to_cpu(resp->mcc),
|
||||
__le16_to_cpu(resp->geo_info));
|
||||
__le16_to_cpu(resp->geo_info),
|
||||
__le16_to_cpu(resp->cap));
|
||||
/* Store the return source id */
|
||||
src_id = resp->source_id;
|
||||
kfree(resp);
|
||||
@@ -754,6 +755,20 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
if (likely(sta)) {
|
||||
if (likely(iwl_mvm_tx_skb_sta(mvm, skb, sta) == 0))
|
||||
return;
|
||||
} else {
|
||||
if (likely(iwl_mvm_tx_skb_non_sta(mvm, skb) == 0))
|
||||
return;
|
||||
}
|
||||
|
||||
ieee80211_free_txskb(mvm->hw, skb);
|
||||
}
|
||||
|
||||
static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_tx_control *control,
|
||||
struct sk_buff *skb)
|
||||
@@ -797,14 +812,7 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
|
||||
}
|
||||
}
|
||||
|
||||
if (sta) {
|
||||
if (iwl_mvm_tx_skb(mvm, skb, sta))
|
||||
goto drop;
|
||||
return;
|
||||
}
|
||||
|
||||
if (iwl_mvm_tx_skb_non_sta(mvm, skb))
|
||||
goto drop;
|
||||
iwl_mvm_tx_skb(mvm, skb, sta);
|
||||
return;
|
||||
drop:
|
||||
ieee80211_free_txskb(hw, skb);
|
||||
@@ -854,10 +862,7 @@ void iwl_mvm_mac_itxq_xmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!txq->sta)
|
||||
iwl_mvm_tx_skb_non_sta(mvm, skb);
|
||||
else
|
||||
iwl_mvm_tx_skb(mvm, skb, txq->sta);
|
||||
iwl_mvm_tx_skb(mvm, skb, txq->sta);
|
||||
}
|
||||
} while (atomic_dec_return(&mvmtxq->tx_request));
|
||||
rcu_read_unlock();
|
||||
@@ -4771,6 +4776,125 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo)
|
||||
{
|
||||
switch (rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK) {
|
||||
case RATE_MCS_CHAN_WIDTH_20:
|
||||
rinfo->bw = RATE_INFO_BW_20;
|
||||
break;
|
||||
case RATE_MCS_CHAN_WIDTH_40:
|
||||
rinfo->bw = RATE_INFO_BW_40;
|
||||
break;
|
||||
case RATE_MCS_CHAN_WIDTH_80:
|
||||
rinfo->bw = RATE_INFO_BW_80;
|
||||
break;
|
||||
case RATE_MCS_CHAN_WIDTH_160:
|
||||
rinfo->bw = RATE_INFO_BW_160;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rate_n_flags & RATE_MCS_HT_MSK) {
|
||||
rinfo->flags |= RATE_INFO_FLAGS_MCS;
|
||||
rinfo->mcs = u32_get_bits(rate_n_flags, RATE_HT_MCS_INDEX_MSK);
|
||||
rinfo->nss = u32_get_bits(rate_n_flags,
|
||||
RATE_HT_MCS_NSS_MSK) + 1;
|
||||
if (rate_n_flags & RATE_MCS_SGI_MSK)
|
||||
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (rate_n_flags & RATE_MCS_VHT_MSK) {
|
||||
rinfo->flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
rinfo->mcs = u32_get_bits(rate_n_flags,
|
||||
RATE_VHT_MCS_RATE_CODE_MSK);
|
||||
rinfo->nss = u32_get_bits(rate_n_flags,
|
||||
RATE_VHT_MCS_NSS_MSK) + 1;
|
||||
if (rate_n_flags & RATE_MCS_SGI_MSK)
|
||||
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
|
||||
} else if (rate_n_flags & RATE_MCS_HE_MSK) {
|
||||
u32 gi_ltf = u32_get_bits(rate_n_flags,
|
||||
RATE_MCS_HE_GI_LTF_MSK);
|
||||
|
||||
rinfo->flags |= RATE_INFO_FLAGS_HE_MCS;
|
||||
rinfo->mcs = u32_get_bits(rate_n_flags,
|
||||
RATE_VHT_MCS_RATE_CODE_MSK);
|
||||
rinfo->nss = u32_get_bits(rate_n_flags,
|
||||
RATE_VHT_MCS_NSS_MSK) + 1;
|
||||
|
||||
if (rate_n_flags & RATE_MCS_HE_106T_MSK) {
|
||||
rinfo->bw = RATE_INFO_BW_HE_RU;
|
||||
rinfo->he_ru_alloc = NL80211_RATE_INFO_HE_RU_ALLOC_106;
|
||||
}
|
||||
|
||||
switch (rate_n_flags & RATE_MCS_HE_TYPE_MSK) {
|
||||
case RATE_MCS_HE_TYPE_SU:
|
||||
case RATE_MCS_HE_TYPE_EXT_SU:
|
||||
if (gi_ltf == 0 || gi_ltf == 1)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
else if (gi_ltf == 2)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
else if (rate_n_flags & RATE_MCS_SGI_MSK)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
else
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
break;
|
||||
case RATE_MCS_HE_TYPE_MU:
|
||||
if (gi_ltf == 0 || gi_ltf == 1)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_0_8;
|
||||
else if (gi_ltf == 2)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
else
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
break;
|
||||
case RATE_MCS_HE_TYPE_TRIG:
|
||||
if (gi_ltf == 0 || gi_ltf == 1)
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_1_6;
|
||||
else
|
||||
rinfo->he_gi = NL80211_RATE_INFO_HE_GI_3_2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rate_n_flags & RATE_HE_DUAL_CARRIER_MODE_MSK)
|
||||
rinfo->he_dcm = 1;
|
||||
} else {
|
||||
switch (u32_get_bits(rate_n_flags, RATE_LEGACY_RATE_MSK)) {
|
||||
case IWL_RATE_1M_PLCP:
|
||||
rinfo->legacy = 10;
|
||||
break;
|
||||
case IWL_RATE_2M_PLCP:
|
||||
rinfo->legacy = 20;
|
||||
break;
|
||||
case IWL_RATE_5M_PLCP:
|
||||
rinfo->legacy = 55;
|
||||
break;
|
||||
case IWL_RATE_11M_PLCP:
|
||||
rinfo->legacy = 110;
|
||||
break;
|
||||
case IWL_RATE_6M_PLCP:
|
||||
rinfo->legacy = 60;
|
||||
break;
|
||||
case IWL_RATE_9M_PLCP:
|
||||
rinfo->legacy = 90;
|
||||
break;
|
||||
case IWL_RATE_12M_PLCP:
|
||||
rinfo->legacy = 120;
|
||||
break;
|
||||
case IWL_RATE_18M_PLCP:
|
||||
rinfo->legacy = 180;
|
||||
break;
|
||||
case IWL_RATE_24M_PLCP:
|
||||
rinfo->legacy = 240;
|
||||
break;
|
||||
case IWL_RATE_36M_PLCP:
|
||||
rinfo->legacy = 360;
|
||||
break;
|
||||
case IWL_RATE_48M_PLCP:
|
||||
rinfo->legacy = 480;
|
||||
break;
|
||||
case IWL_RATE_54M_PLCP:
|
||||
rinfo->legacy = 540;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
@@ -4785,6 +4909,13 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
|
||||
}
|
||||
|
||||
if (iwl_mvm_has_tlc_offload(mvm)) {
|
||||
struct iwl_lq_sta_rs_fw *lq_sta = &mvmsta->lq_sta.rs_fw;
|
||||
|
||||
iwl_mvm_set_sta_rate(lq_sta->last_rate_n_flags, &sinfo->txrate);
|
||||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
|
||||
}
|
||||
|
||||
/* if beacon filtering isn't on mac80211 does it anyway */
|
||||
if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER))
|
||||
return;
|
||||
|
@@ -1298,9 +1298,6 @@ static inline bool iwl_mvm_is_lar_supported(struct iwl_mvm *mvm)
|
||||
bool tlv_lar = fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_LAR_SUPPORT);
|
||||
|
||||
if (iwlwifi_mod_params.lar_disable)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Enable LAR only if it is supported by the FW (TLV) &&
|
||||
* enabled in the NVM
|
||||
@@ -1508,8 +1505,8 @@ int __must_check iwl_mvm_send_cmd_status(struct iwl_mvm *mvm,
|
||||
int __must_check iwl_mvm_send_cmd_pdu_status(struct iwl_mvm *mvm, u32 id,
|
||||
u16 len, const void *data,
|
||||
u32 *status);
|
||||
int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta);
|
||||
int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta);
|
||||
int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb);
|
||||
void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct iwl_tx_cmd *tx_cmd,
|
||||
|
@@ -277,11 +277,10 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm)
|
||||
struct iwl_nvm_section *sections = mvm->nvm_sections;
|
||||
const __be16 *hw;
|
||||
const __le16 *sw, *calib, *regulatory, *mac_override, *phy_sku;
|
||||
bool lar_enabled;
|
||||
int regulatory_type;
|
||||
|
||||
/* Checking for required sections */
|
||||
if (mvm->trans->cfg->nvm_type != IWL_NVM_EXT) {
|
||||
if (mvm->trans->cfg->nvm_type == IWL_NVM) {
|
||||
if (!mvm->nvm_sections[NVM_SECTION_TYPE_SW].data ||
|
||||
!mvm->nvm_sections[mvm->cfg->nvm_hw_section_num].data) {
|
||||
IWL_ERR(mvm, "Can't parse empty OTP/NVM sections\n");
|
||||
@@ -327,14 +326,9 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm)
|
||||
(const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY_SDP].data :
|
||||
(const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data;
|
||||
|
||||
lar_enabled = !iwlwifi_mod_params.lar_disable &&
|
||||
fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_LAR_SUPPORT);
|
||||
|
||||
return iwl_parse_nvm_data(mvm->trans, mvm->cfg, hw, sw, calib,
|
||||
return iwl_parse_nvm_data(mvm->trans, mvm->cfg, mvm->fw, hw, sw, calib,
|
||||
regulatory, mac_override, phy_sku,
|
||||
mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant,
|
||||
lar_enabled);
|
||||
mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant);
|
||||
}
|
||||
|
||||
/* Loads the NVM data stored in mvm->nvm_sections into the NIC */
|
||||
|
@@ -514,14 +514,17 @@ static bool iwl_mvm_is_sn_less(u16 sn1, u16 sn2, u16 buffer_size)
|
||||
|
||||
static void iwl_mvm_sync_nssn(struct iwl_mvm *mvm, u8 baid, u16 nssn)
|
||||
{
|
||||
struct iwl_mvm_rss_sync_notif notif = {
|
||||
.metadata.type = IWL_MVM_RXQ_NSSN_SYNC,
|
||||
.metadata.sync = 0,
|
||||
.nssn_sync.baid = baid,
|
||||
.nssn_sync.nssn = nssn,
|
||||
};
|
||||
if (IWL_MVM_USE_NSSN_SYNC) {
|
||||
struct iwl_mvm_rss_sync_notif notif = {
|
||||
.metadata.type = IWL_MVM_RXQ_NSSN_SYNC,
|
||||
.metadata.sync = 0,
|
||||
.nssn_sync.baid = baid,
|
||||
.nssn_sync.nssn = nssn,
|
||||
};
|
||||
|
||||
iwl_mvm_sync_rx_queues_internal(mvm, (void *)¬if, sizeof(notif));
|
||||
iwl_mvm_sync_rx_queues_internal(mvm, (void *)¬if,
|
||||
sizeof(notif));
|
||||
}
|
||||
}
|
||||
|
||||
#define RX_REORDER_BUF_TIMEOUT_MQ (HZ / 10)
|
||||
|
@@ -1213,7 +1213,7 @@ static int iwl_mvm_legacy_config_scan(struct iwl_mvm *mvm)
|
||||
cmd_size = sizeof(struct iwl_scan_config_v2);
|
||||
else
|
||||
cmd_size = sizeof(struct iwl_scan_config_v1);
|
||||
cmd_size += num_channels;
|
||||
cmd_size += mvm->fw->ucode_capa.n_scan_channels;
|
||||
|
||||
cfg = kzalloc(cmd_size, GFP_KERNEL);
|
||||
if (!cfg)
|
||||
|
@@ -490,13 +490,13 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
|
||||
/*
|
||||
* Allocates and sets the Tx cmd the driver data pointers in the skb
|
||||
*/
|
||||
static struct iwl_device_cmd *
|
||||
static struct iwl_device_tx_cmd *
|
||||
iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_tx_info *info, int hdrlen,
|
||||
struct ieee80211_sta *sta, u8 sta_id)
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct iwl_device_cmd *dev_cmd;
|
||||
struct iwl_device_tx_cmd *dev_cmd;
|
||||
struct iwl_tx_cmd *tx_cmd;
|
||||
|
||||
dev_cmd = iwl_trans_alloc_tx_cmd(mvm->trans);
|
||||
@@ -504,11 +504,6 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
if (unlikely(!dev_cmd))
|
||||
return NULL;
|
||||
|
||||
/* Make sure we zero enough of dev_cmd */
|
||||
BUILD_BUG_ON(sizeof(struct iwl_tx_cmd_gen2) > sizeof(*tx_cmd));
|
||||
BUILD_BUG_ON(sizeof(struct iwl_tx_cmd_gen3) > sizeof(*tx_cmd));
|
||||
|
||||
memset(dev_cmd, 0, sizeof(dev_cmd->hdr) + sizeof(*tx_cmd));
|
||||
dev_cmd->hdr.cmd = TX_CMD;
|
||||
|
||||
if (iwl_mvm_has_new_tx_api(mvm)) {
|
||||
@@ -597,7 +592,7 @@ out:
|
||||
}
|
||||
|
||||
static void iwl_mvm_skb_prepare_status(struct sk_buff *skb,
|
||||
struct iwl_device_cmd *cmd)
|
||||
struct iwl_device_tx_cmd *cmd)
|
||||
{
|
||||
struct ieee80211_tx_info *skb_info = IEEE80211_SKB_CB(skb);
|
||||
|
||||
@@ -716,7 +711,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct ieee80211_tx_info info;
|
||||
struct iwl_device_cmd *dev_cmd;
|
||||
struct iwl_device_tx_cmd *dev_cmd;
|
||||
u8 sta_id;
|
||||
int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
__le16 fc = hdr->frame_control;
|
||||
@@ -1073,7 +1068,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct iwl_mvm_sta *mvmsta;
|
||||
struct iwl_device_cmd *dev_cmd;
|
||||
struct iwl_device_tx_cmd *dev_cmd;
|
||||
__le16 fc;
|
||||
u16 seq_number = 0;
|
||||
u8 tid = IWL_MAX_TID_COUNT;
|
||||
@@ -1149,7 +1144,7 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
if (WARN_ONCE(txq_id == IWL_MVM_INVALID_QUEUE, "Invalid TXQ id")) {
|
||||
iwl_trans_free_tx_cmd(mvm->trans, dev_cmd);
|
||||
spin_unlock(&mvmsta->lock);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!iwl_mvm_has_new_tx_api(mvm)) {
|
||||
@@ -1201,8 +1196,8 @@ drop:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta)
|
||||
int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||
struct ieee80211_tx_info info;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador