Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=180be755aec37483337f64bfca3d4b02f5c8fef4
Commit:     180be755aec37483337f64bfca3d4b02f5c8fef4
Parent:     2eb188a1c57ae79283cee951c317bd191cf1ca56
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 10 00:05:37 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:06:31 2008 -0800

    libertas: remove unreachable code from process_rxed_802_11_packet()
    
    The function is only ever called if we're in rtap mode. So the bit in it
    which is conditional on rtap mode seems a little superfluous.
    
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/rx.c |   75 +++++++++++++++--------------------
 1 files changed, 32 insertions(+), 43 deletions(-)

diff --git a/drivers/net/wireless/libertas/rx.c 
b/drivers/net/wireless/libertas/rx.c
index 58e8311..90a2199 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -355,52 +355,41 @@ static int process_rxed_802_11_packet(struct lbs_private 
*priv,
               skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
 
        /* create the exported radio header */
-       if (priv->monitormode == LBS_MONITOR_OFF) {
-               /* no radio header */
-               /* chop the rxpd */
-               skb_pull(skb, sizeof(struct rxpd));
-       }
 
-       else {
-               /* radiotap header */
-               radiotap_hdr.hdr.it_version = 0;
-               /* XXX must check this value for pad */
-               radiotap_hdr.hdr.it_pad = 0;
-               radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct 
rx_radiotap_hdr));
-               radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT);
-               /* unknown values */
-               radiotap_hdr.flags = 0;
-               radiotap_hdr.chan_freq = 0;
-               radiotap_hdr.chan_flags = 0;
-               radiotap_hdr.antenna = 0;
-               /* known values */
-               radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);
-               /* XXX must check no carryout */
-               radiotap_hdr.antsignal = prxpd->snr + prxpd->nf;
-               radiotap_hdr.rx_flags = 0;
-               if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
-                       radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS;
-               //memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 
18);
-
-               /* chop the rxpd */
-               skb_pull(skb, sizeof(struct rxpd));
-
-               /* add space for the new radio header */
-               if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
-                   pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0,
-                                    GFP_ATOMIC)) {
-                       lbs_pr_alert("%s: couldn't pskb_expand_head\n",
-                              __func__);
-               }
-
-               pradiotap_hdr =
-                   (struct rx_radiotap_hdr *)skb_push(skb,
-                                                    sizeof(struct
-                                                           rx_radiotap_hdr));
-               memcpy(pradiotap_hdr, &radiotap_hdr,
-                      sizeof(struct rx_radiotap_hdr));
+       /* radiotap header */
+       radiotap_hdr.hdr.it_version = 0;
+       /* XXX must check this value for pad */
+       radiotap_hdr.hdr.it_pad = 0;
+       radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr));
+       radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT);
+       /* unknown values */
+       radiotap_hdr.flags = 0;
+       radiotap_hdr.chan_freq = 0;
+       radiotap_hdr.chan_flags = 0;
+       radiotap_hdr.antenna = 0;
+       /* known values */
+       radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);
+       /* XXX must check no carryout */
+       radiotap_hdr.antsignal = prxpd->snr + prxpd->nf;
+       radiotap_hdr.rx_flags = 0;
+       if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
+               radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS;
+       //memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18);
+
+       /* chop the rxpd */
+       skb_pull(skb, sizeof(struct rxpd));
+
+       /* add space for the new radio header */
+       if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
+           pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0,
+                            GFP_ATOMIC)) {
+               lbs_pr_alert("%s: couldn't pskb_expand_head\n",
+                            __func__);
        }
 
+       pradiotap_hdr = (void *)skb_push(skb, sizeof(struct rx_radiotap_hdr));
+       memcpy(pradiotap_hdr, &radiotap_hdr, sizeof(struct rx_radiotap_hdr));
+
        /* Take the data rate from the rxpd structure
         * only if the rate is auto
         */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to