* A fix for scan that fixes a firmware assertion

* A fix that improves roaming behavior. Same fix has been tested for
   a while in iwldvm. This is a bit of a work around, but the real fix
   should be in mac80211 and will come later.
 * A fix for BARs that avoids a WARNING.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUtMJGAAoJEC0Llv5uNjIBqoYP/iH29kX1NpmdGRIt3KEASCQn
 mr/JBR4MVBlx4UQJhXQBQnUYmDOzZ1CvQISnVheHZCfZFvbuxEGxh8CxgSmMTEhR
 2BmByuAxDma2XCxla9OIZJCkQt+eu9Wsdy5AcOkkBmnbuNFMWIFILamMAyGBFXwo
 ZAw9b+c+YsywtEYGSiZF07OXGUIs2oLWPQ7iHJLkTAlOQfKG5QSlQ+DB3BqI9kf8
 x8lM7ZuiSEyJkwV7MJogd7NpDUKtbu+mb7KUdvGYffknyakYh5pVN/0aUAnL8Xhj
 zdWQV8v7CjaHP68mliktdD03KXVi609XIV+oKzB4PBJCQDjoYAIqabYY7FuO3iSj
 4a+8lh3O9InkQclOJNzNAJFQlHVs1EbeiWVddLe7X1RyRofO6BgyOxj/G3gnWpQI
 KKRWS4EQyQrXehyygmEVUMMl2Mv4URQoQ0eyWKlkjNnLGjzinuTXAezFcjEhjY/f
 W7XCRACf0w+eLtXKd3etn3T+uGzaKHs8EhapGl6psYjUKMaGLBDvtT8Wie8qkvHM
 JJpxHGyE5nn2i4tdTQWQ5gg1fj8LfFXljcRu1MVq4zzjcqOP4mbLO+yfDFX2iDFQ
 ez2Oy+3IvjJ8Sw4D1y/5/dYmEXDTbkyjb+eBmYxG1ui62RViJUdbmVGwpLsucowT
 qGKlBtY3eEcHSYsEcBV/
 =9GPb
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-for-kalle-2015-01-13' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

* A fix for scan that fixes a firmware assertion
* A fix that improves roaming behavior. Same fix has been tested for
  a while in iwldvm. This is a bit of a work around, but the real fix
  should be in mac80211 and will come later.
* A fix for BARs that avoids a WARNING.
This commit is contained in:
Kalle Valo 2015-01-15 14:06:07 +02:00
commit 781f51d4c2
5 changed files with 59 additions and 27 deletions

View File

