Changeset 3632

Show
Ignore:
Timestamp:
05/16/08 16:07:50 (5 months ago)
Author:
benoit
Message:

Fixed a bug where packet injection was no longer working when DFS was enabled.
This can potentially breaks DFS implementation (it has to be tested again)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/branches/madwifi-dfs/README.dfs

    r3103 r3632  
    22 
    33Conformance testing to the following standards: 
    4 * ETSI 301 893 v1.3.1 
    5 * 802.11h 
     4* ETSI 301 893 v1.4.1 (dated 2007-07) 
     5* FCC 
     6* IEEE 802.11h-2003 (dated 2003-10-14) 
     7 
     8ETSI and FCC defines the regulation constraints and defines several roles : 
     9* "master" 
     10* "slave without radar detection" 
     11* "slave with radar detection" 
    612 
    713Frequencies & channels where DFS is applicable: 
     
    1925Simulating a radar detected event: 
    2026iwpriv wlan0 doth_radar 
     27 
     28== Notes on DFS in various modes == 
     29 
     30A VAP interface can be used in several modes: 
     31* IEEE80211_M_STA "sta"         : DFS is implemented as "slave" 
     32* IEEE80211_M_IBSS "adhoc"      : DFS is implemented as "master" 
     33* IEEE80211_M_AHDEMO "ahdemo"   : DFS is implemented as "master" 
     34* IEEE80211_M_HOSTAP "ap"       : DFS is implemented as "master" 
     35* IEEE80211_M_MONITOR "monitor" : DFS is not implemented 
     36* IEEE80211_M_WDS "wds"         : DFS is implemented as "master" 
     37 
  • madwifi/branches/madwifi-dfs/ath/if_ath.c

    r3582 r3632  
    32033203 
    32043204        if (!ath_dfs_can_transmit_csaie_dbgmsg(sc)) { 
    3205                 DPRINTF(sc, ATH_DEBUG_DOTH, 
     3205                /* This message spots errors in the driver, so it's printed 
     3206                 * whenever any debug options is enabled and it does not 
     3207                 * prevent from sending. This message is normal if you are 
     3208                 * doing packet injection, since it bypass DFS rules */ 
     3209                DPRINTF(sc, ATH_DEBUG_ANY, 
    32063210                        "%s: WE ARE SENDING PACKETS UNDER CAC!\n", __func__); 
    3207                 return; 
    32083211        } 
    32093212 
     
    36243627        STAILQ_INIT(&bf_head); 
    36253628 
     3629        /* We send injected packets before checking DFS rules. It means that 
     3630         * packet injection bypass DFS rules */ 
     3631        if (SKB_CB(skb)->flags & M_RAW) { 
     3632                bf = ath_take_txbuf(sc); 
     3633                if (bf == NULL) { 
     3634                        /* All DMA buffers full, safe to try again. */ 
     3635                        requeue = 1; 
     3636                        goto hardstart_fail; 
     3637                } 
     3638                ath_tx_startraw(dev, bf, skb); 
     3639                return NETDEV_TX_OK; 
     3640        } 
     3641 
    36263642        /* If we are under CAC or have detected a radar, we simply drop (and 
    3627          * free) frames. */ 
     3643         * free) frames. This check is done after processing injected 
     3644         * packets */ 
    36283645        if (!ath_dfs_can_transmit_dbgmsg(sc)) { 
    36293646                /* No need to print a warning or error messages here since we 
     
    36323649                 * dropped without exception. */ 
    36333650                goto hardstart_fail; 
    3634         } 
    3635  
    3636         if (SKB_CB(skb)->flags & M_RAW) { 
    3637                 bf = ath_take_txbuf(sc); 
    3638                 if (bf == NULL) { 
    3639                         /* All DMA buffers full, safe to try again. */ 
    3640                         requeue = 1; 
    3641                         goto hardstart_fail; 
    3642                 } 
    3643                 ath_tx_startraw(dev, bf, skb); 
    3644                 return NETDEV_TX_OK; 
    36453651        } 
    36463652