Changeset 1719

Show
Ignore:
Timestamp:
09/20/06 03:14:07 (2 years ago)
Author:
kelmo
Message:

In monitor mode, transmitted packets were not having their hardware
padding removed before being sent to ieee80211_input_monitor causing
the frames to appear invalid. This patch removes that padding.

Signed-off-by: Scott Raynel <scottraynel@gmail.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r1714 r1719  
    52435243        struct ath_softc *sc = dev->priv; 
    52445244        struct ieee80211com *ic = &sc->sc_ic; 
     5245        struct ieee80211_frame *wh; 
    52455246        int extra = A_MAX(sizeof(struct ath_tx_radiotap_header),  
    52465247                          A_MAX(sizeof(wlan_ng_prism2_header), ATHDESC_HEADER_SIZE)); 
     
    52615262                skb_orphan(skb); 
    52625263 
     5264        wh = (struct ieee80211_frame *) skb->data; 
     5265        if (IEEE80211_QOS_HAS_SEQ(wh)) { 
     5266                /* Unlike in rx_capture, we're freeing the skb at the end 
     5267                 * anyway, so we don't need to worry about using a copy */ 
     5268                int headersize = ieee80211_hdrsize(wh); 
     5269                int padbytes = roundup(headersize, 4) - headersize; 
     5270                if (padbytes > 0) { 
     5271                        memmove(skb->data + padbytes, skb->data, headersize); 
     5272                        skb_pull(skb, padbytes); 
     5273                } 
     5274        } 
     5275         
    52635276        if (skb_headroom(skb) < extra && 
    52645277            pskb_expand_head(skb, extra, 0, GFP_ATOMIC)) {