diff options
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index fcf43bcae979..14438a642fdd 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -849,10 +849,11 @@ static struct sk_buff *p54_find_tx_entry(struct ieee80211_hw *dev, | |||
849 | __le32 req_id) | 849 | __le32 req_id) |
850 | { | 850 | { |
851 | struct p54_common *priv = dev->priv; | 851 | struct p54_common *priv = dev->priv; |
852 | struct sk_buff *entry = priv->tx_queue.next; | 852 | struct sk_buff *entry; |
853 | unsigned long flags; | 853 | unsigned long flags; |
854 | 854 | ||
855 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 855 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
856 | entry = priv->tx_queue.next; | ||
856 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 857 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
857 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; | 858 | struct p54_hdr *hdr = (struct p54_hdr *) entry->data; |
858 | 859 | ||
@@ -871,7 +872,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
871 | struct p54_common *priv = dev->priv; | 872 | struct p54_common *priv = dev->priv; |
872 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; | 873 | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; |
873 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; | 874 | struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; |
874 | struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next; | 875 | struct sk_buff *entry; |
875 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; | 876 | u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; |
876 | struct p54_tx_info *range = NULL; | 877 | struct p54_tx_info *range = NULL; |
877 | u32 freed = 0; | 878 | u32 freed = 0; |
@@ -880,6 +881,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
880 | int count, idx; | 881 | int count, idx; |
881 | 882 | ||
882 | spin_lock_irqsave(&priv->tx_queue.lock, flags); | 883 | spin_lock_irqsave(&priv->tx_queue.lock, flags); |
884 | entry = (struct sk_buff *) priv->tx_queue.next; | ||
883 | while (entry != (struct sk_buff *)&priv->tx_queue) { | 885 | while (entry != (struct sk_buff *)&priv->tx_queue) { |
884 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); | 886 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry); |
885 | struct p54_hdr *entry_hdr; | 887 | struct p54_hdr *entry_hdr; |
@@ -1122,7 +1124,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
1122 | struct p54_hdr *data, u32 len) | 1124 | struct p54_hdr *data, u32 len) |
1123 | { | 1125 | { |
1124 | struct p54_common *priv = dev->priv; | 1126 | struct p54_common *priv = dev->priv; |
1125 | struct sk_buff *entry = priv->tx_queue.next; | 1127 | struct sk_buff *entry; |
1126 | struct sk_buff *target_skb = NULL; | 1128 | struct sk_buff *target_skb = NULL; |
1127 | struct ieee80211_tx_info *info; | 1129 | struct ieee80211_tx_info *info; |
1128 | struct p54_tx_info *range; | 1130 | struct p54_tx_info *range; |
@@ -1160,6 +1162,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
1160 | } | 1162 | } |
1161 | } | 1163 | } |
1162 | 1164 | ||
1165 | entry = priv->tx_queue.next; | ||
1163 | while (left--) { | 1166 | while (left--) { |
1164 | u32 hole_size; | 1167 | u32 hole_size; |
1165 | info = IEEE80211_SKB_CB(entry); | 1168 | info = IEEE80211_SKB_CB(entry); |