Changeset 13521


Ignore:
Timestamp:
2008-12-04T22:57:17+01:00 (8 years ago)
Author:
nbd
Message:

madwifi: fix division by zero

Location:
trunk/package/madwifi/patches
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/madwifi/patches/389-autochannel.patch

    r13520 r13521  
    1717        sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan); 
    1818        if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) { 
    19 @@ -2913,6 +2915,37 @@ ath_hw_check_atim(struct ath_softc *sc,  
     19@@ -2913,6 +2915,40 @@ ath_hw_check_atim(struct ath_softc *sc,  
    2020 } 
    2121  
     
    3939+       rx = OS_REG_READ(ah, AR5K_RXCLEAR); 
    4040+       cc = OS_REG_READ(ah, AR5K_CYCLES); 
     41+       if (!cc) 
     42+               return; 
     43+ 
    4144+       if (rx > cc) 
    4245+               return; /* wraparound */ 
     
    5558  * Reset the hardware w/o losing operational state.  This is 
    5659  * basically a more efficient way of doing ath_stop, ath_init, 
    57 @@ -2939,6 +2972,7 @@ ath_reset(struct net_device *dev) 
     60@@ -2939,6 +2975,7 @@ ath_reset(struct net_device *dev) 
    5861         * Convert to a HAL channel description with the flags 
    5962         * constrained to reflect the current operating mode. 
     
    6366        sc->sc_curchan.channel = c->ic_freq; 
    6467        sc->sc_curchan.channelFlags = ath_chan2flags(c); 
    65 @@ -9019,6 +9053,7 @@ ath_chan_set(struct ath_softc *sc, struc 
     68@@ -9019,6 +9056,7 @@ ath_chan_set(struct ath_softc *sc, struc 
    6669        u_int8_t channel_change_required = 0; 
    6770        struct timeval tv; 
  • trunk/package/madwifi/patches/406-monitor_r3711.patch

    r13520 r13521  
    11--- a/ath/if_ath.c 
    22+++ b/ath/if_ath.c 
    3 @@ -6507,7 +6507,7 @@ ath_capture(struct net_device *dev, cons 
     3@@ -6510,7 +6510,7 @@ ath_capture(struct net_device *dev, cons 
    44  
    55        /* Never copy the SKB, as it is ours on the RX side, and this is the  
     
    1010                DPRINTF(sc, ATH_DEBUG_ANY, 
    1111                        "Dropping; ath_skb_removepad failed!\n"); 
    12 @@ -6515,6 +6515,8 @@ ath_capture(struct net_device *dev, cons 
     12@@ -6518,6 +6518,8 @@ ath_capture(struct net_device *dev, cons 
    1313        } 
    1414         
  • trunk/package/madwifi/patches/408-changeset_r3337.patch

    r13520 r13521  
    1111--- a/ath/if_ath.c 
    1212+++ b/ath/if_ath.c 
    13 @@ -3126,7 +3126,7 @@ ath_tx_startraw(struct net_device *dev,  
     13@@ -3129,7 +3129,7 @@ ath_tx_startraw(struct net_device *dev,  
    1414        struct ath_softc *sc = dev->priv; 
    1515        struct ath_hal *ah = sc->sc_ah; 
  • trunk/package/madwifi/patches/450-new_hal.patch

    r13520 r13521  
    109109         * Check if the MAC has multi-rate retry support. 
    110110         * We do this by trying to setup a fake extended 
    111 @@ -7521,7 +7529,7 @@ ath_txq_setup(struct ath_softc *sc, int  
     111@@ -7524,7 +7532,7 @@ ath_txq_setup(struct ath_softc *sc, int  
    112112        if (qtype == HAL_TX_QUEUE_UAPSD) 
    113113                qi.tqi_qflags = HAL_TXQ_TXDESCINT_ENABLE; 
Note: See TracChangeset for help on using the changeset viewer.