aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/rx.c')
-rw-r--r--drivers/net/wireless/libertas/rx.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 8e669775cb5d..820c22d9220f 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -160,8 +160,15 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
160 160
161 p_rx_pkt = (struct rxpackethdr *) skb->data; 161 p_rx_pkt = (struct rxpackethdr *) skb->data;
162 p_rx_pd = &p_rx_pkt->rx_pd; 162 p_rx_pd = &p_rx_pkt->rx_pd;
163 if (priv->mesh_dev && (p_rx_pd->rx_control & RxPD_MESH_FRAME)) 163 if (priv->mesh_dev) {
164 dev = priv->mesh_dev; 164 if (priv->mesh_fw_ver == MESH_FW_OLD) {
165 if (p_rx_pd->rx_control & RxPD_MESH_FRAME)
166 dev = priv->mesh_dev;
167 } else if (priv->mesh_fw_ver == MESH_FW_NEW) {
168 if (p_rx_pd->u.bss.bss_num == MESH_IFACE_ID)
169 dev = priv->mesh_dev;
170 }
171 }
165 172
166 lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data, 173 lbs_deb_hex(LBS_DEB_RX, "RX Data: Before chop rxpd", skb->data,
167 min_t(unsigned int, skb->len, 100)); 174 min_t(unsigned int, skb->len, 100));
@@ -174,18 +181,6 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
174 goto done; 181 goto done;
175 } 182 }
176 183
177 /*
178 * Check rxpd status and update 802.3 stat,
179 */
180 if (!(p_rx_pd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) {
181 lbs_deb_rx("rx err: frame received with bad status\n");
182 lbs_pr_alert("rxpd not ok\n");
183 dev->stats.rx_errors++;
184 ret = 0;
185 dev_kfree_skb(skb);
186 goto done;
187 }
188
189 lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n", 184 lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
190 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); 185 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
191 186
@@ -334,14 +329,6 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
334 goto done; 329 goto done;
335 } 330 }
336 331
337 /*
338 * Check rxpd status and update 802.3 stat,
339 */
340 if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) {
341 //lbs_deb_rx("rx err: frame received with bad status\n");
342 dev->stats.rx_errors++;
343 }
344
345 lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n", 332 lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
346 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); 333 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
347 334
@@ -353,8 +340,6 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
353 radiotap_hdr.hdr.it_pad = 0; 340 radiotap_hdr.hdr.it_pad = 0;
354 radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr)); 341 radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr));
355 radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT); 342 radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT);
356 if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
357 radiotap_hdr.flags |= IEEE80211_RADIOTAP_F_BADFCS;
358 radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate); 343 radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);
359 /* XXX must check no carryout */ 344 /* XXX must check no carryout */
360 radiotap_hdr.antsignal = prxpd->snr + prxpd->nf; 345 radiotap_hdr.antsignal = prxpd->snr + prxpd->nf;