aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-06-11 17:21:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:12 -0400
commitfd7c8a40b2a63863f749e4d17f0d94d2e5ab1331 (patch)
tree098e07d68b4d1e7a6c02750db480204c0dd469d5 /drivers/net/wireless/iwlwifi/iwl-5000.c
parente36cfdc9b17fa64245ee6206287e5120e59bbfca (diff)
mac80211: add helpers for frame control testing
A few general categories: 1) ieee80211_has_* tests if particular fctl bits are set, the helpers are de in the same order as the fctl defines: A combined _has_a4 was also added to test when both FROMDS and TODS are set. 2) ieee80211_is_* is meant to test whether the frame control is of a certain ftype - data, mgmt, ctl, and two special helpers _is_data_qos, _is_data_pres which also test a subset of the stype space. When testing for a particular stype applicable only to one ftype, functions like ieee80211_is_ack have been added. Note that the ftype is also being checked in these helpers. They have been added for all mgmt and ctl stypes in the same order as the STYPE defines. 3) ieee80211_get_* is meant to take a struct ieee80211_hdr * and returns a pointer to somewhere in the struct, see get_SA, get_DA, get_qos_ctl. The intel wireless drivers had helpers that used this namespace, convert the all to use the new helpers and remove the byteshifting as they were defined in cpu-order rather than little-endian. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 8c466b02bdff..438c3812c390 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1252,7 +1252,6 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1252 struct iwl5000_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; 1252 struct iwl5000_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
1253 u32 status = le16_to_cpu(tx_resp->status.status); 1253 u32 status = le16_to_cpu(tx_resp->status.status);
1254 int tid = MAX_TID_COUNT, sta_id = IWL_INVALID_STATION; 1254 int tid = MAX_TID_COUNT, sta_id = IWL_INVALID_STATION;
1255 u16 fc;
1256 struct ieee80211_hdr *hdr; 1255 struct ieee80211_hdr *hdr;
1257 u8 *qc = NULL; 1256 u8 *qc = NULL;
1258 1257
@@ -1268,9 +1267,8 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1268 memset(&info->status, 0, sizeof(info->status)); 1267 memset(&info->status, 0, sizeof(info->status));
1269 1268
1270 hdr = iwl_tx_queue_get_hdr(priv, txq_id, index); 1269 hdr = iwl_tx_queue_get_hdr(priv, txq_id, index);
1271 fc = le16_to_cpu(hdr->frame_control); 1270 if (ieee80211_is_data_qos(hdr->frame_control)) {
1272 if (ieee80211_is_qos_data(fc)) { 1271 qc = ieee80211_get_qos_ctl(hdr);
1273 qc = ieee80211_get_qos_ctrl(hdr, ieee80211_get_hdrlen(fc));
1274 tid = qc[0] & 0xf; 1272 tid = qc[0] & 0xf;
1275 } 1273 }
1276 1274