Changeset 3627
- Timestamp:
- 05/14/08 21:11:57 (3 months ago)
- Files:
-
- madwifi/trunk/ath/if_ath.c (modified) (12 diffs)
- madwifi/trunk/ath/if_ath_hal_macros.h (modified) (1 diff)
- madwifi/trunk/ath/if_athvar.h (modified) (8 diffs)
- madwifi/trunk/ath_hal/ah_os.c (modified) (1 diff)
- madwifi/trunk/include/compat.h (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_beacon.c (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_linux.h (modified) (8 diffs)
- madwifi/trunk/net80211/ieee80211_proto.c (modified) (3 diffs)
- madwifi/trunk/net80211/ieee80211_scan.c (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_scan_ap.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/ath/if_ath.c
r3626 r3627 1691 1691 } 1692 1692 1693 if (sc->sc_hasintmit) {1693 if (sc->sc_hasintmit) { 1694 1694 u_int32_t intmit_on = 0; 1695 1695 ath_hal_getintmit(sc->sc_ah, &intmit_on); … … 6470 6470 /* Update beacon RSSI statistics, (apply to "pure" STA only) 6471 6471 * AND only for our AP's beacons */ 6472 if (vap->iv_opmode == IEEE80211_M_STA &&6472 if (vap->iv_opmode == IEEE80211_M_STA && 6473 6473 sc->sc_ic.ic_opmode == IEEE80211_M_STA && 6474 6474 ni == vap->iv_bss) … … 8966 8966 8967 8967 } 8968 else if (ath_hal_getrfgain(ah) == HAL_RFGAIN_READ_REQUESTED) {8968 else if (ath_hal_getrfgain(ah) == HAL_RFGAIN_READ_REQUESTED) { 8969 8969 /* With current HAL, I've never seen this so I'm going to log it 8970 8970 * as an error and see if it ever shows up with newer HAL. */ … … 10723 10723 switch ((long)ctl->extra2) { 10724 10724 case ATH_DISTANCE: 10725 if (val > 0) {10725 if (val > 0) { 10726 10726 sc->sc_slottimeconf = ath_distance2slottime(sc, val); 10727 10727 sc->sc_acktimeoutconf = ath_distance2timeout(sc, val); … … 12632 12632 { 12633 12633 struct ath_softc *sc = ic->ic_dev->priv; 12634 switch (param) {12634 switch (param) { 12635 12635 case IEEE80211_PARAM_DRAINTXQ: 12636 12636 printk("Draining tx queue...\n"); … … 12664 12664 { 12665 12665 int j; 12666 for (j = 0; j < value; j++) {12667 if (!ath_take_txbuf_mgmt(sc)) {12666 for (j = 0; j < value; j++) { 12667 if (!ath_take_txbuf_mgmt(sc)) { 12668 12668 printk("Leaked %d tx buffers (of the %d tx buffers requested).\n", j, value); 12669 12669 return 0; … … 12754 12754 av->av_bcbuf, context); 12755 12755 } 12756 else if (dd == &sc->sc_txdma) {12756 else if (dd == &sc->sc_txdma) { 12757 12757 struct ath_buf *tbf = NULL; 12758 12758 … … 12840 12840 int index; 12841 12841 struct ath_buf *lostbf; 12842 for (index = 0; index < dd->dd_nbuf; index++) {12842 for (index = 0; index < dd->dd_nbuf; index++) { 12843 12843 if (!test_bit(index, dd_bufs_found)) { 12844 12844 lostbf = descdma_get_buffer(dd, index); … … 12896 12896 12897 12897 /* NB: We have all you base... */ 12898 for (i = 0; i < ARRAY_SIZE(descdma); i++) {12898 for (i = 0; i < ARRAY_SIZE(descdma); i++) { 12899 12899 printk("\n"); 12900 12900 dd = descdma[i]; … … 12903 12903 dd_bufs_found = kzalloc(BITS_TO_LONGS(dd->dd_nbuf) * 12904 12904 sizeof(unsigned long), GFP_KERNEL); 12905 if (dd == &sc->sc_txdma) {12905 if (dd == &sc->sc_txdma) { 12906 12906 ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found, 12907 12907 &sc->sc_txbuf, "free list"); … … 12910 12910 ath_scanbufs_in_all_nodetable_locked(sc, dd, dd_bufs_found, nt); 12911 12911 } 12912 else if (dd == &sc->sc_rxdma) {12912 else if (dd == &sc->sc_rxdma) { 12913 12913 ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found, 12914 12914 &sc->sc_rxbuf, "queue"); 12915 12915 } 12916 else if (dd == &sc->sc_bdma) {12916 else if (dd == &sc->sc_bdma) { 12917 12917 ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found, 12918 12918 &sc->sc_bbuf, "free list"); … … 12920 12920 ath_scanbufs_in_all_hwtxq_locked(sc, dd, dd_bufs_found); 12921 12921 } 12922 else if (dd == &sc->sc_grppolldma) {12922 else if (dd == &sc->sc_grppolldma) { 12923 12923 ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found, 12924 12924 &sc->sc_grppollbuf, "free list"); madwifi/trunk/ath/if_ath_hal_macros.h
r3481 r3627 60 60 ATH_HAL_LOCK_ASSERT(_sc); \ 61 61 spin_unlock_irqrestore(&(_sc)->sc_hal_lock, __sc_halLockflags); \ 62 } while (0)62 } while (0) 63 63 #define ATH_HAL_UNLOCK_IRQ_EARLY(_sc) \ 64 64 ATH_HAL_LOCK_ASSERT(_sc); \ madwifi/trunk/ath/if_athvar.h
r3620 r3627 388 388 ATH_NODE_UAPSD_LOCK_CHECK(_an); \ 389 389 spin_lock(&(_an)->an_uapsd_lock); \ 390 } while (0)390 } while (0) 391 391 #define ATH_NODE_UAPSD_UNLOCK_IRQ_INSIDE(_an) do { \ 392 392 ATH_NODE_UAPSD_LOCK_ASSERT(_an); \ … … 404 404 if (spin_is_locked(&(_an)->an_uapsd_lock)) \ 405 405 printk(KERN_DEBUG "%s:%d - about to block on uapsd lock!\n", __func__, __LINE__); \ 406 } while (0)406 } while (0) 407 407 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 408 408 #define ATH_NODE_UAPSD_LOCK_CHECK(_an) … … 562 562 ATH_TXQ_LOCK_CHECK(_tq); \ 563 563 spin_lock(&(_tq)->axq_lock); \ 564 } while (0)564 } while (0) 565 565 #define ATH_TXQ_UNLOCK_IRQ_INSIDE(_tq) do { \ 566 566 ATH_TXQ_LOCK_ASSERT(_tq); \ 567 567 spin_unlock(&(_tq)->axq_lock); \ 568 } while (0)568 } while (0) 569 569 570 570 #if (defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)) && defined(spin_is_locked) … … 575 575 if (spin_is_locked(&(_tq)->axq_lock)) \ 576 576 printk(KERN_DEBUG "%s:%d - about to block on txq lock!\n", __func__, __LINE__); \ 577 } while (0)577 } while (0) 578 578 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 579 579 #define ATH_TXQ_LOCK_CHECK(_tq) … … 874 874 if (spin_is_locked(&(_sc)->sc_txbuflock)) \ 875 875 printk(KERN_DEBUG "%s:%d - about to block on txbuf lock!\n", __func__, __LINE__); \ 876 } while (0)876 } while (0) 877 877 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 878 878 #define ATH_TXBUF_LOCK_CHECK(_sc) … … 905 905 if (spin_is_locked(&(_sc)->sc_rxbuflock)) \ 906 906 printk(KERN_DEBUG "%s:%d - about to block on rxbuf lock!\n", __func__, __LINE__); \ 907 } while (0)907 } while (0) 908 908 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 909 909 #define ATH_RXBUF_LOCK_CHECK(_sc) … … 935 935 if (spin_is_locked(&(_sc)->sc_bbuflock)) \ 936 936 printk(KERN_DEBUG "%s:%d - about to block on bbuf lock!\n", __func__, __LINE__); \ 937 } while (0)937 } while (0) 938 938 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 939 939 #define ATH_BBUF_LOCK_CHECK(_sc) … … 967 967 if (spin_is_locked(&(_sc)->sc_grppollbuflock)) \ 968 968 printk(KERN_DEBUG "%s:%d - about to block on grppollbuf lock!\n", __func__, __LINE__); \ 969 } while (0)969 } while (0) 970 970 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 971 971 #define ATH_GBUF_LOCK_CHECK(_sc) madwifi/trunk/ath_hal/ah_os.c
r3601 r3627 881 881 { 882 882 #ifdef AH_DEBUG 883 switch(ath_hal_debug) 884 { 883 switch (ath_hal_debug) { 885 884 case HAL_DEBUG_OFF: 886 885 break; madwifi/trunk/include/compat.h
r3625 r3627 182 182 #define skb_tail_pointer(_skb) ((_skb)->tail) 183 183 #define skb_set_network_header(_skb, _offset) \ 184 do { (_skb)->nh.raw = (_skb)->data + (_offset); } while (0)184 do { (_skb)->nh.raw = (_skb)->data + (_offset); } while (0) 185 185 #define skb_reset_network_header(_skb) \ 186 do { (_skb)->nh.raw = (_skb)->data; } while (0)186 do { (_skb)->nh.raw = (_skb)->data; } while (0) 187 187 #define skb_mac_header(_skb) ((_skb)->mac.raw) 188 188 #define skb_reset_mac_header(_skb) \ 189 do { (_skb)->mac.raw = (_skb)->data; } while (0)189 do { (_skb)->mac.raw = (_skb)->data; } while (0) 190 190 #endif 191 191 madwifi/trunk/net80211/ieee80211_beacon.c
r3499 r3627 530 530 skb_put(skb, sizeof(*csa_ie)); 531 531 len_changed = 1; 532 } else if (csa_ie->csa_count)532 } else if (csa_ie->csa_count) 533 533 csa_ie->csa_count--; 534 534 madwifi/trunk/net80211/ieee80211_linux.h
r3618 r3627 146 146 if (spin_is_locked(&(_ic)->ic_comlock)) \ 147 147 printk("%s:%d - about to block on ieee80211com lock!\n", __func__, __LINE__); \ 148 } while (0)148 } while (0) 149 149 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 150 150 #define IEEE80211_LOCK_CHECK(_ic) … … 175 175 if (spin_is_locked(&(_ic)->ic_vapslock)) \ 176 176 printk("%s:%d - about to block on ieee80211com_vaps lock!\n", __func__, __LINE__); \ 177 } while (0)177 } while (0) 178 178 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 179 179 #define IEEE80211_VAPS_LOCK_CHECK(_ic) … … 204 204 IEEE80211_NODE_LOCK_CHECK(_ni); \ 205 205 spin_lock(&(_ni)->ni_nodelock); 206 } while (0)206 } while (0) 207 207 #define IEEE80211_NODE_UNLOCK_IRQ_INSIDE(_tq) do { \ 208 208 IEEE80211_NODE_LOCK_ASSERT(_ni); \ … … 221 221 if (spin_is_locked(&(_ni)->ni_nodelock)) \ 222 222 printk("%s:%d - about to block on node lock!\n", __func__, __LINE__); \ 223 } while (0)223 } while (0) 224 224 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 225 225 #define IEEE80211_NODE_LOCK_CHECK(_ni) … … 295 295 ACL_LOCK_ASSERT(_as); \ 296 296 spin_unlock(&(_as)->as_lock); \ 297 } while (0)297 } while (0) 298 298 #define ACL_UNLOCK_EARLY(_as) \ 299 299 ACL_LOCK_ASSERT(_as); \ … … 307 307 if (spin_is_locked(&(_as)->as_lock)) \ 308 308 printk("%s:%d - about to block on ACL lock!\n", __func__, __LINE__); \ 309 } while (0)309 } while (0) 310 310 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 311 311 #define ACL_LOCK_CHECK(_as) … … 336 336 IEEE80211_NODE_SAVEQ_LOCK_CHECK(_ni); \ 337 337 spin_lock(&(_ni)->ni_savedq.lock); \ 338 } while (0)338 } while (0) 339 339 #define IEEE80211_NODE_SAVEQ_UNLOCK_IRQ_INSIDE(_ni) do { \ 340 340 IEEE80211_NODE_SAVEQ_LOCK_ASSERT(_ni); \ 341 341 spin_unlock(&(_ni)->ni_savedq.lock); \ 342 } while (0)342 } while (0) 343 343 #define IEEE80211_NODE_SAVEQ_UNLOCK_IRQ_EARLY(_ni) \ 344 344 IEEE80211_NODE_SAVEQ_LOCK_ASSERT(_ni); \ … … 353 353 if (spin_is_locked(&(_ni)->ni_savedq.lock)) \ 354 354 printk("%s:%d - about to block on node saveq lock!\n", __func__, __LINE__); \ 355 } while (0)355 } while (0) 356 356 #else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */ 357 357 #define IEEE80211_NODE_SAVEQ_LOCK_CHECK(_ni) madwifi/trunk/net80211/ieee80211_proto.c
r3484 r3627 976 976 if (IS_RUNNING(ic->ic_dev)) { 977 977 if (vap->iv_opmode == IEEE80211_M_STA) { 978 if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) {978 if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) { 979 979 /* Try to be intelligent about clocking the 980 980 * state machine. If we're currently in RUN … … 1764 1764 switch (dstate) { 1765 1765 case IEEE80211_S_RUN: 1766 if (vap->iv_opmode == IEEE80211_M_MONITOR ||1767 vap->iv_opmode == IEEE80211_M_WDS ||1768 vap->iv_opmode == IEEE80211_M_HOSTAP) {1766 if (vap->iv_opmode == IEEE80211_M_MONITOR || 1767 vap->iv_opmode == IEEE80211_M_WDS || 1768 vap->iv_opmode == IEEE80211_M_HOSTAP) { 1769 1769 IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, 1770 1770 "%s: Jumping directly to RUN " … … 1903 1903 tmpvap->iv_flags_ext &= 1904 1904 ~IEEE80211_FEXT_SCAN_PENDING; 1905 if (tmpvap->iv_state !=1905 if (tmpvap->iv_state != 1906 1906 IEEE80211_S_RUN) { 1907 1907 tmpvap->iv_newstate(tmpvap, 1908 1908 IEEE80211_S_RUN, 0); 1909 } else if (tmpvap->iv_opmode ==1909 } else if (tmpvap->iv_opmode == 1910 1910 IEEE80211_M_HOSTAP) { 1911 1911 /* Force other AP through madwifi/trunk/net80211/ieee80211_scan.c
r3488 r3627 1054 1054 /* Search for the first channel with no radar detected */ 1055 1055 int n = 0; 1056 for (n = 0; n < ic->ic_nchans; n++) {1056 for (n = 0; n < ic->ic_nchans; n++) { 1057 1057 if (0 == (ic->ic_channels[n].ic_flags & 1058 1058 IEEE80211_CHAN_RADAR)) { madwifi/trunk/net80211/ieee80211_scan_ap.c
r3532 r3627 840 840 841 841 /* Verify mode matches any fixed mode specified */ 842 if ((c->chan->ic_flags & as->as_required_mode) !=842 if ((c->chan->ic_flags & as->as_required_mode) != 843 843 as->as_required_mode) 844 844 continue;
