aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-07 08:11:51 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-16 10:38:09 -0400
commit2c2def10d03554c0f8ed02f5b5a2a8526958f6a3 (patch)
treee6685e5406bf927235dfcd931af0622667ecc985 /drivers
parent47365ab858a7f452e79437d1a44488245e903f37 (diff)
iwlagn: simplify TX flags assignments
The first assignment of TX_CMD_FLG_SEQ_CTL_MSK for ack-expected mgmt frames is overwritten later in the function, so it's useless. Also, probe response frames, BACK request and others there are mutually exclusive so can be moved into an else branch. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index f306824157e..554750d993e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -364,19 +364,15 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
364 __le32 tx_flags = tx_cmd->tx_flags; 364 __le32 tx_flags = tx_cmd->tx_flags;
365 365
366 tx_cmd->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 366 tx_cmd->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
367 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { 367
368 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
368 tx_flags |= TX_CMD_FLG_ACK_MSK; 369 tx_flags |= TX_CMD_FLG_ACK_MSK;
369 if (ieee80211_is_mgmt(fc)) 370 else
370 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK; 371 tx_flags &= ~TX_CMD_FLG_ACK_MSK;
371 if (ieee80211_is_probe_resp(fc) &&
372 !(le16_to_cpu(hdr->seq_ctrl) & 0xf))
373 tx_flags |= TX_CMD_FLG_TSF_MSK;
374 } else {
375 tx_flags &= (~TX_CMD_FLG_ACK_MSK);
376 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
377 }
378 372
379 if (ieee80211_is_back_req(fc)) 373 if (ieee80211_is_probe_resp(fc))
374 tx_flags |= TX_CMD_FLG_TSF_MSK;
375 else if (ieee80211_is_back_req(fc))
380 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; 376 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK;
381 else if (info->band == IEEE80211_BAND_2GHZ && 377 else if (info->band == IEEE80211_BAND_2GHZ &&
382 priv->cfg->bt_params && 378 priv->cfg->bt_params &&