diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_rx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_rx.c | 9 |
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 | ||
159 | static void wl1251_rx_ack(struct wl1251 *wl) | 156 | static void wl1251_rx_ack(struct wl1251 *wl) |