Use the kernel's definitions for snap protocol types

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Pull off crypto header/trailer before we really start processing packets

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Pull the crypto headers even earlier

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Fold SET_ICE_IV_LEN() into validate_recv_data_frame()

Ugly macro SET_ICE_IV_LEN() was only used in one place. Fold it into
the code and avoid obfuscating how iv_len/icv_len are being set.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Use the kernel's ieee80211_get_{DA,SA}() functions insead of custom hacks

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetMFrag()/GetToDs()/GetFrDs() with ieee80211 functions

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetRetry() with ieee80211_has_retry()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetPwrMgt() with ieee80211_has_pm()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetMData() with ieee80211_has_moredata()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetPrivacy() with ieee80211_has_protected()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Replace GetOrder() with ieee80211_has_order()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Use ieee80211 defines to obtain sequence and fragment number

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Complete converting validate_recv_frame() to use ieee80211 types

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Move debug code for packet dumping into seperate function()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Remove unused macros for clearing flags in the frame_control field

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Clean up parsing of qos header of incoming packets

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Calculate header length sanely

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
A couple minor cosmetic cleanups to validate_recv_data_frame()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Eliminate duplicate ieee80211_hdr structure defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Remove more unncessary defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>