Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10258
b: refs/heads/master
c: d041674
h: refs/heads/master
v: v3
  • Loading branch information
James Ketrenos authored and Jeff Garzik committed Sep 22, 2005
1 parent 9c4f5d2 commit 245c0f7
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebeaddcc02fd47d1dbb7f25318d046461d90e4af
refs/heads/master: d041674d62e1ad565f2fb6d53ae80b31d6656033
40 changes: 20 additions & 20 deletions trunk/drivers/net/wireless/hostap/hostap_80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
struct hostap_80211_rx_status *rx_stats)
{
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
u16 fc;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;

printk(KERN_DEBUG "%s: RX signal=%d noise=%d rate=%d len=%d "
"jiffies=%ld\n",
Expand Down Expand Up @@ -51,7 +51,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
int hdrlen, phdrlen, head_need, tail_need;
u16 fc;
int prism_header, ret;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;

iface = netdev_priv(dev);
local = iface->local;
Expand All @@ -70,7 +70,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
phdrlen = 0;
}

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
fc = le16_to_cpu(hdr->frame_ctl);

if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) {
Expand Down Expand Up @@ -215,7 +215,7 @@ prism2_frag_cache_find(local_info_t *local, unsigned int seq,

/* Called only as a tasklet (software IRQ) */
static struct sk_buff *
prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr)
prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr_4addr *hdr)
{
struct sk_buff *skb = NULL;
u16 sc;
Expand All @@ -229,7 +229,7 @@ prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr)
if (frag == 0) {
/* Reserve enough space to fit maximum frame length */
skb = dev_alloc_skb(local->dev->mtu +
sizeof(struct ieee80211_hdr) +
sizeof(struct ieee80211_hdr_4addr) +
8 /* LLC */ +
2 /* alignment */ +
8 /* WEP */ + ETH_ALEN /* WDS */);
Expand Down Expand Up @@ -267,7 +267,7 @@ prism2_frag_cache_get(local_info_t *local, struct ieee80211_hdr *hdr)

/* Called only as a tasklet (software IRQ) */
static int prism2_frag_cache_invalidate(local_info_t *local,
struct ieee80211_hdr *hdr)
struct ieee80211_hdr_4addr *hdr)
{
u16 sc;
unsigned int seq;
Expand Down Expand Up @@ -441,7 +441,7 @@ hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb,
u16 stype)
{
if (local->iw_mode == IW_MODE_MASTER) {
hostap_update_sta_ps(local, (struct ieee80211_hdr *)
hostap_update_sta_ps(local, (struct ieee80211_hdr_4addr *)
skb->data);
}

Expand Down Expand Up @@ -520,7 +520,7 @@ static inline struct net_device *prism2_rx_get_wds(local_info_t *local,


static inline int
hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr,
hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
u16 fc, struct net_device **wds)
{
/* FIX: is this really supposed to accept WDS frames only in Master
Expand Down Expand Up @@ -579,13 +579,13 @@ static int hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb)
{
struct net_device *dev = local->dev;
u16 fc, ethertype;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
u8 *pos;

if (skb->len < 24)
return 0;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
fc = le16_to_cpu(hdr->frame_ctl);

/* check that the frame is unicast frame to us */
Expand Down Expand Up @@ -619,13 +619,13 @@ static inline int
hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
struct ieee80211_crypt_data *crypt)
{
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
int res, hdrlen;

if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));

if (local->tkip_countermeasures &&
Expand Down Expand Up @@ -658,13 +658,13 @@ static inline int
hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
int keyidx, struct ieee80211_crypt_data *crypt)
{
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
int res, hdrlen;

if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
return 0;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
hdrlen = hostap_80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));

atomic_inc(&crypt->refcnt);
Expand All @@ -689,7 +689,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
{
struct hostap_interface *iface;
local_info_t *local;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
size_t hdrlen;
u16 fc, type, stype, sc;
struct net_device *wds = NULL;
Expand All @@ -716,7 +716,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
dev = local->ddev;
iface = netdev_priv(dev);

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
stats = hostap_get_stats(dev);

if (skb->len < 10)
Expand Down Expand Up @@ -889,7 +889,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) &&
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
goto rx_dropped;
hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;

/* skb: hdr + (possibly fragmented) plaintext payload */

Expand Down Expand Up @@ -941,7 +941,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
/* this was the last fragment and the frame will be
* delivered, so remove skb from fragment cache */
skb = frag_skb;
hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
prism2_frag_cache_invalidate(local, hdr);
}

Expand All @@ -952,7 +952,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt))
goto rx_dropped;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !local->open_wep) {
if (local->ieee_802_1x &&
hostap_is_eapol_frame(local, skb)) {
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/net/wireless/hostap/hostap_80211_tx.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
u16 fc;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;

printk(KERN_DEBUG "%s: TX len=%d jiffies=%ld\n",
name, skb->len, jiffies);
Expand Down Expand Up @@ -41,7 +41,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct hostap_interface *iface;
local_info_t *local;
int need_headroom, need_tailroom = 0;
struct ieee80211_hdr hdr;
struct ieee80211_hdr_4addr hdr;
u16 fc, ethertype = 0;
enum {
WDS_NO = 0, WDS_OWN_FRAME, WDS_COMPLIANT_FRAME
Expand Down Expand Up @@ -244,7 +244,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct hostap_interface *iface;
local_info_t *local;
struct hostap_skb_tx_data *meta;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
u16 fc;

iface = netdev_priv(dev);
Expand All @@ -266,7 +266,7 @@ int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
meta->iface = iface;

if (skb->len >= IEEE80211_DATA_HDR3_LEN + sizeof(rfc1042_header) + 2) {
hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) 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) {
Expand All @@ -289,7 +289,7 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
{
struct hostap_interface *iface;
local_info_t *local;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;
u16 fc;
int hdr_len, res;

Expand All @@ -303,7 +303,7 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,

if (local->tkip_countermeasures &&
crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"TX packet to " MACSTR "\n",
Expand All @@ -325,7 +325,7 @@ struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
return NULL;
}

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
fc = le16_to_cpu(hdr->frame_ctl);
hdr_len = hostap_80211_get_hdrlen(fc);

Expand Down Expand Up @@ -360,7 +360,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
ap_tx_ret tx_ret;
struct hostap_skb_tx_data *meta;
int no_encrypt = 0;
struct ieee80211_hdr *hdr;
struct ieee80211_hdr_4addr *hdr;

iface = netdev_priv(dev);
local = iface->local;
Expand Down Expand Up @@ -403,7 +403,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_ret = hostap_handle_sta_tx(local, &tx);
skb = tx.skb;
meta = (struct hostap_skb_tx_data *) skb->cb;
hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr_4addr *) skb->data;
fc = le16_to_cpu(hdr->frame_ctl);
switch (tx_ret) {
case AP_TX_CONTINUE:
Expand Down
Loading

0 comments on commit 245c0f7

Please sign in to comment.