Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159152
b: refs/heads/master
c: 436b37c
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jul 24, 2009
1 parent b410001 commit f669c7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46df10ae44b4488176bae16da0b31541eb0f8f48
refs/heads/master: 436b37c59416d0d8e21430f7980857fc932eb1e6
16 changes: 16 additions & 0 deletions trunk/drivers/net/wireless/p54/fwio.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ int p54_upload_key(struct p54_common *priv, u8 algo, int slot, u8 idx, u8 len,

int p54_fetch_statistics(struct p54_common *priv)
{
struct ieee80211_tx_info *txinfo;
struct p54_tx_info *p54info;
struct sk_buff *skb;

skb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL,
Expand All @@ -694,6 +696,20 @@ int p54_fetch_statistics(struct p54_common *priv)
if (!skb)
return -ENOMEM;

/*
* The statistic feedback causes some extra headaches here, if it
* is not to crash/corrupt the firmware data structures.
*
* Unlike all other Control Get OIDs we can not use helpers like
* skb_put to reserve the space for the data we're requesting.
* Instead the extra frame length -which will hold the results later-
* will only be told to the p54_assign_address, so that following
* frames won't be placed into the allegedly empty area.
*/
txinfo = IEEE80211_SKB_CB(skb);
p54info = (void *) txinfo->rate_driver_data;
p54info->extra_len = sizeof(struct p54_statistics);

p54_tx(priv, skb);
return 0;
}

0 comments on commit f669c7d

Please sign in to comment.