Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103160
b: refs/heads/master
c: ac10446
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Jun 26, 2008
1 parent 1a0ba53 commit 55100b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 40 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: e800f17c6ffe8b0410d8cf060ab204b93e9c73ab
refs/heads/master: ac1044628d477d655f5f70420c3493119abeb6d3
27 changes: 0 additions & 27 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,6 @@
#define SHORT_DIFS ( SHORT_PIFS + SHORT_SLOT_TIME )
#define EIFS ( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) )

/*
* IEEE802.11 header defines
*/
static inline int is_rts_frame(u16 fc)
{
return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_RTS));
}

static inline int is_cts_frame(u16 fc)
{
return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_CTS));
}

static inline int is_probe_resp(u16 fc)
{
return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP));
}

static inline int is_beacon(u16 fc)
{
return (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON));
}

/*
* Chipset identification
* The chipset on the device is composed of a RT and RF chip.
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
unsigned int align;
unsigned int i;
int idx = -1;
u16 fc;

/*
* The data behind the ieee80211 header must be
Expand Down Expand Up @@ -606,8 +605,8 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
* Only update link status if this is a beacon frame carrying our bssid.
*/
hdr = (struct ieee80211_hdr *)entry->skb->data;
fc = le16_to_cpu(hdr->frame_control);
if (is_beacon(fc) && (rxdesc->dev_flags & RXDONE_MY_BSS))
if (ieee80211_is_beacon(hdr->frame_control) &&
(rxdesc->dev_flags & RXDONE_MY_BSS))
rt2x00lib_update_link_stats(&rt2x00dev->link, rxdesc->rssi);

rt2x00dev->link.qual.rx_success++;
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
unsigned int data_length;
unsigned int duration;
unsigned int residual;
u16 frame_control;

memset(txdesc, 0, sizeof(*txdesc));

Expand All @@ -95,11 +94,6 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
/* Data length should be extended with 4 bytes for CRC */
data_length = entry->skb->len + 4;

/*
* Read required fields from ieee80211 header.
*/
frame_control = le16_to_cpu(hdr->frame_control);

/*
* Check whether this frame is to be acked.
*/
Expand All @@ -109,9 +103,10 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
/*
* Check if this is a RTS/CTS frame
*/
if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) {
if (ieee80211_is_rts(hdr->frame_control) ||
ieee80211_is_cts(hdr->frame_control)) {
__set_bit(ENTRY_TXD_BURST, &txdesc->flags);
if (is_rts_frame(frame_control))
if (ieee80211_is_rts(hdr->frame_control))
__set_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags);
else
__set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags);
Expand Down Expand Up @@ -139,7 +134,8 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
* Beacons and probe responses require the tsf timestamp
* to be inserted into the frame.
*/
if (txdesc->queue == QID_BEACON || is_probe_resp(frame_control))
if (ieee80211_is_beacon(hdr->frame_control) ||
ieee80211_is_probe_resp(hdr->frame_control))
__set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags);

/*
Expand Down

0 comments on commit 55100b2

Please sign in to comment.