aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_rx.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/wl12xx/wl1251_rx.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_rx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_rx.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_rx.c b/drivers/net/wireless/wl12xx/wl1251_rx.c
index 17c54b59ef86..6f229e0990f4 100644
--- a/drivers/net/wireless/wl12xx/wl1251_rx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_rx.c
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <linux/skbuff.h> 25#include <linux/skbuff.h>
26#include <linux/gfp.h>
26#include <net/mac80211.h> 27#include <net/mac80211.h>
27 28
28#include "wl1251.h" 29#include "wl1251.h"
@@ -72,10 +73,6 @@ static void wl1251_rx_status(struct wl1251 *wl,
72 } 73 }
73 74
74 status->signal = desc->rssi; 75 status->signal = desc->rssi;
75 status->qual = (desc->rssi - WL1251_RX_MIN_RSSI) * 100 /
76 (WL1251_RX_MAX_RSSI - WL1251_RX_MIN_RSSI);
77 status->qual = min(status->qual, 100);
78 status->qual = max(status->qual, 0);
79 76
80 /* 77 /*
81 * FIXME: guessing that snr needs to be divided by two, otherwise 78 * FIXME: guessing that snr needs to be divided by two, otherwise
@@ -130,7 +127,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
130 if (wl->rx_current_buffer) 127 if (wl->rx_current_buffer)
131 rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size; 128 rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size;
132 129
133 skb = dev_alloc_skb(length); 130 skb = __dev_alloc_skb(length, GFP_KERNEL);
134 if (!skb) { 131 if (!skb) {
135 wl1251_error("Couldn't allocate RX frame"); 132 wl1251_error("Couldn't allocate RX frame");
136 return; 133 return;
@@ -153,7 +150,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
153 beacon ? "beacon" : ""); 150 beacon ? "beacon" : "");
154 151
155 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); 152 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
156 ieee80211_rx(wl->hw, skb); 153 ieee80211_rx_ni(wl->hw, skb);
157} 154}
158 155
159static void wl1251_rx_ack(struct wl1251 *wl) 156static void wl1251_rx_ack(struct wl1251 *wl)