Whitespace for control statements

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3627 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mentor 2008-05-14 19:11:57 +00:00
parent 17ef384654
commit 6abd8285aa
10 changed files with 46 additions and 47 deletions

View File

@ -1690,7 +1690,7 @@ static HAL_BOOL ath_hw_reset(struct ath_softc* sc, HAL_OPMODE opmode,
}
}
if(sc->sc_hasintmit) {
if (sc->sc_hasintmit) {
u_int32_t intmit_on = 0;
ath_hal_getintmit(sc->sc_ah, &intmit_on);
if (intmit_on != sc->sc_useintmit) {
@ -6469,7 +6469,7 @@ ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,
case IEEE80211_FC0_SUBTYPE_BEACON:
/* Update beacon RSSI statistics, (apply to "pure" STA only)
* AND only for our AP's beacons */
if(vap->iv_opmode == IEEE80211_M_STA &&
if (vap->iv_opmode == IEEE80211_M_STA &&
sc->sc_ic.ic_opmode == IEEE80211_M_STA &&
ni == vap->iv_bss)
ATH_RSSI_LPF(sc->sc_halstats.ns_avgbrssi, rssi);
@ -8965,7 +8965,7 @@ ath_calibrate(unsigned long arg)
ath_set_txcont(ic, txcont_was_active);
}
else if(ath_hal_getrfgain(ah) == HAL_RFGAIN_READ_REQUESTED) {
else if (ath_hal_getrfgain(ah) == HAL_RFGAIN_READ_REQUESTED) {
/* With current HAL, I've never seen this so I'm going to log it
* as an error and see if it ever shows up with newer HAL. */
#if 0
@ -10722,7 +10722,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
if (ret == 0) {
switch ((long)ctl->extra2) {
case ATH_DISTANCE:
if(val > 0) {
if (val > 0) {
sc->sc_slottimeconf = ath_distance2slottime(sc, val);
sc->sc_acktimeoutconf = ath_distance2timeout(sc, val);
sc->sc_ctstimeoutconf = ath_distance2timeout(sc, val);
@ -12631,7 +12631,7 @@ static int ath_debug_iwpriv(struct ieee80211com *ic,
unsigned int param, unsigned int value)
{
struct ath_softc *sc = ic->ic_dev->priv;
switch(param) {
switch (param) {
case IEEE80211_PARAM_DRAINTXQ:
printk("Draining tx queue...\n");
ath_draintxq(sc);
@ -12663,8 +12663,8 @@ static int ath_debug_iwpriv(struct ieee80211com *ic,
case IEEE80211_PARAM_LEAKTXBUFS:
{
int j;
for(j = 0; j < value; j++) {
if(!ath_take_txbuf_mgmt(sc)) {
for (j = 0; j < value; j++) {
if (!ath_take_txbuf_mgmt(sc)) {
printk("Leaked %d tx buffers (of the %d tx buffers requested).\n", j, value);
return 0;
}
@ -12753,7 +12753,7 @@ ath_scanbufs_in_vap_locked(struct ath_softc *sc, struct ath_descdma* dd,
ath_scanbufs_found_buf_locked(sc, dd, dd_bufs_found,
av->av_bcbuf, context);
}
else if(dd == &sc->sc_txdma) {
else if (dd == &sc->sc_txdma) {
struct ath_buf *tbf = NULL;
snprintf(context, sizeof(context), "vap %s %p[" MAC_FMT
@ -12839,7 +12839,7 @@ ath_scanbufs_print_leaks(struct ath_softc *sc,
{
int index;
struct ath_buf *lostbf;
for(index = 0; index < dd->dd_nbuf; index++) {
for (index = 0; index < dd->dd_nbuf; index++) {
if (!test_bit(index, dd_bufs_found)) {
lostbf = descdma_get_buffer(dd, index);
/* XXX: Full alloc backtrace */
@ -12895,31 +12895,31 @@ ath_scanbufs(struct ath_softc *sc)
}
/* NB: We have all you base... */
for(i = 0; i < ARRAY_SIZE(descdma); i++) {
for (i = 0; i < ARRAY_SIZE(descdma); i++) {
printk("\n");
dd = descdma[i];
if (dd->dd_bufptr) {
printk("Analyzing %s DMA buffers...\n", dd->dd_name);
dd_bufs_found = kzalloc(BITS_TO_LONGS(dd->dd_nbuf) *
sizeof(unsigned long), GFP_KERNEL);
if(dd == &sc->sc_txdma) {
if (dd == &sc->sc_txdma) {
ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found,
&sc->sc_txbuf, "free list");
ath_scanbufs_in_all_hwtxq_locked(sc, dd, dd_bufs_found);
ath_scanbufs_in_all_vaps_locked(sc, dd, dd_bufs_found);
ath_scanbufs_in_all_nodetable_locked(sc, dd, dd_bufs_found, nt);
}
else if(dd == &sc->sc_rxdma) {
else if (dd == &sc->sc_rxdma) {
ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found,
&sc->sc_rxbuf, "queue");
}
else if(dd == &sc->sc_bdma) {
else if (dd == &sc->sc_bdma) {
ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found,
&sc->sc_bbuf, "free list");
ath_scanbufs_in_all_vaps_locked(sc, dd, dd_bufs_found);
ath_scanbufs_in_all_hwtxq_locked(sc, dd, dd_bufs_found);
}
else if(dd == &sc->sc_grppolldma) {
else if (dd == &sc->sc_grppolldma) {
ath_scanbufs_in_buflist_locked(sc, dd, dd_bufs_found,
&sc->sc_grppollbuf, "free list");
ath_scanbufs_in_txq_locked(sc, dd, dd_bufs_found,

View File

@ -59,7 +59,7 @@
#define ATH_HAL_UNLOCK_IRQ(_sc) \
ATH_HAL_LOCK_ASSERT(_sc); \
spin_unlock_irqrestore(&(_sc)->sc_hal_lock, __sc_halLockflags); \
} while(0)
} while (0)
#define ATH_HAL_UNLOCK_IRQ_EARLY(_sc) \
ATH_HAL_LOCK_ASSERT(_sc); \
spin_unlock_irqrestore(&(_sc)->sc_hal_lock, __sc_halLockflags);

View File

@ -387,7 +387,7 @@ struct ath_node {
#define ATH_NODE_UAPSD_LOCK_IRQ_INSIDE(_an) do { \
ATH_NODE_UAPSD_LOCK_CHECK(_an); \
spin_lock(&(_an)->an_uapsd_lock); \
} while(0)
} while (0)
#define ATH_NODE_UAPSD_UNLOCK_IRQ_INSIDE(_an) do { \
ATH_NODE_UAPSD_LOCK_ASSERT(_an); \
spin_unlock(&(_an)->an_uapsd_lock); \
@ -403,7 +403,7 @@ struct ath_node {
#define ATH_NODE_UAPSD_LOCK_CHECK(_an) do { \
if (spin_is_locked(&(_an)->an_uapsd_lock)) \
printk(KERN_DEBUG "%s:%d - about to block on uapsd lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_NODE_UAPSD_LOCK_CHECK(_an)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -561,11 +561,11 @@ struct ath_vap {
#define ATH_TXQ_LOCK_IRQ_INSIDE(_tq) do { \
ATH_TXQ_LOCK_CHECK(_tq); \
spin_lock(&(_tq)->axq_lock); \
} while(0)
} while (0)
#define ATH_TXQ_UNLOCK_IRQ_INSIDE(_tq) do { \
ATH_TXQ_LOCK_ASSERT(_tq); \
spin_unlock(&(_tq)->axq_lock); \
} while(0)
} while (0)
#if (defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)) && defined(spin_is_locked)
#define ATH_TXQ_LOCK_ASSERT(_tq) \
@ -574,7 +574,7 @@ struct ath_vap {
#define ATH_TXQ_LOCK_CHECK(_tq) do { \
if (spin_is_locked(&(_tq)->axq_lock)) \
printk(KERN_DEBUG "%s:%d - about to block on txq lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_TXQ_LOCK_CHECK(_tq)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -873,7 +873,7 @@ typedef void (*ath_callback) (struct ath_softc *);
#define ATH_TXBUF_LOCK_CHECK(_sc) do { \
if (spin_is_locked(&(_sc)->sc_txbuflock)) \
printk(KERN_DEBUG "%s:%d - about to block on txbuf lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_TXBUF_LOCK_CHECK(_sc)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -904,7 +904,7 @@ typedef void (*ath_callback) (struct ath_softc *);
#define ATH_RXBUF_LOCK_CHECK(_sc) do { \
if (spin_is_locked(&(_sc)->sc_rxbuflock)) \
printk(KERN_DEBUG "%s:%d - about to block on rxbuf lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_RXBUF_LOCK_CHECK(_sc)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -934,7 +934,7 @@ typedef void (*ath_callback) (struct ath_softc *);
#define ATH_BBUF_LOCK_CHECK(_sc) do { \
if (spin_is_locked(&(_sc)->sc_bbuflock)) \
printk(KERN_DEBUG "%s:%d - about to block on bbuf lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_BBUF_LOCK_CHECK(_sc)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -966,7 +966,7 @@ typedef void (*ath_callback) (struct ath_softc *);
#define ATH_GBUF_LOCK_CHECK(_sc) do { \
if (spin_is_locked(&(_sc)->sc_grppollbuflock)) \
printk(KERN_DEBUG "%s:%d - about to block on grppollbuf lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ATH_GBUF_LOCK_CHECK(_sc)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */

View File

@ -880,8 +880,7 @@ static inline void
_trace_regop(struct ath_hal *ah, int regop, u_int address, u_int32_t value)
{
#ifdef AH_DEBUG
switch(ath_hal_debug)
{
switch (ath_hal_debug) {
case HAL_DEBUG_OFF:
break;
case HAL_DEBUG_REGOPS:

View File

@ -181,12 +181,12 @@ typedef unsigned long resource_size_t;
#define skb_end_pointer(_skb) ((_skb)->end)
#define skb_tail_pointer(_skb) ((_skb)->tail)
#define skb_set_network_header(_skb, _offset) \
do { (_skb)->nh.raw = (_skb)->data + (_offset); } while(0)
do { (_skb)->nh.raw = (_skb)->data + (_offset); } while (0)
#define skb_reset_network_header(_skb) \
do { (_skb)->nh.raw = (_skb)->data; } while(0)
do { (_skb)->nh.raw = (_skb)->data; } while (0)
#define skb_mac_header(_skb) ((_skb)->mac.raw)
#define skb_reset_mac_header(_skb) \
do { (_skb)->mac.raw = (_skb)->data; } while(0)
do { (_skb)->mac.raw = (_skb)->data; } while (0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)

View File

@ -529,7 +529,7 @@ ieee80211_beacon_update(struct ieee80211_node *ni,
* may manage memory */
skb_put(skb, sizeof(*csa_ie));
len_changed = 1;
} else if(csa_ie->csa_count)
} else if (csa_ie->csa_count)
csa_ie->csa_count--;
vap->iv_chanchange_count++;

View File

@ -145,7 +145,7 @@ typedef spinlock_t ieee80211com_lock_t;
#define IEEE80211_LOCK_CHECK(_ic) do { \
if (spin_is_locked(&(_ic)->ic_comlock)) \
printk("%s:%d - about to block on ieee80211com lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define IEEE80211_LOCK_CHECK(_ic)
#endif
@ -174,7 +174,7 @@ typedef spinlock_t ieee80211com_lock_t;
#define IEEE80211_VAPS_LOCK_CHECK(_ic) do { \
if (spin_is_locked(&(_ic)->ic_vapslock)) \
printk("%s:%d - about to block on ieee80211com_vaps lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define IEEE80211_VAPS_LOCK_CHECK(_ic)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -203,7 +203,7 @@ typedef spinlock_t ieee80211_node_lock_t;
#define IEEE80211_NODE_LOCK_IRQ_INSIDE(_tq) do { \
IEEE80211_NODE_LOCK_CHECK(_ni); \
spin_lock(&(_ni)->ni_nodelock);
} while(0)
} while (0)
#define IEEE80211_NODE_UNLOCK_IRQ_INSIDE(_tq) do { \
IEEE80211_NODE_LOCK_ASSERT(_ni); \
spin_unlock(&(_ni)->ni_nodelock); \
@ -220,7 +220,7 @@ typedef spinlock_t ieee80211_node_lock_t;
#define IEEE80211_NODE_LOCK_CHECK(_ni) do { \
if (spin_is_locked(&(_ni)->ni_nodelock)) \
printk("%s:%d - about to block on node lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define IEEE80211_NODE_LOCK_CHECK(_ni)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -294,7 +294,7 @@ typedef spinlock_t acl_lock_t;
#define ACL_UNLOCK(_as) \
ACL_LOCK_ASSERT(_as); \
spin_unlock(&(_as)->as_lock); \
} while(0)
} while (0)
#define ACL_UNLOCK_EARLY(_as) \
ACL_LOCK_ASSERT(_as); \
spin_unlock(&(_as)->as_lock);
@ -306,7 +306,7 @@ typedef spinlock_t acl_lock_t;
#define ACL_LOCK_CHECK(_as) do { \
if (spin_is_locked(&(_as)->as_lock)) \
printk("%s:%d - about to block on ACL lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define ACL_LOCK_CHECK(_as)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
@ -335,11 +335,11 @@ typedef spinlock_t acl_lock_t;
#define IEEE80211_NODE_SAVEQ_LOCK_IRQ_INSIDE(_ni) do { \
IEEE80211_NODE_SAVEQ_LOCK_CHECK(_ni); \
spin_lock(&(_ni)->ni_savedq.lock); \
} while(0)
} while (0)
#define IEEE80211_NODE_SAVEQ_UNLOCK_IRQ_INSIDE(_ni) do { \
IEEE80211_NODE_SAVEQ_LOCK_ASSERT(_ni); \
spin_unlock(&(_ni)->ni_savedq.lock); \
} while(0)
} while (0)
#define IEEE80211_NODE_SAVEQ_UNLOCK_IRQ_EARLY(_ni) \
IEEE80211_NODE_SAVEQ_LOCK_ASSERT(_ni); \
spin_unlock_irqrestore(&(_ni)->ni_savedq.lock, __qlockflags);
@ -352,7 +352,7 @@ typedef spinlock_t acl_lock_t;
#define IEEE80211_NODE_SAVEQ_LOCK_CHECK(_ni) do { \
if (spin_is_locked(&(_ni)->ni_savedq.lock)) \
printk("%s:%d - about to block on node saveq lock!\n", __func__, __LINE__); \
} while(0)
} while (0)
#else /* #if (defined(ATH_DEBUG_SPINLOCKS)) */
#define IEEE80211_NODE_SAVEQ_LOCK_CHECK(_ni)
#endif /* #if (defined(ATH_DEBUG_SPINLOCKS)) */

View File

@ -975,7 +975,7 @@ ieee80211_init(struct net_device *dev, int forcescan)
*/
if (IS_RUNNING(ic->ic_dev)) {
if (vap->iv_opmode == IEEE80211_M_STA) {
if(ic->ic_roaming != IEEE80211_ROAMING_MANUAL) {
if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) {
/* Try to be intelligent about clocking the
* state machine. If we're currently in RUN
* state then we should be able to apply any
@ -1763,9 +1763,9 @@ ieee80211_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int ar
case IEEE80211_S_SCAN:
switch (dstate) {
case IEEE80211_S_RUN:
if(vap->iv_opmode == IEEE80211_M_MONITOR ||
vap->iv_opmode == IEEE80211_M_WDS ||
vap->iv_opmode == IEEE80211_M_HOSTAP) {
if (vap->iv_opmode == IEEE80211_M_MONITOR ||
vap->iv_opmode == IEEE80211_M_WDS ||
vap->iv_opmode == IEEE80211_M_HOSTAP) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
"%s: Jumping directly to RUN "
"on VAP %p [%s].\n",
@ -1902,11 +1902,11 @@ ieee80211_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int ar
tmpvap->iv_nickname);
tmpvap->iv_flags_ext &=
~IEEE80211_FEXT_SCAN_PENDING;
if(tmpvap->iv_state !=
if (tmpvap->iv_state !=
IEEE80211_S_RUN) {
tmpvap->iv_newstate(tmpvap,
IEEE80211_S_RUN, 0);
} else if(tmpvap->iv_opmode ==
} else if (tmpvap->iv_opmode ==
IEEE80211_M_HOSTAP) {
/* Force other AP through
* -> INIT -> RUN to make

View File

@ -1053,7 +1053,7 @@ ieee80211_scan_dfs_action(struct ieee80211vap *vap,
if (!new_channel) {
/* Search for the first channel with no radar detected */
int n = 0;
for(n = 0; n < ic->ic_nchans; n++) {
for (n = 0; n < ic->ic_nchans; n++) {
if (0 == (ic->ic_channels[n].ic_flags &
IEEE80211_CHAN_RADAR)) {
new_channel = &ic->ic_channels[n];

View File

@ -839,7 +839,7 @@ pick_channel(struct ieee80211_scan_state *ss, struct ieee80211vap *vap,
continue;
/* Verify mode matches any fixed mode specified */
if((c->chan->ic_flags & as->as_required_mode) !=
if ((c->chan->ic_flags & as->as_required_mode) !=
as->as_required_mode)
continue;