/*
* Copyright 2002-2005, Instant802 Networks, Inc.
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
#include "ieee80211_i.h"
#include "ieee80211_led.h"
#include "ieee80211_common.h"
#include "wep.h"
#include "wpa.h"
#include "tkip.h"
#include "wme.h"
/* pre-rx handlers
*
* these don't have dev/sdata fields in the rx data
* The sta value should also not be used because it may
* be NULL even though a STA (in IBSS mode) will be added.
*/
static ieee80211_txrx_result
ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx)
{
u8 *data = rx->skb->data;
int tid;
/* does the frame have a qos control field? */
if (WLAN_FC_IS_QOS_DATA(rx->fc)) {
u8 *qc = data + ieee80211_get_hdrlen(rx->fc) - QOS_CONTROL_LEN;
/* frame has qos control */
tid = qc[0] & QOS_CONTROL_TID_MASK;
} else {
if (unlikely((rx->fc & IEEE80211_FCTL_FTYPE) == I