Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134127
b: refs/heads/master
c: 3cd08b3
h: refs/heads/master
i:
  134125: ade9b3f
  134123: 1646bf2
  134119: d40e0c6
  134111: 7556deb
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jan 29, 2009
1 parent 839babb commit d8441a0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 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: 63f2dc9f2fd63c8b66f49c53cd26236f3f0785fd
refs/heads/master: 3cd08b383b2efe163272045afc415c75afc9e9c5
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ enum p54_control_frame_types {
P54_CONTROL_TYPE_BT_OPTIONS = 35
};

/* provide 16 bytes for the transport back-end */
#define P54_TX_INFO_DATA_SIZE 16

/* stored in ieee80211_tx_info's rate_driver_data */
struct p54_tx_info {
u32 start_addr;
u32 end_addr;
void *data[P54_TX_INFO_DATA_SIZE / sizeof(void *)];
};

#define P54_MAX_CTRL_FRAME_LEN 0x1000

#define P54_HDR_FLAG_CONTROL BIT(15)
Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
{
struct p54_common *priv = dev->priv;
struct ieee80211_tx_info *info;
struct memrecord *range;
struct p54_tx_info *range;
unsigned long flags;
u32 freed = 0, last_addr = priv->rx_start;

Expand All @@ -718,18 +718,18 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
range = (void *)info->rate_driver_data;
if (skb->prev != (struct sk_buff *)&priv->tx_queue) {
struct ieee80211_tx_info *ni;
struct memrecord *mr;
struct p54_tx_info *mr;

ni = IEEE80211_SKB_CB(skb->prev);
mr = (struct memrecord *)ni->rate_driver_data;
mr = (struct p54_tx_info *)ni->rate_driver_data;
last_addr = mr->end_addr;
}
if (skb->next != (struct sk_buff *)&priv->tx_queue) {
struct ieee80211_tx_info *ni;
struct memrecord *mr;
struct p54_tx_info *mr;

ni = IEEE80211_SKB_CB(skb->next);
mr = (struct memrecord *)ni->rate_driver_data;
mr = (struct p54_tx_info *)ni->rate_driver_data;
freed = mr->start_addr - last_addr;
} else
freed = priv->rx_end - last_addr;
Expand Down Expand Up @@ -771,7 +771,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data;
struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next;
u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom;
struct memrecord *range = NULL;
struct p54_tx_info *range = NULL;
u32 freed = 0;
u32 last_addr = priv->rx_start;
unsigned long flags;
Expand All @@ -793,10 +793,10 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)

if (entry->next != (struct sk_buff *)&priv->tx_queue) {
struct ieee80211_tx_info *ni;
struct memrecord *mr;
struct p54_tx_info *mr;

ni = IEEE80211_SKB_CB(entry->next);
mr = (struct memrecord *)ni->rate_driver_data;
mr = (struct p54_tx_info *)ni->rate_driver_data;
freed = mr->start_addr - last_addr;
} else
freed = priv->rx_end - last_addr;
Expand Down Expand Up @@ -1013,8 +1013,8 @@ EXPORT_SYMBOL_GPL(p54_rx);
* can find some unused memory to upload our packets to. However, data that we
* want the card to TX needs to stay intact until the card has told us that
* it is done with it. This function finds empty places we can upload to and
* marks allocated areas as reserved if necessary. p54_rx_frame_sent frees
* allocated areas.
* marks allocated areas as reserved if necessary. p54_rx_frame_sent or
* p54_free_skb frees allocated areas.
*/
static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
struct p54_hdr *data, u32 len)
Expand All @@ -1023,7 +1023,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
struct sk_buff *entry = priv->tx_queue.next;
struct sk_buff *target_skb = NULL;
struct ieee80211_tx_info *info;
struct memrecord *range;
struct p54_tx_info *range;
u32 last_addr = priv->rx_start;
u32 largest_hole = 0;
u32 target_addr = priv->rx_start;
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/net/wireless/p54/p54common.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ struct pda_country {
#define PDR_COUNTRY_CERT_IODOOR_OUTDOOR 0x30
#define PDR_COUNTRY_CERT_INDEX 0x0F

/* stored in skb->cb */
struct memrecord {
u32 start_addr;
u32 end_addr;
};

struct p54_eeprom_lm86 {
union {
struct {
Expand Down

0 comments on commit d8441a0

Please sign in to comment.