]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
mac80211: add helpers for frame control testing
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 11 Jun 2008 21:21:56 +0000 (14:21 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 14 Jun 2008 16:18:12 +0000 (12:18 -0400)
commitfd7c8a40b2a63863f749e4d17f0d94d2e5ab1331
tree098e07d68b4d1e7a6c02750db480204c0dd469d5
parente36cfdc9b17fa64245ee6206287e5120e59bbfca
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>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-4965-rs.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-helpers.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
include/linux/ieee80211.h