#ifndef HOSTAP_80211_H
#define HOSTAP_80211_H
-struct hostap_ieee80211_hdr {
- u16 frame_control;
- u16 duration_id;
- u8 addr1[6];
- u8 addr2[6];
- u8 addr3[6];
- u16 seq_ctrl;
- u8 addr4[6];
-} __attribute__ ((packed));
-
-
struct hostap_ieee80211_mgmt {
u16 frame_control;
u16 duration;
void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
{
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
printk(KERN_DEBUG "%s: RX signal=%d noise=%d rate=%d len=%d "
"jiffies=%ld\n",
if (skb->len < 2)
return;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
printk(KERN_DEBUG " FC=0x%04x (type=%d:%d)%s%s",
fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc),
fc & WLAN_FC_TODS ? " [ToDS]" : "",
}
printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
- le16_to_cpu(hdr->seq_ctrl));
+ le16_to_cpu(hdr->seq_ctl));
printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR,
MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), MAC2STR(hdr->addr3));
int hdrlen, phdrlen, head_need, tail_need;
u16 fc;
int prism_header, ret;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
iface = netdev_priv(dev);
local = iface->local;
phdrlen = 0;
}
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
if (type == PRISM2_RX_MGMT && (fc & WLAN_FC_PVER)) {
printk(KERN_DEBUG "%s: dropped management frame with header "
/* Called only as a tasklet (software IRQ) */
static struct sk_buff *
-prism2_frag_cache_get(local_info_t *local, struct hostap_ieee80211_hdr *hdr)
+prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr)
{
struct sk_buff *skb = NULL;
u16 sc;
unsigned int frag, seq;
struct prism2_frag_entry *entry;
- sc = le16_to_cpu(hdr->seq_ctrl);
+ sc = le16_to_cpu(hdr->seq_ctl);
frag = WLAN_GET_SEQ_FRAG(sc);
seq = WLAN_GET_SEQ_SEQ(sc) >> 4;
if (frag == 0) {
/* Reserve enough space to fit maximum frame length */
skb = dev_alloc_skb(local->dev->mtu +
- sizeof(struct hostap_ieee80211_hdr) +
+ sizeof(struct ieee80211_hdr) +
8 /* LLC */ +
2 /* alignment */ +
8 /* WEP */ + ETH_ALEN /* WDS */);
/* Called only as a tasklet (software IRQ) */
static int prism2_frag_cache_invalidate(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr)
+ struct ieee80211_hdr *hdr)
{
u16 sc;
unsigned int seq;
struct prism2_frag_entry *entry;
- sc = le16_to_cpu(hdr->seq_ctrl);
+ sc = le16_to_cpu(hdr->seq_ctl);
seq = WLAN_GET_SEQ_SEQ(sc) >> 4;
entry = prism2_frag_cache_find(local, seq, -1, hdr->addr2, hdr->addr1);
u16 stype)
{
if (local->iw_mode == IW_MODE_MASTER) {
- hostap_update_sta_ps(local, (struct hostap_ieee80211_hdr *)
+ hostap_update_sta_ps(local, (struct ieee80211_hdr *)
skb->data);
}
static inline int
-hostap_rx_frame_wds(local_info_t *local, struct hostap_ieee80211_hdr *hdr,
+hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr,
u16 fc, struct net_device **wds)
{
/* FIX: is this really supposed to accept WDS frames only in Master
{
struct net_device *dev = local->dev;
u16 fc, ethertype;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u8 *pos;
if (skb->len < 24)
return 0;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
/* check that the frame is unicast frame to us */
if ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) == WLAN_FC_TODS &&
hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
struct ieee80211_crypt_data *crypt)
{
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
int res, hdrlen;
if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_control));
+ hdr = (struct ieee80211_hdr *) skb->data;
+ hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
if (local->tkip_countermeasures &&
strcmp(crypt->ops->name, "TKIP") == 0) {
hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
int keyidx, struct ieee80211_crypt_data *crypt)
{
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
int res, hdrlen;
if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
return 0;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_control));
+ hdr = (struct ieee80211_hdr *) skb->data;
+ hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
atomic_inc(&crypt->refcnt);
res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv);
{
struct hostap_interface *iface;
local_info_t *local;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
size_t hdrlen;
u16 fc, type, stype, sc;
struct net_device *wds = NULL;
dev = local->ddev;
iface = netdev_priv(dev);
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
stats = hostap_get_stats(dev);
if (skb->len < 10)
goto rx_dropped;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
type = HOSTAP_FC_GET_TYPE(fc);
stype = HOSTAP_FC_GET_STYPE(fc);
- sc = le16_to_cpu(hdr->seq_ctrl);
+ sc = le16_to_cpu(hdr->seq_ctl);
frag = WLAN_GET_SEQ_FRAG(sc);
hdrlen = hostap_80211_get_hdrlen(fc);
if (local->host_decrypt && (fc & WLAN_FC_ISWEP) &&
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
goto rx_dropped;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
/* skb: hdr + (possibly fragmented) plaintext payload */
/* this was the last fragment and the frame will be
* delivered, so remove skb from fragment cache */
skb = frag_skb;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
prism2_frag_cache_invalidate(local, hdr);
}
hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt))
goto rx_dropped;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
if (crypt && !(fc & WLAN_FC_ISWEP) && !local->open_wep) {
if (local->ieee_802_1x &&
hostap_is_eapol_frame(local, skb)) {
void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
{
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
printk(KERN_DEBUG "%s: TX len=%d jiffies=%ld\n",
name, skb->len, jiffies);
if (skb->len < 2)
return;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
printk(KERN_DEBUG " FC=0x%04x (type=%d:%d)%s%s",
fc, HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc),
fc & WLAN_FC_TODS ? " [ToDS]" : "",
}
printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
- le16_to_cpu(hdr->seq_ctrl));
+ le16_to_cpu(hdr->seq_ctl));
printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR,
MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), MAC2STR(hdr->addr3));
struct hostap_interface *iface;
local_info_t *local;
int need_headroom, need_tailroom = 0;
- struct hostap_ieee80211_hdr hdr;
+ struct ieee80211_hdr hdr;
u16 fc, ethertype = 0;
enum {
WDS_NO = 0, WDS_OWN_FRAME, WDS_COMPLIANT_FRAME
memcpy(&hdr.addr3, local->bssid, ETH_ALEN);
}
- hdr.frame_control = cpu_to_le16(fc);
+ hdr.frame_ctl = cpu_to_le16(fc);
skb_pull(skb, skip_header_bytes);
need_headroom = local->func->need_tx_headroom + hdr_len + encaps_len;
struct hostap_interface *iface;
local_info_t *local;
struct hostap_skb_tx_data *meta;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc;
iface = netdev_priv(dev);
meta->iface = iface;
if (skb->len >= IEEE80211_DATA_HDR3_LEN + sizeof(rfc1042_header) + 2) {
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
if (HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA &&
HOSTAP_FC_GET_STYPE(fc) == WLAN_FC_STYPE_DATA) {
u8 *pos = &skb->data[IEEE80211_DATA_HDR3_LEN +
{
struct hostap_interface *iface;
local_info_t *local;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc;
int hdr_len, res;
if (local->tkip_countermeasures &&
crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"TX packet to " MACSTR "\n",
return NULL;
}
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
hdr_len = hostap_80211_get_hdrlen(fc);
/* Host-based IEEE 802.11 fragmentation for TX is not yet supported, so
ap_tx_ret tx_ret;
struct hostap_skb_tx_data *meta;
int no_encrypt = 0;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
iface = netdev_priv(dev);
local = iface->local;
tx_ret = hostap_handle_sta_tx(local, &tx);
skb = tx.skb;
meta = (struct hostap_skb_tx_data *) skb->cb;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
switch (tx_ret) {
case AP_TX_CONTINUE:
break;
/* remove special version from the frame header */
fc &= ~WLAN_FC_PVER;
- hdr->frame_control = cpu_to_le16(fc);
+ hdr->frame_ctl = cpu_to_le16(fc);
}
if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_DATA) {
/* Add ISWEP flag both for firmware and host based encryption
*/
fc |= WLAN_FC_ISWEP;
- hdr->frame_control = cpu_to_le16(fc);
+ hdr->frame_ctl = cpu_to_le16(fc);
} else if (local->drop_unencrypted &&
HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA &&
meta->ethertype != ETH_P_PAE) {
{
struct ap_data *ap = data;
u16 fc;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
if (!ap->local->hostapd || !ap->local->apdev) {
dev_kfree_skb(skb);
return;
}
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
/* Pass the TX callback frame to the hostapd; use 802.11 header version
* 1 to indicate failure (no ACK) and 2 success (frame ACKed) */
fc &= ~WLAN_FC_PVER;
fc |= ok ? BIT(1) : BIT(0);
- hdr->frame_control = cpu_to_le16(fc);
+ hdr->frame_ctl = cpu_to_le16(fc);
skb->dev = ap->local->apdev;
skb_pull(skb, hostap_80211_get_hdrlen(fc));
{
struct ap_data *ap = data;
struct net_device *dev = ap->local->dev;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc, *pos, auth_alg, auth_transaction, status;
struct sta_info *sta = NULL;
char *txt = NULL;
return;
}
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH ||
skb->len < IEEE80211_MGMT_HDR_LEN + 6) {
{
struct ap_data *ap = data;
struct net_device *dev = ap->local->dev;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc, *pos, status;
struct sta_info *sta = NULL;
char *txt = NULL;
return;
}
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||
(HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_ASSOC_RESP &&
HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_REASSOC_RESP) ||
static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
{
struct ap_data *ap = data;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
struct sta_info *sta;
if (skb->len < 24)
goto fail;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
if (ok) {
spin_lock(&ap->sta_table_lock);
sta = ap_get_sta(ap, hdr->addr1);
{
struct hostap_interface *iface;
local_info_t *local;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
u16 fc;
struct sk_buff *skb;
struct hostap_skb_tx_data *meta;
fc = (type << 2) | (subtype << 4);
hdrlen = hostap_80211_get_hdrlen(fc);
- hdr = (struct hostap_ieee80211_hdr *) skb_put(skb, hdrlen);
+ hdr = (struct ieee80211_hdr *) skb_put(skb, hdrlen);
if (body)
memcpy(skb_put(skb, body_len), body, body_len);
memcpy(hdr->addr3, dev->dev_addr, ETH_ALEN); /* BSSID */
}
- hdr->frame_control = cpu_to_le16(fc);
+ hdr->frame_ctl = cpu_to_le16(fc);
meta = (struct hostap_skb_tx_data *) skb->cb;
memset(meta, 0, sizeof(*meta));
struct hostap_80211_rx_status *rx_stats)
{
struct net_device *dev = local->dev;
- struct hostap_ieee80211_hdr *hdr =
- (struct hostap_ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
size_t hdrlen;
struct ap_data *ap = local->ap;
char body[8 + WLAN_AUTH_CHALLENGE_LEN], *challenge = NULL;
len = skb->len - IEEE80211_MGMT_HDR_LEN;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
hdrlen = hostap_80211_get_hdrlen(fc);
if (len < 6) {
struct hostap_80211_rx_status *rx_stats, int reassoc)
{
struct net_device *dev = local->dev;
- struct hostap_ieee80211_hdr *hdr =
- (struct hostap_ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
char body[12], *p, *lpos;
int len, left;
u16 *pos;
struct hostap_80211_rx_status *rx_stats)
{
struct net_device *dev = local->dev;
- struct hostap_ieee80211_hdr *hdr =
- (struct hostap_ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
char *body = (char *) (skb->data + IEEE80211_MGMT_HDR_LEN);
int len;
u16 reason_code, *pos;
struct hostap_80211_rx_status *rx_stats)
{
struct net_device *dev = local->dev;
- struct hostap_ieee80211_hdr *hdr =
- (struct hostap_ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
char *body = skb->data + IEEE80211_MGMT_HDR_LEN;
int len;
u16 reason_code, *pos;
/* Called only as a scheduled task for pending AP frames. */
static void ap_handle_data_nullfunc(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr)
+ struct ieee80211_hdr *hdr)
{
struct net_device *dev = local->dev;
/* Called only as a scheduled task for pending AP frames. */
static void ap_handle_dropped_data(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr)
+ struct ieee80211_hdr *hdr)
{
struct net_device *dev = local->dev;
struct sta_info *sta;
/* Called only as a scheduled task for pending AP frames. */
static void handle_pspoll(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr,
+ struct ieee80211_hdr *hdr,
struct hostap_80211_rx_status *rx_stats)
{
struct net_device *dev = local->dev;
PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MACSTR ", TA=" MACSTR
" PWRMGT=%d\n",
MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
- !!(le16_to_cpu(hdr->frame_control) & WLAN_FC_PWRMGT));
+ !!(le16_to_cpu(hdr->frame_ctl) & WLAN_FC_PWRMGT));
if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MACSTR
static void handle_beacon(local_info_t *local, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
{
- struct hostap_ieee80211_hdr *hdr =
- (struct hostap_ieee80211_hdr *) skb->data;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
char *body = skb->data + IEEE80211_MGMT_HDR_LEN;
int len, left;
u16 *pos, beacon_int, capability;
struct net_device *dev = local->dev;
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
u16 fc, type, stype;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
/* FIX: should give skb->len to handler functions and check that the
* buffer is long enough */
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
type = HOSTAP_FC_GET_TYPE(fc);
stype = HOSTAP_FC_GET_STYPE(fc);
struct hostap_interface *iface;
local_info_t *local;
u16 fc;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
iface = netdev_priv(dev);
local = iface->local;
local->stats.rx_packets++;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL &&
HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT &&
static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
{
struct sk_buff *skb;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
struct hostap_80211_rx_status rx_stats;
if (skb_queue_empty(&sta->tx_buf))
return;
}
- hdr = (struct hostap_ieee80211_hdr *) skb_put(skb, 16);
+ hdr = (struct ieee80211_hdr *) skb_put(skb, 16);
/* Generate a fake pspoll frame to start packet delivery */
- hdr->frame_control = __constant_cpu_to_le16(
+ hdr->frame_ctl = __constant_cpu_to_le16(
(WLAN_FC_TYPE_CTRL << 2) | (WLAN_FC_STYPE_PSPOLL << 4));
memcpy(hdr->addr1, local->dev->dev_addr, ETH_ALEN);
memcpy(hdr->addr2, sta->addr, ETH_ALEN);
struct sta_info *sta = NULL;
struct sk_buff *skb = tx->skb;
int set_tim, ret;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
struct hostap_skb_tx_data *meta;
meta = (struct hostap_skb_tx_data *) skb->cb;
meta->iface->type == HOSTAP_INTERFACE_STA)
goto out;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
if (hdr->addr1[0] & 0x01) {
/* broadcast/multicast frame - no AP related processing */
if (meta->flags & HOSTAP_TX_FLAGS_ADD_MOREDATA) {
/* indicate to STA that more frames follow */
- hdr->frame_control |= __constant_cpu_to_le16(WLAN_FC_MOREDATA);
+ hdr->frame_ctl |= __constant_cpu_to_le16(WLAN_FC_MOREDATA);
}
if (meta->flags & HOSTAP_TX_FLAGS_BUFFERED_FRAME) {
void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
{
struct sta_info *sta;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
struct hostap_skb_tx_data *meta;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
meta = (struct hostap_skb_tx_data *) skb->cb;
spin_lock(&local->ap->sta_table_lock);
/* Called only as a tasklet (software IRQ). Called for each RX frame to update
- * STA power saving state. pwrmgt is a flag from 802.11 frame_control field. */
-int hostap_update_sta_ps(local_info_t *local, struct hostap_ieee80211_hdr *hdr)
+ * STA power saving state. pwrmgt is a flag from 802.11 frame_ctl field. */
+int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr *hdr)
{
struct sta_info *sta;
u16 fc;
if (!sta)
return -1;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
hostap_update_sta_ps2(local, sta, fc & WLAN_FC_PWRMGT,
HOSTAP_FC_GET_TYPE(fc), HOSTAP_FC_GET_STYPE(fc));
int ret;
struct sta_info *sta;
u16 fc, type, stype;
- struct hostap_ieee80211_hdr *hdr;
+ struct ieee80211_hdr *hdr;
if (local->ap == NULL)
return AP_RX_CONTINUE;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
+ hdr = (struct ieee80211_hdr *) skb->data;
- fc = le16_to_cpu(hdr->frame_control);
+ fc = le16_to_cpu(hdr->frame_ctl);
type = HOSTAP_FC_GET_TYPE(fc);
stype = HOSTAP_FC_GET_STYPE(fc);
/* Called only as a tasklet (software IRQ) */
int hostap_handle_sta_crypto(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr,
+ struct ieee80211_hdr *hdr,
struct ieee80211_crypt_data **crypt,
void **sta_ptr)
{
/* Called only as a tasklet (software IRQ) */
int hostap_update_rx_stats(struct ap_data *ap,
- struct hostap_ieee80211_hdr *hdr,
+ struct ieee80211_hdr *hdr,
struct hostap_80211_rx_status *rx_stats)
{
struct sta_info *sta;
ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx);
void hostap_handle_sta_release(void *ptr);
void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb);
-int hostap_update_sta_ps(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr);
+int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr *hdr);
typedef enum {
AP_RX_CONTINUE, AP_RX_DROP, AP_RX_EXIT, AP_RX_CONTINUE_NOT_AUTHORIZED
} ap_rx_ret;
struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats,
int wds);
-int hostap_handle_sta_crypto(local_info_t *local,
- struct hostap_ieee80211_hdr *hdr,
+int hostap_handle_sta_crypto(local_info_t *local, struct ieee80211_hdr *hdr,
struct ieee80211_crypt_data **crypt,
void **sta_ptr);
int hostap_is_sta_assoc(struct ap_data *ap, u8 *sta_addr);
int hostap_is_sta_authorized(struct ap_data *ap, u8 *sta_addr);
int hostap_add_sta(struct ap_data *ap, u8 *sta_addr);
-int hostap_update_rx_stats(struct ap_data *ap,
- struct hostap_ieee80211_hdr *hdr,
+int hostap_update_rx_stats(struct ap_data *ap, struct ieee80211_hdr *hdr,
struct hostap_80211_rx_status *rx_stats);
void hostap_update_rates(local_info_t *local);
void hostap_add_wds_links(local_info_t *local);
struct hostap_interface *iface;
local_info_t *local;
struct hfa384x_tx_frame txdesc;
- struct hostap_ieee80211_hdr *hdr;
struct hostap_skb_tx_data *meta;
int hdr_len, data_len, idx, res, ret = -1;
u16 tx_control, fc;
local = iface->local;
meta = (struct hostap_skb_tx_data *) skb->cb;
- hdr = (struct hostap_ieee80211_hdr *) skb->data;
prism2_callback(local, PRISM2_CALLBACK_TX_START);