5 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
9 #include <linux/slab.h>
10 #include <linux/types.h>
11 #include <linux/export.h>
64 static const u8 rfc1042_eth_hdr[] = {
65 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
75 return process_rxed_802_11_packet(priv, skb);
87 lbs_deb_rx(
"rx err: frame received with bad length\n");
88 dev->
stats.rx_length_errors++;
94 lbs_deb_rx(
"rx data: skb->len - pkt_ptr = %d-%zd = %zd\n",
104 rfc1042_eth_hdr,
sizeof(rfc1042_eth_hdr)) == 0) {
115 p_ethhdr = (
struct ethhdr *)
125 sizeof(p_ethhdr->
h_dest));
130 hdrchop = (
u8 *)p_ethhdr - (
u8 *)p_rx_pd;
149 dev->
stats.rx_packets++;
171 static u8 convert_mv_rate_to_radiotap(
u8 rate)
200 pr_alert(
"Invalid Marvell WLAN rate %i\n", rate);
225 prxpd = &p_rx_pkt->
rx_pd;
230 lbs_deb_rx(
"rx err: frame received with bad length\n");
231 dev->
stats.rx_length_errors++;
237 lbs_deb_rx(
"rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
243 memset(&radiotap_hdr, 0,
sizeof(radiotap_hdr));
247 radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->
rx_rate);
249 radiotap_hdr.antsignal = prxpd->
snr + prxpd->
nf;
257 netdev_alert(dev,
"%s: couldn't pskb_expand_head\n", __func__);
270 dev->
stats.rx_packets++;