diff options
Diffstat (limited to 'drivers/net/wireless/libertas/rx.c')
-rw-r--r-- | drivers/net/wireless/libertas/rx.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index a2b1df21d286..fdb0448301a0 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -1,6 +1,9 @@ | |||
1 | /** | 1 | /* |
2 | * This file contains the handling of RX in wlan driver. | 2 | * This file contains the handling of RX in wlan driver. |
3 | */ | 3 | */ |
4 | |||
5 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
6 | |||
4 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
5 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
6 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -40,12 +43,12 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, | |||
40 | struct sk_buff *skb); | 43 | struct sk_buff *skb); |
41 | 44 | ||
42 | /** | 45 | /** |
43 | * @brief This function processes received packet and forwards it | 46 | * lbs_process_rxed_packet - processes received packet and forwards it |
44 | * to kernel/upper layer | 47 | * to kernel/upper layer |
45 | * | 48 | * |
46 | * @param priv A pointer to struct lbs_private | 49 | * @priv: A pointer to &struct lbs_private |
47 | * @param skb A pointer to skb which includes the received packet | 50 | * @skb: A pointer to skb which includes the received packet |
48 | * @return 0 or -1 | 51 | * returns: 0 or -1 |
49 | */ | 52 | */ |
50 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) | 53 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) |
51 | { | 54 | { |
@@ -156,11 +159,11 @@ done: | |||
156 | EXPORT_SYMBOL_GPL(lbs_process_rxed_packet); | 159 | EXPORT_SYMBOL_GPL(lbs_process_rxed_packet); |
157 | 160 | ||
158 | /** | 161 | /** |
159 | * @brief This function converts Tx/Rx rates from the Marvell WLAN format | 162 | * convert_mv_rate_to_radiotap - converts Tx/Rx rates from Marvell WLAN format |
160 | * (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s) | 163 | * (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s) |
161 | * | 164 | * |
162 | * @param rate Input rate | 165 | * @rate: Input rate |
163 | * @return Output Rate (0 if invalid) | 166 | * returns: Output Rate (0 if invalid) |
164 | */ | 167 | */ |
165 | static u8 convert_mv_rate_to_radiotap(u8 rate) | 168 | static u8 convert_mv_rate_to_radiotap(u8 rate) |
166 | { | 169 | { |
@@ -191,17 +194,17 @@ static u8 convert_mv_rate_to_radiotap(u8 rate) | |||
191 | case 12: /* 54 Mbps */ | 194 | case 12: /* 54 Mbps */ |
192 | return 108; | 195 | return 108; |
193 | } | 196 | } |
194 | lbs_pr_alert("Invalid Marvell WLAN rate %i\n", rate); | 197 | pr_alert("Invalid Marvell WLAN rate %i\n", rate); |
195 | return 0; | 198 | return 0; |
196 | } | 199 | } |
197 | 200 | ||
198 | /** | 201 | /** |
199 | * @brief This function processes a received 802.11 packet and forwards it | 202 | * process_rxed_802_11_packet - processes a received 802.11 packet and forwards |
200 | * to kernel/upper layer | 203 | * it to kernel/upper layer |
201 | * | 204 | * |
202 | * @param priv A pointer to struct lbs_private | 205 | * @priv: A pointer to &struct lbs_private |
203 | * @param skb A pointer to skb which includes the received packet | 206 | * @skb: A pointer to skb which includes the received packet |
204 | * @return 0 or -1 | 207 | * returns: 0 or -1 |
205 | */ | 208 | */ |
206 | static int process_rxed_802_11_packet(struct lbs_private *priv, | 209 | static int process_rxed_802_11_packet(struct lbs_private *priv, |
207 | struct sk_buff *skb) | 210 | struct sk_buff *skb) |
@@ -248,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, | |||
248 | /* add space for the new radio header */ | 251 | /* add space for the new radio header */ |
249 | if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) && | 252 | if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) && |
250 | pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) { | 253 | pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) { |
251 | lbs_pr_alert("%s: couldn't pskb_expand_head\n", __func__); | 254 | netdev_alert(dev, "%s: couldn't pskb_expand_head\n", __func__); |
252 | ret = -ENOMEM; | 255 | ret = -ENOMEM; |
253 | kfree_skb(skb); | 256 | kfree_skb(skb); |
254 | goto done; | 257 | goto done; |