Skip to content

Commit

Permalink
p54: fix memory management
Browse files Browse the repository at this point in the history
We have to be careful if multiple "control frames" are passed in a very short intervals to
the device's firmware. As p54_assign_address always put them into same memory location.
To guarantee that this won't happen anymore, we have to treat control frames like normal
data frames in the devices own memory management.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Oct 31, 2008
1 parent 9de5776 commit b92f30d
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 163 deletions.
7 changes: 4 additions & 3 deletions drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ struct p54_common {
u32 rx_start;
u32 rx_end;
struct sk_buff_head tx_queue;
void (*tx)(struct ieee80211_hw *dev, struct p54_control_hdr *data,
size_t len, int free_on_tx);
void (*tx)(struct ieee80211_hw *dev, struct sk_buff *skb,
int free_on_tx);
int (*open)(struct ieee80211_hw *dev);
void (*stop)(struct ieee80211_hw *dev);
int mode;
Expand Down Expand Up @@ -102,13 +102,14 @@ struct p54_common {
struct ieee80211_low_level_stats stats;
struct timer_list stats_timer;
struct completion stats_comp;
void *cached_stats;
struct sk_buff *cached_stats;
int noise;
void *eeprom;
struct completion eeprom_comp;
};

int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb);
void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb);
int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw);
int p54_read_eeprom(struct ieee80211_hw *dev);
struct ieee80211_hw *p54_init_common(size_t priv_data_len);
Expand Down
Loading

0 comments on commit b92f30d

Please sign in to comment.