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_GET_TYPE(fc) >> 2, WLAN_FC_GET_STYPE(fc) >> 4,
fc & WLAN_FC_TODS ? " [ToDS]" : "",
fc & WLAN_FC_FROMDS ? " [FromDS]" : "");
}
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
skip_header_bytes -= 2;
}
- fc = (WLAN_FC_TYPE_DATA << 2) | (WLAN_FC_STYPE_DATA << 4);
+ fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA;
hdr_len = IEEE80211_DATA_HDR3_LEN;
if (use_wds != WDS_NO) {
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;
meta = (struct hostap_skb_tx_data *) skb->cb;
memset(meta, 0, sizeof(*meta));
meta->magic = HOSTAP_SKB_TX_DATA_MAGIC;
- meta->wds = use_wds;
+ if (use_wds)
+ meta->flags |= HOSTAP_TX_FLAGS_WDS;
meta->ethertype = ethertype;
meta->iface = iface;
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);
- if (HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA &&
- HOSTAP_FC_GET_STYPE(fc) == WLAN_FC_STYPE_DATA) {
+ hdr = (struct ieee80211_hdr *) skb->data;
+ fc = le16_to_cpu(hdr->frame_ctl);
+ if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA &&
+ WLAN_FC_GET_STYPE(fc) == IEEE80211_STYPE_DATA) {
u8 *pos = &skb->data[IEEE80211_DATA_HDR3_LEN +
sizeof(rfc1042_header)];
meta->ethertype = (pos[0] << 8) | pos[1];
/* Called only from software IRQ */
struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
- struct prism2_crypt_data *crypt)
+ struct ieee80211_crypt_data *crypt)
{
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;
case AP_TX_CONTINUE_NOT_AUTHORIZED:
if (local->ieee_802_1x &&
- HOSTAP_FC_GET_TYPE(fc) == WLAN_FC_TYPE_DATA &&
- meta->ethertype != ETH_P_PAE && !meta->wds) {
+ WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA &&
+ meta->ethertype != ETH_P_PAE &&
+ !(meta->flags & HOSTAP_TX_FLAGS_WDS)) {
printk(KERN_DEBUG "%s: dropped frame to unauthorized "
"port (IEEE 802.1X): ethertype=0x%04x\n",
dev->name, meta->ethertype);
/* 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) {
+ if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_DATA) {
no_encrypt = 1;
tx.crypt = NULL;
}
/* 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 &&
+ WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA &&
meta->ethertype != ETH_P_PAE) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: dropped unencrypted TX data "