@ -246,6 +246,7 @@ enum iwl_ucode_tlv_flag {
* @IWL_UCODE_TLV_API_BASIC_DWELL: use only basic dwell time in scan command, * @IWL_UCODE_TLV_API_BASIC_DWELL: use only basic dwell time in scan command,
* regardless of the band or the number of the probes. FW will calculate * regardless of the band or the number of the probes. FW will calculate
* the actual dwell time. * the actual dwell time.
* @IWL_UCODE_TLV_API_SINGLE_SCAN_EBS: EBS is supported for single scans too.
*/ */
enum iwl_ucode_tlv_api { enum iwl_ucode_tlv_api {
IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID = BIT(0), IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID = BIT(0),
@ -257,6 +258,7 @@ enum iwl_ucode_tlv_api {
IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF = BIT(7), IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF = BIT(7),
IWL_UCODE_TLV_API_FRAGMENTED_SCAN = BIT(8), IWL_UCODE_TLV_API_FRAGMENTED_SCAN = BIT(8),
IWL_UCODE_TLV_API_BASIC_DWELL = BIT(13), IWL_UCODE_TLV_API_BASIC_DWELL = BIT(13),
IWL_UCODE_TLV_API_SINGLE_SCAN_EBS = BIT(16),
}; };
/** /**

View File

@ -653,8 +653,11 @@ enum iwl_scan_channel_flags {
}; };
/* iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S /* iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
* @flags: enum iwl_scan_channel_flgs * @flags: enum iwl_scan_channel_flags
* @non_ebs_ratio: how many regular scan iteration before EBS * @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
* involved.
* 1 - EBS is disabled.
* 2 - every second scan will be full scan(and so on).
*/ */
struct iwl_scan_channel_opt { struct iwl_scan_channel_opt {
__le16 flags; __le16 flags;

View File

@ -3343,18 +3343,16 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
msk |= mvmsta->tfd_queue_msk; msk |= mvmsta->tfd_queue_msk;
} }
if (drop) { msk &= ~BIT(vif->hw_queue[IEEE80211_AC_VO]);
if (iwl_mvm_flush_tx_path(mvm, msk, true))
IWL_ERR(mvm, "flush request fail\n");
mutex_unlock(&mvm->mutex);
} else {
mutex_unlock(&mvm->mutex);
/* this can take a while, and we may need/want other operations if (iwl_mvm_flush_tx_path(mvm, msk, true))
* to succeed while doing this, so do it without the mutex held IWL_ERR(mvm, "flush request fail\n");
*/ mutex_unlock(&mvm->mutex);
iwl_trans_wait_tx_queue_empty(mvm->trans, msk);
} /* this can take a while, and we may need/want other operations
* to succeed while doing this, so do it without the mutex held
*/
iwl_trans_wait_tx_queue_empty(mvm->trans, msk);
} }
const struct ieee80211_ops iwl_mvm_hw_ops = { const struct ieee80211_ops iwl_mvm_hw_ops = {

View File

@ -72,6 +72,8 @@
#define IWL_PLCP_QUIET_THRESH 1 #define IWL_PLCP_QUIET_THRESH 1
#define IWL_ACTIVE_QUIET_TIME 10 #define IWL_ACTIVE_QUIET_TIME 10
#define IWL_DENSE_EBS_SCAN_RATIO 5
#define IWL_SPARSE_EBS_SCAN_RATIO 1
struct iwl_mvm_scan_params { struct iwl_mvm_scan_params {
u32 max_out_time; u32 max_out_time;
@ -1297,18 +1299,6 @@ iwl_mvm_build_generic_unified_scan_cmd(struct iwl_mvm *mvm,
cmd->scan_prio = cpu_to_le32(IWL_SCAN_PRIORITY_HIGH); cmd->scan_prio = cpu_to_le32(IWL_SCAN_PRIORITY_HIGH);
cmd->iter_num = cpu_to_le32(1); cmd->iter_num = cpu_to_le32(1);
if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_EBS_SUPPORT &&
mvm->last_ebs_successful) {
cmd->channel_opt[0].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
cmd->channel_opt[1].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
}
if (iwl_mvm_rrm_scan_needed(mvm)) if (iwl_mvm_rrm_scan_needed(mvm))
cmd->scan_flags |= cmd->scan_flags |=
cpu_to_le32(IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED); cpu_to_le32(IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED);
@ -1383,6 +1373,22 @@ int iwl_mvm_unified_scan_lmac(struct iwl_mvm *mvm,
cmd->schedule[1].iterations = 0; cmd->schedule[1].iterations = 0;
cmd->schedule[1].full_scan_mul = 0; cmd->schedule[1].full_scan_mul = 0;
if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_SINGLE_SCAN_EBS &&
mvm->last_ebs_successful) {
cmd->channel_opt[0].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
cmd->channel_opt[0].non_ebs_ratio =
cpu_to_le16(IWL_DENSE_EBS_SCAN_RATIO);
cmd->channel_opt[1].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
cmd->channel_opt[1].non_ebs_ratio =
cpu_to_le16(IWL_SPARSE_EBS_SCAN_RATIO);
}
for (i = 1; i <= req->req.n_ssids; i++) for (i = 1; i <= req->req.n_ssids; i++)
ssid_bitmap |= BIT(i); ssid_bitmap |= BIT(i);
@ -1483,6 +1489,22 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm,
cmd->schedule[1].iterations = 0xff; cmd->schedule[1].iterations = 0xff;
cmd->schedule[1].full_scan_mul = IWL_FULL_SCAN_MULTIPLIER; cmd->schedule[1].full_scan_mul = IWL_FULL_SCAN_MULTIPLIER;
if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_EBS_SUPPORT &&
mvm->last_ebs_successful) {
cmd->channel_opt[0].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
cmd->channel_opt[0].non_ebs_ratio =
cpu_to_le16(IWL_DENSE_EBS_SCAN_RATIO);
cmd->channel_opt[1].flags =
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD);
cmd->channel_opt[1].non_ebs_ratio =
cpu_to_le16(IWL_SPARSE_EBS_SCAN_RATIO);
}
iwl_mvm_lmac_scan_cfg_channels(mvm, req->channels, req->n_channels, iwl_mvm_lmac_scan_cfg_channels(mvm, req->channels, req->n_channels,
ssid_bitmap, cmd); ssid_bitmap, cmd);

View File

@ -90,8 +90,6 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
if (ieee80211_is_probe_resp(fc)) if (ieee80211_is_probe_resp(fc))
tx_flags |= TX_CMD_FLG_TSF; tx_flags |= TX_CMD_FLG_TSF;
else if (ieee80211_is_back_req(fc))
tx_flags |= TX_CMD_FLG_ACK | TX_CMD_FLG_BAR;
if (ieee80211_has_morefrags(fc)) if (ieee80211_has_morefrags(fc))
tx_flags |= TX_CMD_FLG_MORE_FRAG; tx_flags |= TX_CMD_FLG_MORE_FRAG;
@ -100,6 +98,15 @@ void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
u8 *qc = ieee80211_get_qos_ctl(hdr); u8 *qc = ieee80211_get_qos_ctl(hdr);
tx_cmd->tid_tspec = qc[0] & 0xf; tx_cmd->tid_tspec = qc[0] & 0xf;
tx_flags &= ~TX_CMD_FLG_SEQ_CTL; tx_flags &= ~TX_CMD_FLG_SEQ_CTL;
} else if (ieee80211_is_back_req(fc)) {
struct ieee80211_bar *bar = (void *)skb->data;
u16 control = le16_to_cpu(bar->control);
tx_flags |= TX_CMD_FLG_ACK | TX_CMD_FLG_BAR;
tx_cmd->tid_tspec = (control &
IEEE80211_BAR_CTRL_TID_INFO_MASK) >>
IEEE80211_BAR_CTRL_TID_INFO_SHIFT;
WARN_ON_ONCE(tx_cmd->tid_tspec >= IWL_MAX_TID_COUNT);
} else { } else {
tx_cmd->tid_tspec = IWL_TID_NON_QOS; tx_cmd->tid_tspec = IWL_TID_NON_QOS;
if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)