[Madwifi-cvs] madwifi/ath if_ath.c,1.36.2.35,1.36.2.36
Status: Beta
Brought to you by:
otaku
From: Sebastian W. <to...@us...> - 2005-03-29 07:21:07
|
Update of /cvsroot/madwifi/madwifi/ath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1460/ath Modified Files: Tag: BSD if_ath.c Log Message: - cleaned up - use printk without using dev->name before register_netdev - sc_invalid=0 is set after ath_attach is done (if_ath_pci.c) (not sure when is exactly best time) - ath_start: free skb when cleanup - ath_start sets ic_slowtimo timer Index: if_ath.c =================================================================== RCS file: /cvsroot/madwifi/madwifi/ath/if_ath.c,v retrieving revision 1.36.2.35 retrieving revision 1.36.2.36 diff -C2 -d -r1.36.2.35 -r1.36.2.36 *** if_ath.c 20 Mar 2005 01:53:03 -0000 1.36.2.35 --- if_ath.c 29 Mar 2005 07:20:42 -0000 1.36.2.36 *************** *** 301,318 **** ah = _ath_hal_attach(devid, sc, 0, (void *) dev->mem_start, &status); if (ah == NULL) { ! if_printf(dev, "unable to attach hardware; HAL status %u\n", ! status); error = ENXIO; goto bad; } if (ah->ah_abi != HAL_ABI_VERSION) { ! if_printf(dev, "HAL ABI mismatch detected " ! "(HAL:0x%x != driver:0x%x)\n", ! ah->ah_abi, HAL_ABI_VERSION); ! error = ENXIO; /* XXX */ goto bad; } sc->sc_ah = ah; - sc->sc_invalid = 0; // TODO: here for testing /* --- 301,317 ---- ah = _ath_hal_attach(devid, sc, 0, (void *) dev->mem_start, &status); if (ah == NULL) { ! printk(KERN_ERR "%s: unable to attach hardware: '%s' (HAL status %u)\n", ! __func__, hal_status_desc[status], status); error = ENXIO; goto bad; } if (ah->ah_abi != HAL_ABI_VERSION) { ! printk(KERN_ERR "%s: HAL ABI mismatch; " ! "driver expects 0x%x, HAL reports 0x%x\n", ! __func__, HAL_ABI_VERSION, ah->ah_abi); ! error = ENXIO; /* XXX */ goto bad; } sc->sc_ah = ah; /* *************** *** 399,404 **** } - // TODO: scan here? - /* * Allocate hardware transmit queues: one queue for --- 398,401 ---- *************** *** 497,502 **** * support with a sysctl. */ ! //sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID); ! sc->sc_softled = 0; if (sc->sc_softled) { ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); --- 494,498 ---- * support with a sysctl. */ ! sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID); if (sc->sc_softled) { ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); *************** *** 1172,1175 **** --- 1168,1173 ---- if (ni != NULL) \ ieee80211_free_node(ni); \ + if(skb) \ + dev_kfree_skb(skb); \ } while (0) *************** *** 1349,1354 **** break; sc->sc_tx_timer = 5; ! //mod_timer(&ic->ic_slowtimo, jiffies + HZ); ! //ifp->if_timer = 1; // TODO: ??? } return ret; /* NB: return !0 only in a ``hard error condition'' */ --- 1347,1351 ---- break; sc->sc_tx_timer = 5; ! mod_timer(&ic->ic_slowtimo, jiffies + HZ); } return ret; /* NB: return !0 only in a ``hard error condition'' */ *************** *** 1805,1809 **** * XXX should get from lladdr instead of arpcom but that's more work */ ! IEEE80211_ADDR_COPY(ic->ic_myaddr, dev->dev_addr); // TODO: needed ??? ath_hal_setmac(ah, ic->ic_myaddr); --- 1802,1806 ---- * XXX should get from lladdr instead of arpcom but that's more work */ ! IEEE80211_ADDR_COPY(ic->ic_myaddr, dev->dev_addr); ath_hal_setmac(ah, ic->ic_myaddr); *************** *** 2145,2151 **** */ if (ic->ic_opmode == IEEE80211_M_HOSTAP && ! ncabq > 0 && sc->sc_boff.bo_tim[4] & 1) ath_hal_txstart(ah, sc->sc_cabq->axq_qnum); - ath_hal_puttxbuf(ah, sc->sc_bhalq, bf->bf_daddr); ath_hal_txstart(ah, sc->sc_bhalq); --- 2142,2147 ---- */ if (ic->ic_opmode == IEEE80211_M_HOSTAP && ! ncabq > 0 && sc->sc_boff.bo_tim[4] & 1) ath_hal_txstart(ah, sc->sc_cabq->axq_qnum); ath_hal_puttxbuf(ah, sc->sc_bhalq, bf->bf_daddr); ath_hal_txstart(ah, sc->sc_bhalq); *************** *** 3235,3241 **** ATH_LOCK_DESTROY(sc); ATH_TXBUF_LOCK_DESTROY(sc); ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_cleanupq(sc, &sc->sc_txq[i]); } --- 3231,3238 ---- ATH_LOCK_DESTROY(sc); ATH_TXBUF_LOCK_DESTROY(sc); ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) ath_tx_cleanupq(sc, &sc->sc_txq[i]); + } } *************** *** 3831,3837 **** */ /* XXX faster to read ISR_S0_S and ISR_S1_S to determine q's? */ ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_processq(sc, &sc->sc_txq[i]); sc->sc_tx_timer = 0; --- 3828,3835 ---- */ /* XXX faster to read ISR_S0_S and ISR_S1_S to determine q's? */ ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) ath_tx_processq(sc, &sc->sc_txq[i]); + } sc->sc_tx_timer = 0; *************** *** 3930,3942 **** "%s: beacon queue %p\n", __func__, (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq)); ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_stopdma(sc, &sc->sc_txq[i]); } sc->sc_dev.trans_start = jiffies; netif_start_queue(&sc->sc_dev); // TODO: needed here? ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_draintxq(sc, &sc->sc_txq[i]); sc->sc_tx_timer = 0; } --- 3928,3942 ---- "%s: beacon queue %p\n", __func__, (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq)); ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) ath_tx_stopdma(sc, &sc->sc_txq[i]); + } } sc->sc_dev.trans_start = jiffies; netif_start_queue(&sc->sc_dev); // TODO: needed here? ! for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) ath_tx_draintxq(sc, &sc->sc_txq[i]); + } sc->sc_tx_timer = 0; } |