Project : madwifi
Revision : 2438
Author : mentor (Matthew W. S. Bell)
Date : 2007-06-12 04:14:15 +0200 (Tue, 12 Jun 2007)
Log Message :
Add some more preprocessing for ATH_CAP_TPC
Affected Files:
* trunk/ath/if_ath.c updated
* trunk/net80211/ieee80211_linux.c updated
* trunk/net80211/ieee80211_output.c updated
Modified: trunk/ath/if_ath.c
===================================================================
--- trunk/ath/if_ath.c 2007-06-11 22:42:40 UTC (rev 2437)
+++ trunk/ath/if_ath.c 2007-06-12 02:14:15 UTC (rev 2438)
@@ -815,8 +815,13 @@
* all parts. We're a bit pedantic here as all parts
* support a global cap.
*/
+#ifdef ATH_CAP_TPC
sc->sc_hastpc = ath_hal_hastpc(ah);
if (sc->sc_hastpc || ath_hal_hastxpowlimit(ah))
+#else
+ sc->sc_hastpc = 0;
+ if (ath_hal_hastxpowlimit(ah))
+#endif
ic->ic_caps |= IEEE80211_C_TXPMGT;
/*
@@ -1379,12 +1384,12 @@
((_pa) - (_sc)->sc_rxdma.dd_desc_paddr)))
/* XXXAPSD: build in check against max triggers we could see
- * based on ic->ic_uapsdmaxtriggers.
- */
+ * based on ic->ic_uapsdmaxtriggers. */
ATH_RXBUF_LOCK_IRQ(sc);
if (sc->sc_rxbufcur == NULL)
sc->sc_rxbufcur = STAILQ_FIRST(&sc->sc_rxbuf);
+
for (bf = sc->sc_rxbufcur; bf; bf = STAILQ_NEXT(bf, bf_list)) {
ds = bf->bf_desc;
if (ds->ds_link == bf->bf_daddr) {
@@ -1392,12 +1397,10 @@
break;
}
if (bf->bf_status & ATH_BUFSTATUS_DONE) {
- /*
- * already processed this buffer (shouldn't occur if
+ /* already processed this buffer (shouldn't occur if
* we change code to always process descriptors in
* rx intr handler - as opposed to sometimes processing
- * in the rx tasklet).
- */
+ * in the rx tasklet). */
continue;
}
skb = bf->bf_skb;
@@ -1406,18 +1409,13 @@
continue;
}
- /*
- * XXXAPSD: consider new HAL call that does only the subset
- * of ath_hal_rxprocdesc we require for trigger search.
- */
+ /* XXXAPSD: consider new HAL call that does only the subset
+ * of ath_hal_rxprocdesc we require for trigger
search. */
- /*
- * NB: descriptor memory doesn't need to be sync'd
- * due to the way it was allocated.
- */
+ /* NB: descriptor memory doesn't need to be sync'd
+ * due to the way it was allocated. */
- /*
- * Must provide the virtual address of the current
+ /* Must provide the virtual address of the current
* descriptor, the physical address, and the virtual
* address of the next descriptor in the h/w chain.
* This allows the HAL to look ahead to see if the
@@ -1425,8 +1423,7 @@
* done bit in the following descriptor and the address
* of the current descriptor the DMA engine is working
* on. All this is necessary because of our use of
- * a self-linked list to avoid rx overruns.
- */
+ * a self-linked list to avoid rx overruns. */
rs = &bf->bf_dsstatus.ds_rxstat;
retval = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, PA2DESC(sc,
ds->ds_link), sc->sc_tsf, rs);
if (HAL_EINPROGRESS == retval)
@@ -1445,7 +1442,7 @@
BUS_DMA_FROMDEVICE);
qwh = (struct ieee80211_qosframe *) skb->data;
- /* Find the node. it MUST be in the keycache. */
+ /* Find the node; it MUST be in the keycache. */
if (rs->rs_keyix == HAL_RXKEYIX_INVALID ||
(ni = sc->sc_keyixmap[rs->rs_keyix]) == NULL) {
/*
Modified: trunk/net80211/ieee80211_linux.c
===================================================================
--- trunk/net80211/ieee80211_linux.c 2007-06-11 22:42:40 UTC (rev 2437)
+++ trunk/net80211/ieee80211_linux.c 2007-06-12 02:14:15 UTC (rev 2438)
@@ -94,7 +94,7 @@
u_int len;
len = roundup(sizeof(struct ieee80211_frame) + pktlen, 4);
- skb = dev_alloc_skb(len + align-1);
+ skb = dev_alloc_skb(len + align - 1);
if (skb != NULL) {
u_int off = ((unsigned long) skb->data) % align;
if (off != 0)
Modified: trunk/net80211/ieee80211_output.c
===================================================================
--- trunk/net80211/ieee80211_output.c 2007-06-11 22:42:40 UTC (rev 2437)
+++ trunk/net80211/ieee80211_output.c 2007-06-12 02:14:15 UTC (rev 2438)
@@ -2285,7 +2285,7 @@
struct ieee80211com *ic = vap->iv_ic;
- skb = ieee80211_getmgtframe(&frm,0);
+ skb = ieee80211_getmgtframe(&frm, 0);
if (skb == NULL)
return NULL;
wh = (struct ieee80211_frame *)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
|