Changeset 3636

Show
Ignore:
Timestamp:
05/16/08 18:21:26 (3 months ago)
Author:
benoit
Message:

Consistent check of value returned by ath_hal_setuptxqueue().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/branches/madwifi-dfs/ath/if_ath.c

    r3632 r3636  
    48904890        /* NB: don't enable any interrupts */ 
    48914891        qnum = ath_hal_setuptxqueue(sc->sc_ah, HAL_TX_QUEUE_BEACON, &qi); 
     4892        if (qnum < 0) 
     4893                return -1; 
     4894        if (qnum >= ARRAY_SIZE(sc->sc_txq)) { 
     4895                EPRINTF(sc, "HAL hardware queue number %d(>=%d) " 
     4896                        "is out of range.\n", 
     4897                        qnum, ARRAY_SIZE(sc->sc_txq)); 
     4898                ath_hal_releasetxqueue(sc->sc_ah, qnum); 
     4899                return -1; 
     4900        } 
     4901 
    48924902        txq = &sc->sc_txq[qnum]; 
    48934903        memset(txq, 0, sizeof(struct ath_txq)); 
     
    72597269        if (sc->sc_grpplq.axq_qnum == -1) { 
    72607270                qnum = ath_hal_setuptxqueue(ah, qtype, &qi); 
    7261                 if (qnum == -1
     7271                if (qnum < 0
    72627272                        return ; 
    72637273                if (qnum >= ARRAY_SIZE(sc->sc_txq)) { 
    7264                         EPRINTF(sc, "HAL hardware queue number, %u, is out of range." 
    7265                                     "  The highest queue number is %u!\n", 
    7266                                    qnum, 
    7267                                    (unsigned)ARRAY_SIZE(sc->sc_txq)); 
     7274                        EPRINTF(sc, "HAL hardware queue number %d(>=%d) " 
     7275                                "is out of range.", 
     7276                                qnum, ARRAY_SIZE(sc->sc_txq)); 
    72687277                        ath_hal_releasetxqueue(ah, qnum); 
    72697278                        return; 
     
    76157624                        HAL_TXQ_TXDESCINT_ENABLE; 
    76167625        qnum = ath_hal_setuptxqueue(ah, qtype, &qi); 
    7617         if (qnum == -1) { 
     7626        if (qnum < 0) { 
    76187627                /* 
    76197628                 * NB: don't print a message, this happens 
     
    76297638        } 
    76307639        if (qnum >= ARRAY_SIZE(sc->sc_txq)) { 
    7631                 EPRINTF(sc, "HAL hardware queue number, %u, is out of range." 
    7632                             "  The highest queue number is %u!\n", 
    7633                            qnum, 
    7634                            (unsigned)ARRAY_SIZE(sc->sc_txq)); 
     7640                EPRINTF(sc, "HAL hardware queue number %d(>=%d) " 
     7641                        "is out of range.", qnum, ARRAY_SIZE(sc->sc_txq)); 
    76357642#ifdef ATH_SUPERG_COMP 
    76367643                if (compbuf) {