Make pointer declarations and casting consistent. Some other formatting changes are made in passing

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3710 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mentor 2008-06-06 20:32:29 +00:00
parent 1a24cb141a
commit 76cade5dac
43 changed files with 459 additions and 459 deletions

View File

@ -166,10 +166,10 @@ static void ath_desc_free(struct ath_softc *);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
static struct ieee80211_node *ath_node_alloc_debug(struct ieee80211vap *, static struct ieee80211_node *ath_node_alloc_debug(struct ieee80211vap *,
const char* func, int line); const char *func, int line);
static void ath_node_cleanup_debug(struct ieee80211_node *, const char* func, static void ath_node_cleanup_debug(struct ieee80211_node *, const char *func,
int line); int line);
static void ath_node_free_debug(struct ieee80211_node *, const char* func, static void ath_node_free_debug(struct ieee80211_node *, const char *func,
int line); int line);
#else #else
static struct ieee80211_node *ath_node_alloc(struct ieee80211vap *); static struct ieee80211_node *ath_node_alloc(struct ieee80211vap *);
@ -243,7 +243,7 @@ static void ath_registers_dump(struct ieee80211com *ic);
static void ath_registers_dump_delta(struct ieee80211com *ic); static void ath_registers_dump_delta(struct ieee80211com *ic);
static void ath_registers_mark(struct ieee80211com *ic); static void ath_registers_mark(struct ieee80211com *ic);
static unsigned int ath_read_register(struct ieee80211com *ic, static unsigned int ath_read_register(struct ieee80211com *ic,
unsigned int address, unsigned int* value); unsigned int address, unsigned int *value);
static unsigned int ath_write_register(struct ieee80211com *ic, static unsigned int ath_write_register(struct ieee80211com *ic,
unsigned int address, unsigned int value); unsigned int address, unsigned int value);
static void ath_ar5212_registers_dump(struct ath_softc *sc); static void ath_ar5212_registers_dump(struct ath_softc *sc);
@ -280,7 +280,7 @@ static int ath_rcv_dev_event(struct notifier_block *, unsigned long, void *);
#define ath_return_txbuf(_sc, _pbuf) \ #define ath_return_txbuf(_sc, _pbuf) \
ath_return_txbuf_debug(_sc, _pbuf, __func__, __LINE__) ath_return_txbuf_debug(_sc, _pbuf, __func__, __LINE__)
static void ath_return_txbuf_debug(struct ath_softc *sc, struct ath_buf **buf, static void ath_return_txbuf_debug(struct ath_softc *sc, struct ath_buf **buf,
const char* func, int line); const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static void ath_return_txbuf(struct ath_softc *sc, struct ath_buf **buf); static void ath_return_txbuf(struct ath_softc *sc, struct ath_buf **buf);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -289,7 +289,7 @@ static void ath_return_txbuf(struct ath_softc *sc, struct ath_buf **buf);
#define ath_return_txbuf_locked(_sc, _pbuf) \ #define ath_return_txbuf_locked(_sc, _pbuf) \
ath_return_txbuf_locked_debug(_sc, _pbuf, __func__, __LINE__) ath_return_txbuf_locked_debug(_sc, _pbuf, __func__, __LINE__)
static void ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **buf, static void ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **buf,
const char* func, int line); const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static void ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf); static void ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -298,7 +298,7 @@ static void ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf);
#define ath_return_txbuf_list(_sc, _head) \ #define ath_return_txbuf_list(_sc, _head) \
ath_return_txbuf_list_debug(_sc, _head, __func__, __LINE__) ath_return_txbuf_list_debug(_sc, _head, __func__, __LINE__)
static void ath_return_txbuf_list_debug(struct ath_softc *sc, ath_bufhead *bfhead, static void ath_return_txbuf_list_debug(struct ath_softc *sc, ath_bufhead *bfhead,
const char* func, int line); const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static void ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead); static void ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -307,7 +307,7 @@ static void ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead);
#define ath_return_txbuf_list_locked(_sc, _head) \ #define ath_return_txbuf_list_locked(_sc, _head) \
ath_return_txbuf_list_locked_debug(_sc, _head, __func__, __LINE__) ath_return_txbuf_list_locked_debug(_sc, _head, __func__, __LINE__)
static void ath_return_txbuf_list_locked_debug(struct ath_softc *sc, ath_bufhead *bfhead, static void ath_return_txbuf_list_locked_debug(struct ath_softc *sc, ath_bufhead *bfhead,
const char* func, int line); const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static void ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead); static void ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -315,10 +315,10 @@ static void ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhe
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define cleanup_ath_buf(_sc, _buf, _dir) \ #define cleanup_ath_buf(_sc, _buf, _dir) \
cleanup_ath_buf_debug(_sc, _buf, _dir, __func__, __LINE__) cleanup_ath_buf_debug(_sc, _buf, _dir, __func__, __LINE__)
static struct ath_buf* cleanup_ath_buf_debug(struct ath_softc *sc, struct ath_buf *buf, static struct ath_buf *cleanup_ath_buf_debug(struct ath_softc *sc, struct ath_buf *buf,
int direction, const char* func, int line); int direction, const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static struct ath_buf* cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *buf, static struct ath_buf *cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *buf,
int direction); int direction);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -337,18 +337,18 @@ static void ath_set_txcont_rate(struct ieee80211com *ic, unsigned int new_rate);
/* 802.11h DFS support functions */ /* 802.11h DFS support functions */
static void ath_dfs_cac_completed(unsigned long); static void ath_dfs_cac_completed(unsigned long);
static void ath_interrupt_dfs_cac(struct ath_softc *sc, const char* reason); static void ath_interrupt_dfs_cac(struct ath_softc *sc, const char *reason);
static inline int ath_chan_unavail(struct ath_softc* sc); static inline int ath_chan_unavail(struct ath_softc *sc);
#define ath_cac_running_dbgmsg(_sc) \ #define ath_cac_running_dbgmsg(_sc) \
_ath_cac_running_dbgmsg((_sc), __func__) _ath_cac_running_dbgmsg((_sc), __func__)
#define ath_chan_unavail_dbgmsg(_sc) \ #define ath_chan_unavail_dbgmsg(_sc) \
_ath_chan_unavail_dbgmsg((_sc), __func__) _ath_chan_unavail_dbgmsg((_sc), __func__)
static inline int _ath_cac_running_dbgmsg(struct ath_softc *sc, static inline int _ath_cac_running_dbgmsg(struct ath_softc *sc,
const char* func); const char *func);
static inline int _ath_chan_unavail_dbgmsg(struct ath_softc *sc, static inline int _ath_chan_unavail_dbgmsg(struct ath_softc *sc,
const char* func); const char *func);
/* 802.11h DFS testing functions */ /* 802.11h DFS testing functions */
static int ath_get_dfs_testmode(struct ieee80211com *); static int ath_get_dfs_testmode(struct ieee80211com *);
@ -1598,14 +1598,14 @@ ath_vap_delete(struct ieee80211vap *vap)
void void
ath_suspend(struct net_device *dev) ath_suspend(struct net_device *dev)
{ {
DPRINTF(((struct ath_softc*)dev->priv), ATH_DEBUG_ANY, "flags=%x\n", dev->flags); DPRINTF(((struct ath_softc *)dev->priv), ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_stop(dev); ath_stop(dev);
} }
void void
ath_resume(struct net_device *dev) ath_resume(struct net_device *dev)
{ {
DPRINTF(((struct ath_softc*)dev->priv), ATH_DEBUG_ANY, "flags=%x\n", dev->flags); DPRINTF(((struct ath_softc *)dev->priv), ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_init(dev); ath_init(dev);
} }
@ -1640,7 +1640,7 @@ static inline void ath_override_intmit_if_disabled(struct ath_softc *sc) {
} }
} }
static HAL_BOOL ath_hw_reset(struct ath_softc* sc, HAL_OPMODE opmode, static HAL_BOOL ath_hw_reset(struct ath_softc *sc, HAL_OPMODE opmode,
HAL_CHANNEL *channel, HAL_BOOL bChannelChange, HAL_CHANNEL *channel, HAL_BOOL bChannelChange,
HAL_STATUS *status) HAL_STATUS *status)
{ {
@ -1725,14 +1725,14 @@ static HAL_BOOL ath_hw_reset(struct ath_softc* sc, HAL_OPMODE opmode,
/* Channel Availability Check is running, or a channel has already found to be /* Channel Availability Check is running, or a channel has already found to be
* unavailable. */ * unavailable. */
static int static int
ath_chan_unavail(struct ath_softc* sc) { ath_chan_unavail(struct ath_softc *sc) {
return sc->sc_dfs_cac || return sc->sc_dfs_cac ||
((sc->sc_curchan.privFlags & CHANNEL_DFS) && ((sc->sc_curchan.privFlags & CHANNEL_DFS) &&
(sc->sc_curchan.privFlags & CHANNEL_INTERFERENCE)); (sc->sc_curchan.privFlags & CHANNEL_INTERFERENCE));
} }
static inline int static inline int
_ath_cac_running_dbgmsg(struct ath_softc *sc, const char* func) { _ath_cac_running_dbgmsg(struct ath_softc *sc, const char *func) {
int b = sc->sc_dfs_cac; int b = sc->sc_dfs_cac;
if (b) if (b)
DPRINTF(sc, ATH_DEBUG_DOTH, DPRINTF(sc, ATH_DEBUG_DOTH,
@ -1742,7 +1742,7 @@ _ath_cac_running_dbgmsg(struct ath_softc *sc, const char* func) {
} }
static inline int static inline int
_ath_chan_unavail_dbgmsg(struct ath_softc *sc, const char* func) { _ath_chan_unavail_dbgmsg(struct ath_softc *sc, const char *func) {
int b = ath_chan_unavail(sc); int b = ath_chan_unavail(sc);
if (b) if (b)
DPRINTF(sc, ATH_DEBUG_DOTH, DPRINTF(sc, ATH_DEBUG_DOTH,
@ -1794,7 +1794,7 @@ ath_get_last_ds_link(struct ath_txq *txq) {
} }
static void static void
ath_intr_process_rx_descriptors(struct ath_softc *sc, int* pneedmark, u_int64_t hw_tsf) ath_intr_process_rx_descriptors(struct ath_softc *sc, int *pneedmark, u_int64_t hw_tsf)
{ {
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
struct ath_desc *ds; struct ath_desc *ds;
@ -1940,7 +1940,7 @@ ath_intr_process_rx_descriptors(struct ath_softc *sc, int* pneedmark, u_int64_t
bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr, bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr,
sizeof(struct ieee80211_qosframe), sizeof(struct ieee80211_qosframe),
BUS_DMA_FROMDEVICE); BUS_DMA_FROMDEVICE);
qwh = (struct ieee80211_qosframe *) skb->data; 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 || if (rs->rs_keyix == HAL_RXKEYIX_INVALID ||
@ -2475,7 +2475,7 @@ ath_intr(int irq, void *dev_id, struct pt_regs *regs)
ath_hal_intrset(ah, sc->sc_imask); ath_hal_intrset(ah, sc->sc_imask);
} }
/* Let the HAL handle the event.*/ /* Let the HAL handle the event. */
ath_hal_mibevent(ah, &sc->sc_halstats); ath_hal_mibevent(ah, &sc->sc_halstats);
ath_override_intmit_if_disabled(sc); ath_override_intmit_if_disabled(sc);
} }
@ -3171,7 +3171,7 @@ ath_get_buffer_count(const struct ath_softc *sc)
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
static static
struct ath_buf* struct ath_buf *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
_take_txbuf_locked_debug(struct ath_softc *sc, int for_management, _take_txbuf_locked_debug(struct ath_softc *sc, int for_management,
const char *func, int line) const char *func, int line)
@ -3179,7 +3179,7 @@ _take_txbuf_locked_debug(struct ath_softc *sc, int for_management,
_take_txbuf_locked(struct ath_softc *sc, int for_management) _take_txbuf_locked(struct ath_softc *sc, int for_management)
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
{ {
struct ath_buf* bf = NULL; struct ath_buf *bf = NULL;
ATH_TXBUF_LOCK_ASSERT(sc); ATH_TXBUF_LOCK_ASSERT(sc);
/* Reserve at least ATH_TXBUF_MGT_RESERVED buffers for management frames */ /* Reserve at least ATH_TXBUF_MGT_RESERVED buffers for management frames */
if (ath_get_buffers_available(sc) <= ATH_TXBUF_MGT_RESERVED) { if (ath_get_buffers_available(sc) <= ATH_TXBUF_MGT_RESERVED) {
@ -3231,14 +3231,14 @@ _take_txbuf_locked(struct ath_softc *sc, int for_management)
} }
static static
struct ath_buf* struct ath_buf *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
_take_txbuf_debug(struct ath_softc *sc, int for_management, _take_txbuf_debug(struct ath_softc *sc, int for_management,
const char *func, int line) { const char *func, int line) {
#else #else
_take_txbuf(struct ath_softc *sc, int for_management) { _take_txbuf(struct ath_softc *sc, int for_management) {
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
struct ath_buf* bf = NULL; struct ath_buf *bf = NULL;
ATH_TXBUF_LOCK_IRQ(sc); ATH_TXBUF_LOCK_IRQ(sc);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
bf = _take_txbuf_locked_debug(sc, for_management, func, line); bf = _take_txbuf_locked_debug(sc, for_management, func, line);
@ -3325,12 +3325,12 @@ ath_hardstart(struct sk_buff *__skb, struct net_device *dev)
struct ieee80211com *ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
struct ath_node *an; struct ath_node *an;
struct ath_txq *txq = NULL; struct ath_txq *txq = NULL;
struct sk_buff* skb = NULL; struct sk_buff *skb = NULL;
/* NB: NEVER free __skb, leave it alone and use original_skb instead! /* NB: NEVER free __skb, leave it alone and use original_skb instead!
* IF original_skb is NULL it means the ownership was taken! * IF original_skb is NULL it means the ownership was taken!
* *** ALWAYS *** free any skb != __skb when cleaning up - unless it was * *** ALWAYS *** free any skb != __skb when cleaning up - unless it was
* taken. */ * taken. */
struct sk_buff* original_skb = __skb; /* ALWAYS FREE THIS ONE!!! */ struct sk_buff *original_skb = __skb; /* ALWAYS FREE THIS ONE!!! */
int ff_flush; int ff_flush;
#endif #endif
ieee80211_skb_track(original_skb); ieee80211_skb_track(original_skb);
@ -5762,7 +5762,7 @@ ath_desc_free(struct ath_softc *sc)
static struct ieee80211_node * static struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_node_alloc_debug(struct ieee80211vap *vap, const char* func, int line) ath_node_alloc_debug(struct ieee80211vap *vap, const char *func, int line)
#else #else
ath_node_alloc(struct ieee80211vap *vap) ath_node_alloc(struct ieee80211vap *vap)
#endif #endif
@ -5793,7 +5793,7 @@ ath_node_alloc(struct ieee80211vap *vap)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_node_cleanup_debug(struct ieee80211_node *ni, const char* func, int line) ath_node_cleanup_debug(struct ieee80211_node *ni, const char *func, int line)
#else #else
ath_node_cleanup(struct ieee80211_node *ni) ath_node_cleanup(struct ieee80211_node *ni)
#endif #endif
@ -5851,7 +5851,7 @@ ath_node_cleanup(struct ieee80211_node *ni)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_node_free_debug(struct ieee80211_node *ni, const char* func, int line) ath_node_free_debug(struct ieee80211_node *ni, const char *func, int line)
#else #else
ath_node_free(struct ieee80211_node *ni) ath_node_free(struct ieee80211_node *ni)
#endif #endif
@ -6207,7 +6207,7 @@ static struct sk_buff *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ath_alloc_skb(_size, _align) \ #define ath_alloc_skb(_size, _align) \
ath_alloc_skb_debug(_size, _align, __func__, __LINE__) ath_alloc_skb_debug(_size, _align, __func__, __LINE__)
ath_alloc_skb_debug(u_int size, u_int align, const char* func, int line) ath_alloc_skb_debug(u_int size, u_int align, const char *func, int line)
#else #else
ath_alloc_skb(u_int size, u_int align) ath_alloc_skb(u_int size, u_int align)
#endif #endif
@ -8098,8 +8098,10 @@ ath_tx_start(struct net_device *dev, struct ieee80211_node *ni,
ath_desc_swap(ds); ath_desc_swap(ds);
DPRINTF(sc, ATH_DEBUG_XMIT, "Q%d: %08x %08x %08x %08x %08x %08x\n", DPRINTF(sc, ATH_DEBUG_XMIT, "Q%d: %08x %08x %08x %08x %08x %08x\n",
M_FLAG_GET(skb, M_UAPSD) ? 0 : txq->axq_qnum, ds->ds_link, ds->ds_data, M_FLAG_GET(skb, M_UAPSD) ? 0 : txq->axq_qnum,
ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1]); ds->ds_link, ds->ds_data,
ds->ds_ctl0, ds->ds_ctl1,
ds->ds_hw[0], ds->ds_hw[1]);
#else /* ATH_SUPERG_FF */ #else /* ATH_SUPERG_FF */
{ {
struct sk_buff *tskb; struct sk_buff *tskb;
@ -8934,7 +8936,7 @@ ath_calibrate(unsigned long arg)
} }
/* Update calibration interval based on whether I gain and Q /* Update calibration interval based on whether I gain and Q
* gain adjustments completed.*/ * gain adjustments completed. */
sc->sc_calinterval_sec = (isIQdone == AH_TRUE) ? sc->sc_calinterval_sec = (isIQdone == AH_TRUE) ?
ATH_LONG_CALINTERVAL_SECS : ATH_LONG_CALINTERVAL_SECS :
ATH_SHORT_CALINTERVAL_SECS; ATH_SHORT_CALINTERVAL_SECS;
@ -11389,7 +11391,7 @@ ath_sysctl_unregister(void)
unregister_sysctl_table(ath_sysctl_header); unregister_sysctl_table(ath_sysctl_header);
} }
static const char* static const char *
ath_get_hal_status_desc(HAL_STATUS status) ath_get_hal_status_desc(HAL_STATUS status)
{ {
if ((status > 0) && (status < (sizeof(hal_status_desc) / if ((status > 0) && (status < (sizeof(hal_status_desc) /
@ -11708,7 +11710,7 @@ txcont_configure_radio(struct ieee80211com *ic)
/* Queue a self-looped packet for the specified hardware queue. */ /* Queue a self-looped packet for the specified hardware queue. */
static void static void
txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq) txcont_queue_packet(struct ieee80211com *ic, struct ath_txq *txq)
{ {
struct net_device *dev = ic->ic_dev; struct net_device *dev = ic->ic_dev;
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
@ -11718,7 +11720,7 @@ txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq)
unsigned int i; unsigned int i;
/* maximum supported size, subtracting headers and required slack */ /* maximum supported size, subtracting headers and required slack */
unsigned int datasz = 4028; unsigned int datasz = 4028;
struct ieee80211_frame* wh = NULL; struct ieee80211_frame *wh = NULL;
unsigned char *data = NULL; unsigned char *data = NULL;
unsigned char *crc = NULL; unsigned char *crc = NULL;
@ -11738,7 +11740,7 @@ txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq)
EPRINTF(sc, "alloc_skb(...) returned null!\n"); EPRINTF(sc, "alloc_skb(...) returned null!\n");
BUG(); BUG();
} }
wh = (struct ieee80211_frame*)skb_put(skb, wh = (struct ieee80211_frame *)skb_put(skb,
sizeof(struct ieee80211_frame)); sizeof(struct ieee80211_frame));
if (NULL == bf) { if (NULL == bf) {
EPRINTF(sc, "ath_take_txbuf(sc) returned null!\n"); EPRINTF(sc, "ath_take_txbuf(sc) returned null!\n");
@ -12065,7 +12067,7 @@ ath_dump_hal_map(struct ieee80211com *ic)
* then we call this to stop the behavior before we take the rest of the * then we call this to stop the behavior before we take the rest of the
* necessary actions (such as a DFS reaction to radar). */ * necessary actions (such as a DFS reaction to radar). */
static void static void
ath_interrupt_dfs_cac(struct ath_softc *sc, const char* reason) ath_interrupt_dfs_cac(struct ath_softc *sc, const char *reason)
{ {
struct timeval tv; struct timeval tv;
@ -12097,9 +12099,9 @@ ath_interrupt_dfs_cac(struct ath_softc *sc, const char* reason)
* implementing AP requested mute tests in station mode later. */ * implementing AP requested mute tests in station mode later. */
void void
ath_radar_detected(struct ath_softc *sc, const char* cause) { ath_radar_detected(struct ath_softc *sc, const char *cause) {
struct ath_hal* ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
struct ieee80211com* ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211_channel ichan; struct ieee80211_channel ichan;
struct timeval tv; struct timeval tv;
@ -12252,7 +12254,7 @@ ath_ar5212_registers_dump_delta(struct ath_softc *sc)
if (ath_regdump_filter(sc, address)) if (ath_regdump_filter(sc, address))
continue; continue;
value = ath_reg_read(sc, address); value = ath_reg_read(sc, address);
p_old = (unsigned int*)&sc->register_snapshot[address]; p_old = (unsigned int *)&sc->register_snapshot[address];
if (*p_old != value) { if (*p_old != value) {
ath_hal_print_decoded_register(sc->sc_ah, SC_DEV_NAME(sc), ath_hal_print_decoded_register(sc->sc_ah, SC_DEV_NAME(sc),
address, *p_old, value, AH_FALSE); address, *p_old, value, AH_FALSE);
@ -12271,7 +12273,7 @@ ath_ar5212_registers_mark(struct ath_softc *sc)
unsigned int address = MIN_REGISTER_ADDRESS; unsigned int address = MIN_REGISTER_ADDRESS;
do { do {
*((unsigned int*)&sc->register_snapshot[address]) = *((unsigned int *)&sc->register_snapshot[address]) =
ath_regdump_filter(sc, address) ? ath_regdump_filter(sc, address) ?
0x0 : ath_reg_read(sc, address); 0x0 : ath_reg_read(sc, address);
} while ((address += 4) < MAX_REGISTER_ADDRESS); } while ((address += 4) < MAX_REGISTER_ADDRESS);
@ -12282,7 +12284,7 @@ ath_ar5212_registers_mark(struct ath_softc *sc)
#ifdef ATH_REVERSE_ENGINEERING #ifdef ATH_REVERSE_ENGINEERING
static unsigned int static unsigned int
ath_read_register(struct ieee80211com *ic, unsigned int address, ath_read_register(struct ieee80211com *ic, unsigned int address,
unsigned int* value) unsigned int *value)
{ {
struct ath_softc *sc = ic->ic_dev->priv; struct ath_softc *sc = ic->ic_dev->priv;
if (address >= MAX_REGISTER_ADDRESS) { if (address >= MAX_REGISTER_ADDRESS) {
@ -12375,7 +12377,7 @@ ath_registers_dump_delta(struct ieee80211com *ic)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **bf, ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **bf,
const char* func, int line) const char *func, int line)
#else #else
ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **bf) ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **bf)
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -12422,7 +12424,7 @@ ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **bf)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_debug(struct ath_softc *sc, struct ath_buf **bf, ath_return_txbuf_debug(struct ath_softc *sc, struct ath_buf **bf,
const char* func, int line) const char *func, int line)
#else #else
ath_return_txbuf(struct ath_softc *sc, struct ath_buf **bf) ath_return_txbuf(struct ath_softc *sc, struct ath_buf **bf)
#endif #endif
@ -12440,7 +12442,7 @@ ath_return_txbuf(struct ath_softc *sc, struct ath_buf **bf)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_list_debug(struct ath_softc *sc, ath_bufhead *bfhead, ath_return_txbuf_list_debug(struct ath_softc *sc, ath_bufhead *bfhead,
const char* func, int line) const char *func, int line)
#else #else
ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead) ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead)
#endif #endif
@ -12449,9 +12451,8 @@ ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead)
return; return;
ATH_TXBUF_LOCK_IRQ(sc); ATH_TXBUF_LOCK_IRQ(sc);
if (!STAILQ_EMPTY(bfhead)) { if (!STAILQ_EMPTY(bfhead)) {
struct ath_buf* tbf; struct ath_buf *tbf, *nextbf;
struct ath_buf* tempbf; STAILQ_FOREACH_SAFE(tbf, bfhead, bf_list, nextbf) {
STAILQ_FOREACH_SAFE(tbf, bfhead, bf_list, tempbf) {
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_locked_debug(sc, &tbf, func, line); ath_return_txbuf_locked_debug(sc, &tbf, func, line);
#else #else
@ -12466,7 +12467,7 @@ ath_return_txbuf_list(struct ath_softc *sc, ath_bufhead *bfhead)
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_list_locked_debug(struct ath_softc *sc, ath_bufhead *bfhead, ath_return_txbuf_list_locked_debug(struct ath_softc *sc, ath_bufhead *bfhead,
const char* func, int line) const char *func, int line)
#else #else
ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead) ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead)
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -12476,9 +12477,8 @@ ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead)
return; return;
if (!STAILQ_EMPTY(bfhead)) { if (!STAILQ_EMPTY(bfhead)) {
struct ath_buf* tbf; struct ath_buf *tbf, *nextbf;
struct ath_buf* tempbf; STAILQ_FOREACH_SAFE(tbf, bfhead, bf_list, nextbf) {
STAILQ_FOREACH_SAFE(tbf, bfhead, bf_list, tempbf) {
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ath_return_txbuf_locked_debug(sc, &tbf, func, line); ath_return_txbuf_locked_debug(sc, &tbf, func, line);
#else #else
@ -12489,10 +12489,10 @@ ath_return_txbuf_list_locked(struct ath_softc *sc, ath_bufhead *bfhead)
STAILQ_INIT(bfhead); STAILQ_INIT(bfhead);
} }
static struct ath_buf* static struct ath_buf *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
cleanup_ath_buf_debug(struct ath_softc *sc, struct ath_buf *bf, int direction, cleanup_ath_buf_debug(struct ath_softc *sc, struct ath_buf *bf, int direction,
const char* func, int line) const char *func, int line)
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *bf, int direction) cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *bf, int direction)
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -12515,9 +12515,9 @@ cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *bf, int direction)
#ifdef ATH_SUPERG_FF #ifdef ATH_SUPERG_FF
{ {
unsigned int i = 0; unsigned int i = 0;
struct sk_buff* next_ffskb = NULL; struct sk_buff *next_ffskb = NULL;
/* Start with the second skb for FF */ /* Start with the second skb for FF */
struct sk_buff* ffskb = bf->bf_skb ? struct sk_buff *ffskb = bf->bf_skb ?
bf->bf_skb->next : NULL; bf->bf_skb->next : NULL;
while (ffskb) { while (ffskb) {
next_ffskb = ffskb->next; next_ffskb = ffskb->next;
@ -12555,20 +12555,20 @@ cleanup_ath_buf(struct ath_softc *sc, struct ath_buf *bf, int direction)
#define SCANTXBUF_NAMSIZ 64 #define SCANTXBUF_NAMSIZ 64
static inline int static inline int
descdma_contains_buffer(struct ath_descdma* dd, struct ath_buf* bf) { descdma_contains_buffer(struct ath_descdma *dd, struct ath_buf *bf) {
return (bf >= (dd->dd_bufptr)) && return (bf >= (dd->dd_bufptr)) &&
bf < (dd->dd_bufptr + dd->dd_nbuf); bf < (dd->dd_bufptr + dd->dd_nbuf);
} }
static inline int static inline int
descdma_index_of_buffer(struct ath_descdma* dd, struct ath_buf* bf) { descdma_index_of_buffer(struct ath_descdma *dd, struct ath_buf *bf) {
if (!descdma_contains_buffer(dd, bf)) if (!descdma_contains_buffer(dd, bf))
return -1; return -1;
return bf - dd->dd_bufptr; return bf - dd->dd_bufptr;
} }
static inline struct ath_buf* static inline struct ath_buf *
descdma_get_buffer(struct ath_descdma* dd, int index) descdma_get_buffer(struct ath_descdma *dd, int index)
{ {
KASSERT((index >= 0 && index < dd->dd_nbuf), KASSERT((index >= 0 && index < dd->dd_nbuf),
("Invalid index, %d, requested for %s dma buffers.\n", index, dd->dd_name)); ("Invalid index, %d, requested for %s dma buffers.\n", index, dd->dd_name));
@ -12633,9 +12633,9 @@ static int ath_debug_iwpriv(struct ieee80211com *ic,
} }
static void static void
ath_scanbufs_found_buf_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_found_buf_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found, struct ath_buf *tbf, unsigned long *dd_bufs_found, struct ath_buf *tbf,
const char* context) const char *context)
{ {
int index = descdma_index_of_buffer(dd, tbf); int index = descdma_index_of_buffer(dd, tbf);
if (-1 != index) { if (-1 != index) {
@ -12657,9 +12657,9 @@ ath_scanbufs_found_buf_locked(struct ath_softc *sc, struct ath_descdma* dd,
} }
static void static void
ath_scanbufs_in_buflist_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_in_buflist_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found, ath_bufhead *bufs, unsigned long *dd_bufs_found, ath_bufhead *bufs,
const char* context) const char *context)
{ {
struct ath_buf *tbf; struct ath_buf *tbf;
STAILQ_FOREACH(tbf, bufs, bf_list) { STAILQ_FOREACH(tbf, bufs, bf_list) {
@ -12669,9 +12669,9 @@ ath_scanbufs_in_buflist_locked(struct ath_softc *sc, struct ath_descdma* dd,
} }
static void static void
ath_scanbufs_in_txq_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_in_txq_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found, struct ath_txq* txq, unsigned long *dd_bufs_found, struct ath_txq *txq,
const char* context) const char *context)
{ {
struct ath_buf *tbf; struct ath_buf *tbf;
char sacontext[SCANTXBUF_NAMSIZ]; char sacontext[SCANTXBUF_NAMSIZ];
@ -12689,8 +12689,8 @@ ath_scanbufs_in_txq_locked(struct ath_softc *sc, struct ath_descdma* dd,
} }
static void static void
ath_scanbufs_in_vap_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_in_vap_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found, struct ath_vap *av) unsigned long *dd_bufs_found, struct ath_vap *av)
{ {
char context[SCANTXBUF_NAMSIZ]; char context[SCANTXBUF_NAMSIZ];
if (av->av_bcbuf && dd == &sc->sc_bdma) { if (av->av_bcbuf && dd == &sc->sc_bdma) {
@ -12725,8 +12725,8 @@ ath_scanbufs_in_vap_locked(struct ath_softc *sc, struct ath_descdma* dd,
} }
static void static void
ath_scanbufs_in_all_vaps_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_in_all_vaps_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found) unsigned long *dd_bufs_found)
{ {
struct ieee80211vap *vap; struct ieee80211vap *vap;
TAILQ_FOREACH(vap, &sc->sc_ic.ic_vaps, iv_next) { TAILQ_FOREACH(vap, &sc->sc_ic.ic_vaps, iv_next) {
@ -12735,8 +12735,8 @@ ath_scanbufs_in_all_vaps_locked(struct ath_softc *sc, struct ath_descdma* dd,
} }
static void static void
ath_scanbufs_in_all_nodetable_locked(struct ath_softc *sc, struct ath_descdma* dd, ath_scanbufs_in_all_nodetable_locked(struct ath_softc *sc, struct ath_descdma *dd,
unsigned long* dd_bufs_found, unsigned long *dd_bufs_found,
struct ieee80211_node_table *nt) struct ieee80211_node_table *nt)
{ {
struct ieee80211_node *node = NULL; struct ieee80211_node *node = NULL;
@ -12768,8 +12768,8 @@ ath_scanbufs_in_all_nodetable_locked(struct ath_softc *sc, struct ath_descdma* d
static void static void
ath_scanbufs_in_all_hwtxq_locked(struct ath_softc *sc, ath_scanbufs_in_all_hwtxq_locked(struct ath_softc *sc,
struct ath_descdma* dd, struct ath_descdma *dd,
unsigned long* dd_bufs_found) unsigned long *dd_bufs_found)
{ {
int q = HAL_NUM_TX_QUEUES; int q = HAL_NUM_TX_QUEUES;
char context[SCANTXBUF_NAMSIZ]; char context[SCANTXBUF_NAMSIZ];
@ -12782,8 +12782,8 @@ ath_scanbufs_in_all_hwtxq_locked(struct ath_softc *sc,
} }
static void static void
ath_scanbufs_print_leaks(struct ath_softc *sc, ath_scanbufs_print_leaks(struct ath_softc *sc,
struct ath_descdma* dd, struct ath_descdma *dd,
unsigned long* dd_bufs_found) unsigned long *dd_bufs_found)
{ {
int index; int index;
struct ath_buf *lostbf; struct ath_buf *lostbf;
@ -12812,13 +12812,13 @@ ath_scanbufs(struct ath_softc *sc)
/* Set up a list of dma areas to scan for. Unfortunately the locks /* Set up a list of dma areas to scan for. Unfortunately the locks
* are all external to this, so they were specified above with the * are all external to this, so they were specified above with the
* standard lock macros... */ * standard lock macros... */
struct ath_descdma* descdma[] = { struct ath_descdma *descdma[] = {
&sc->sc_txdma, &sc->sc_txdma,
&sc->sc_rxdma, &sc->sc_rxdma,
&sc->sc_bdma, &sc->sc_bdma,
&sc->sc_grppolldma &sc->sc_grppolldma
}; };
struct ath_descdma* dd; struct ath_descdma *dd;
unsigned long *dd_bufs_found; unsigned long *dd_bufs_found;
/* NB: Locking sequence is critical to avoid deadlocks !!! */ /* NB: Locking sequence is critical to avoid deadlocks !!! */

View File

@ -74,7 +74,7 @@ ahb_enable_wmac(u_int16_t devid, u_int16_t wlanNum)
if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) || if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) { ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) {
u_int32_t reg; u_int32_t reg;
u_int32_t *en = (u_int32_t *) AR5315_AHB_ARB_CTL; u_int32_t *en = (u_int32_t *)AR5315_AHB_ARB_CTL;
KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum)); KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum));
@ -135,7 +135,7 @@ ahb_disable_wmac(u_int16_t devid, u_int16_t wlanNum)
u_int32_t enable; u_int32_t enable;
if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) || if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) { ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) {
u_int32_t *en = (u_int32_t *) AR5315_AHB_ARB_CTL; u_int32_t *en = (u_int32_t *)AR5315_AHB_ARB_CTL;
KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum)); KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum));
@ -229,7 +229,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config)
goto bad3; goto bad3;
} }
dev->mem_end = dev->mem_start + AR531X_WLANX_LEN; dev->mem_end = dev->mem_start + AR531X_WLANX_LEN;
sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start; sc->aps_sc.sc_iobase = (void __iomem *)dev->mem_start;
sc->aps_sc.sc_bdev = NULL; sc->aps_sc.sc_bdev = NULL;
if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) { if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) {
@ -264,7 +264,7 @@ static int ahb_wmac_probe(struct platform_device *pdev)
u_int16_t devid; u_int16_t devid;
struct ar531x_config *config; struct ar531x_config *config;
config = (struct ar531x_config *) pdev->dev.platform_data; config = (struct ar531x_config *)pdev->dev.platform_data;
devid = (long) config->tag; devid = (long) config->tag;
config->tag = NULL; config->tag = NULL;
@ -274,7 +274,7 @@ static int ahb_wmac_probe(struct platform_device *pdev)
static int ahb_wmac_remove(struct platform_device *pdev) static int ahb_wmac_remove(struct platform_device *pdev)
{ {
exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data); exit_ath_wmac(pdev->id, (struct ar531x_config *)pdev->dev.platform_data);
return 0; return 0;
} }

View File

@ -125,10 +125,10 @@
#define DEFAULT_ENABLE_AR5K_PHY_WEAK_OFDM_11A 1 #define DEFAULT_ENABLE_AR5K_PHY_WEAK_OFDM_11A 1
#define IS_CHAN_ANY(ah) \ #define IS_CHAN_ANY(ah) \
(((struct ieee80211com*)ah->ah_sc)->ic_bsschan == IEEE80211_CHAN_ANYC) (((struct ieee80211com *)ah->ah_sc)->ic_bsschan == IEEE80211_CHAN_ANYC)
#define IS_BG_OR_ANY(ah) \ #define IS_BG_OR_ANY(ah) \
(IS_CHAN_ANY(ah) || (!(ieee80211_chan2mode(((struct ieee80211com*)ah->ah_sc)->ic_bsschan) & \ (IS_CHAN_ANY(ah) || (!(ieee80211_chan2mode(((struct ieee80211com *)ah->ah_sc)->ic_bsschan) & \
(IEEE80211_MODE_11A | IEEE80211_MODE_TURBO_A)))) (IEEE80211_MODE_11A | IEEE80211_MODE_TURBO_A))))
#define DEFAULT_ENABLE_AR5K_PHY_WEAK_OFDM (IS_BG_OR_ANY(ah) ? \ #define DEFAULT_ENABLE_AR5K_PHY_WEAK_OFDM (IS_BG_OR_ANY(ah) ? \
@ -167,7 +167,7 @@
#define AR5K_STA_ID1_NO_KEYSRCH 0x00080000 /* No key search */ #define AR5K_STA_ID1_NO_KEYSRCH 0x00080000 /* No key search */
#define AR5K_STA_ID1_NO_PSPOLL 0x00100000 /* No power save polling [5210] */ #define AR5K_STA_ID1_NO_PSPOLL 0x00100000 /* No power save polling [5210] */
#define AR5K_STA_ID1_PCF_5211 0x00100000 /* Enable PCF on [5211+] */ #define AR5K_STA_ID1_PCF_5211 0x00100000 /* Enable PCF on [5211+] */
#define AR5K_STA_ID1_PCF_5210 0x00200000 /* Enable PCF on [5210]*/ #define AR5K_STA_ID1_PCF_5210 0x00200000 /* Enable PCF on [5210] */
#define AR5K_STA_ID1_PCF (ah->ah_version == AR5K_AR5210 ? \ #define AR5K_STA_ID1_PCF (ah->ah_version == AR5K_AR5210 ? \
AR5K_STA_ID1_PCF_5210 : AR5K_STA_ID1_PCF_5211) AR5K_STA_ID1_PCF_5210 : AR5K_STA_ID1_PCF_5211)
#define AR5K_STA_ID1_DEFAULT_ANTENNA 0x00200000 /* Use default antenna */ #define AR5K_STA_ID1_DEFAULT_ANTENNA 0x00200000 /* Use default antenna */
@ -238,7 +238,7 @@ enum ath5k_dmasize {
}; };
int ath_set_ack_bitrate(struct ath_softc* sc, int); int ath_set_ack_bitrate(struct ath_softc *sc, int);
int ar_device(int devid); int ar_device(int devid);
const char * ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val); const char * ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val);
@ -280,7 +280,7 @@ static inline u_int32_t field_eq(struct ath_hal *ah, u_int32_t reg,
(value & (mask >> shift)); (value & (mask >> shift));
} }
static inline void override_warning(struct ath_hal *ah, const char* name, static inline void override_warning(struct ath_hal *ah, const char *name,
u_int32_t reg, u_int32_t mask, u_int32_t reg, u_int32_t mask,
u_int32_t shift, u_int32_t expected, int is_signed) { u_int32_t shift, u_int32_t expected, int is_signed) {
@ -305,7 +305,7 @@ static inline void override_warning(struct ath_hal *ah, const char* name,
#endif #endif
} }
static inline void verification_warning(struct ath_hal *ah, const char* name, static inline void verification_warning(struct ath_hal *ah, const char *name,
u_int32_t reg, u_int32_t mask, u_int32_t reg, u_int32_t mask,
u_int32_t shift, u_int32_t expected, int is_signed) { u_int32_t shift, u_int32_t expected, int is_signed) {

View File

@ -210,7 +210,7 @@ ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
sc->aps_sc.sc_bdev = (void *) pdev; sc->aps_sc.sc_bdev = (void *)pdev;
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);

View File

@ -363,7 +363,7 @@ static struct ath_rp *pulse_prev(struct ath_rp *pulse)
#define MR_FAIL_MAX_PERIOD 5 #define MR_FAIL_MAX_PERIOD 5
#ifdef AR_DEBUG #ifdef AR_DEBUG
static const char* get_match_result_desc(u_int32_t code) { static const char *get_match_result_desc(u_int32_t code) {
switch (code) { switch (code) {
case MR_MATCH: case MR_MATCH:
return "MATCH"; return "MATCH";
@ -534,7 +534,7 @@ static void rp_analyze_long_pulse_bscan(
struct ath_rp *last_pulse, struct ath_rp *last_pulse,
u_int32_t *num_bursts, u_int32_t *num_bursts,
size_t bursts_buflen, size_t bursts_buflen,
struct lp_burst* bursts) struct lp_burst *bursts)
{ {
int i = 0; int i = 0;
struct ath_rp *newer = NULL; struct ath_rp *newer = NULL;
@ -566,7 +566,7 @@ static void rp_analyze_long_pulse_bscan(
tsf_delta -= tsf_adjustment; tsf_delta -= tsf_adjustment;
} }
/* If we are in range for pulse, assume it is a pulse*/ /* If we are in range for pulse, assume it is a pulse. */
if ((tsf_delta >= LP_MIN_PRI) && (tsf_delta <= LP_MAX_PRI)) { if ((tsf_delta >= LP_MIN_PRI) && (tsf_delta <= LP_MAX_PRI)) {
bursts[waveform_num_bursts].lpb_num_pulses++; bursts[waveform_num_bursts].lpb_num_pulses++;
bursts[waveform_num_bursts].lpb_min_possible_tsf = bursts[waveform_num_bursts].lpb_min_possible_tsf =
@ -617,9 +617,9 @@ static void rp_analyze_long_pulse_bscan(
static HAL_BOOL rp_analyze_long_pulse( static HAL_BOOL rp_analyze_long_pulse(
struct ath_softc *sc, struct ath_rp *last_pulse, struct ath_softc *sc, struct ath_rp *last_pulse,
u_int32_t* bc, u_int32_t *bc,
u_int32_t* matched, u_int32_t* missed, u_int32_t *matched, u_int32_t *missed,
u_int32_t* noise, u_int32_t* pulses) u_int32_t *noise, u_int32_t *pulses)
{ {
int i; int i;
int32_t found_radar = 0; int32_t found_radar = 0;
@ -824,7 +824,7 @@ static HAL_BOOL rp_analyse_short_pulse(
* pulse, ie t0_min - PERIOD * BURST_MAX * pulse, ie t0_min - PERIOD * BURST_MAX
* *
* - on this timescale, we matched the number of hit/missed using T - * - on this timescale, we matched the number of hit/missed using T -
* PERIOD*n taking into account the 2% error margin (using * PERIOD * n taking into account the 2% error margin (using
* min_rep_int, max_rep_int) * min_rep_int, max_rep_int)
* *
* At the end, we have a number of pulse hit for each PRF * At the end, we have a number of pulse hit for each PRF
@ -1226,7 +1226,7 @@ static u_int32_t interval_to_frequency(u_int32_t interval)
#endif /* AR_DEBUG */ #endif /* AR_DEBUG */
#ifdef ATH_RADAR_LONG_PULSE #ifdef ATH_RADAR_LONG_PULSE
static const char* get_longpulse_desc(int lp) { static const char *get_longpulse_desc(int lp) {
switch (lp) { switch (lp) {
case 8: return "FCC [5, 8 pulses]"; case 8: return "FCC [5, 8 pulses]";
case 9: return "FCC [5, 9 pulses]"; case 9: return "FCC [5, 9 pulses]";
@ -1521,7 +1521,7 @@ static void ath_rp_clear(struct ath_softc *sc)
static void ath_rp_tasklet(TQUEUE_ARG data) static void ath_rp_tasklet(TQUEUE_ARG data)
{ {
struct net_device *dev = (struct net_device *) data; struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
if (sc->sc_rp_analyse != NULL) if (sc->sc_rp_analyse != NULL)

View File

@ -157,12 +157,12 @@ int ath_radar_update(struct ath_softc *sc);
/* Returns true if radar detection is enabled. */ /* Returns true if radar detection is enabled. */
int ath_radar_is_enabled(struct ath_softc *sc); int ath_radar_is_enabled(struct ath_softc *sc);
/* Read the radar pulse detection parameters. */ /* Read the radar pulse detection parameters. */
void ath_radar_get_params(struct ath_softc *sc, RADAR_PARAM* rp); void ath_radar_get_params(struct ath_softc *sc, RADAR_PARAM *rp);
/* Update the radar pulse detection parameters. /* Update the radar pulse detection parameters.
* If rp is NULL, defaults are used for all fields. * If rp is NULL, defaults are used for all fields.
* If any member of rp is set to RADAR_PARAM_USE_DEFAULT, the default * If any member of rp is set to RADAR_PARAM_USE_DEFAULT, the default
* is used for that field. */ * is used for that field. */
void ath_radar_set_params(struct ath_softc *sc, RADAR_PARAM* rp); void ath_radar_set_params(struct ath_softc *sc, RADAR_PARAM *rp);
/* Update channel's DFS flags based upon whether DFS is reqired */ /* Update channel's DFS flags based upon whether DFS is reqired */
int ath_radar_correct_dfs_flags(struct ath_softc *sc, HAL_CHANNEL *hchan); int ath_radar_correct_dfs_flags(struct ath_softc *sc, HAL_CHANNEL *hchan);
/* Returns true if DFS is required for the regulatory domain, country and /* Returns true if DFS is required for the regulatory domain, country and

View File

@ -86,8 +86,8 @@ typedef void *TQUEUE_ARG;
#define flush_scheduled_work() flush_scheduled_tasks() #define flush_scheduled_work() flush_scheduled_tasks()
#define ATH_INIT_WORK(t, f) do { \ #define ATH_INIT_WORK(t, f) do { \
memset((t), 0, sizeof(struct tq_struct)); \ memset((t), 0, sizeof(struct tq_struct)); \
(t)->routine = (void (*)(void*)) (f); \ (t)->routine = (void (*)(void *)) (f); \
(t)->data=(void *) (t); \ (t)->data = (void *)(t); \
} while (0) } while (0)
#else #else
#include <linux/workqueue.h> #include <linux/workqueue.h>
@ -146,7 +146,7 @@ static inline struct net_device *_alloc_netdev(int sizeof_priv, const char *mask
} }
if (sizeof_priv) if (sizeof_priv)
dev->priv = (void *) (((long)(dev + 1) + 31) & ~31); dev->priv = (void *)(((long)(dev + 1) + 31) & ~31);
setup(dev); setup(dev);
strcpy(dev->name, mask); strcpy(dev->name, mask);
@ -440,7 +440,7 @@ struct ath_buf {
struct ath_desc_status bf_dsstatus; /* tx/rx descriptor status */ struct ath_desc_status bf_dsstatus; /* tx/rx descriptor status */
dma_addr_t bf_daddr; /* physical addr of desc */ dma_addr_t bf_daddr; /* physical addr of desc */
struct sk_buff *bf_skb; /* skbuff for buf */ struct sk_buff *bf_skb; /* skbuff for buf */
dma_addr_t bf_skbaddr; /* physical addr of skb data - always used by one desc*/ dma_addr_t bf_skbaddr; /* physical addr of skb data - always used by one desc */
u_int32_t bf_status; /* status flags */ u_int32_t bf_status; /* status flags */
u_int16_t bf_flags; /* tx descriptor flags */ u_int16_t bf_flags; /* tx descriptor flags */
u_int64_t bf_tsf; u_int64_t bf_tsf;
@ -454,7 +454,7 @@ struct ath_buf {
dma_addr_t bf_skbaddrff[ATH_TXDESC - 1]; /* extra addrs for FF */ dma_addr_t bf_skbaddrff[ATH_TXDESC - 1]; /* extra addrs for FF */
#endif #endif
int bf_taken_at_line; /* XXX: Want full alloc backtrace */ int bf_taken_at_line; /* XXX: Want full alloc backtrace */
const char* bf_taken_at_func; const char *bf_taken_at_func;
}; };
/* The last descriptor for a buffer. /* The last descriptor for a buffer.
@ -649,8 +649,8 @@ struct ath_softc {
int (*sc_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *, int (*sc_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *,
struct sk_buff *, int, int, u_int64_t); struct sk_buff *, int, int, u_int64_t);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
void (*sc_node_cleanup_debug)(struct ieee80211_node *, const char* func, int line); void (*sc_node_cleanup_debug)(struct ieee80211_node *, const char *func, int line);
void (*sc_node_free_debug)(struct ieee80211_node *, const char* func, int line); void (*sc_node_free_debug)(struct ieee80211_node *, const char *func, int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
void (*sc_node_cleanup)(struct ieee80211_node *); void (*sc_node_cleanup)(struct ieee80211_node *);
void (*sc_node_free)(struct ieee80211_node *); void (*sc_node_free)(struct ieee80211_node *);
@ -1018,6 +1018,6 @@ void ath_sysctl_unregister(void);
"MadWifi" : \ "MadWifi" : \
DEV_NAME(_v->iv_ic->ic_dev)) DEV_NAME(_v->iv_ic->ic_dev))
void ath_radar_detected(struct ath_softc *sc, const char* message); void ath_radar_detected(struct ath_softc *sc, const char *message);
#endif /* _DEV_ATH_ATHVAR_H */ #endif /* _DEV_ATH_ATHVAR_H */

View File

@ -117,7 +117,7 @@ _ath_hal_detach(struct ath_hal *ah)
#ifdef AH_ASSERT #ifdef AH_ASSERT
void __ahdecl void __ahdecl
ath_hal_assert_failed(const char* filename, int lineno, const char *msg) ath_hal_assert_failed(const char *filename, int lineno, const char *msg)
{ {
printk(KERN_ERR "Atheros HAL assertion failure: %s: line %u: %s\n", printk(KERN_ERR "Atheros HAL assertion failure: %s: line %u: %s\n",
filename, lineno, msg); filename, lineno, msg);
@ -152,7 +152,7 @@ EXPORT_SYMBOL(ath_hal_device);
static struct alq *ath_hal_alq = NULL; static struct alq *ath_hal_alq = NULL;
static u_int ath_hal_alq_lost; /* count of lost records */ static u_int ath_hal_alq_lost; /* count of lost records */
static const char *ath_hal_logfile = "/var/log/ath_hal.log"; static const char *ath_hal_logfile = "/var/log/ath_hal.log";
static u_int ath_hal_alq_qsize = 8*1024; static u_int ath_hal_alq_qsize = 8 * 1024;
static int static int
@ -209,7 +209,7 @@ sysctl_hw_ath_hal_log(AH_SYSCTL_ARGS_DECL)
} }
static inline void static inline void
ath_hal_logvprintf(struct ath_hal *ah, const char* fmt, va_list ap) ath_hal_logvprintf(struct ath_hal *ah, const char *fmt, va_list ap)
{ {
struct ale *ale; struct ale *ale;
if (!ath_hal_alq) { if (!ath_hal_alq) {
@ -241,7 +241,7 @@ EXPORT_SYMBOL(ath_hal_logprintf);
#endif /* AH_DEBUG_ALQ */ #endif /* AH_DEBUG_ALQ */
static inline void static inline void
_hal_vprintf(struct ath_hal *ah, HAL_BOOL prefer_alq, const char* fmt, va_list ap) _hal_vprintf(struct ath_hal *ah, HAL_BOOL prefer_alq, const char *fmt, va_list ap)
{ {
char buf[MSG_MAXLEN]; char buf[MSG_MAXLEN];
#ifdef AH_DEBUG_ALQ #ifdef AH_DEBUG_ALQ
@ -255,7 +255,7 @@ _hal_vprintf(struct ath_hal *ah, HAL_BOOL prefer_alq, const char* fmt, va_list a
} }
void __ahdecl void __ahdecl
ath_hal_printf(struct ath_hal *ah, HAL_BOOL prefer_alq, const char* fmt, ...) ath_hal_printf(struct ath_hal *ah, HAL_BOOL prefer_alq, const char *fmt, ...)
{ {
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
@ -268,9 +268,9 @@ EXPORT_SYMBOL(ath_hal_printf);
* for). Names were taken from openhal ar5212regs.h. Return AH_TRUE if the * for). Names were taken from openhal ar5212regs.h. Return AH_TRUE if the
* name is a known ar5212 register, and AH_FALSE otherwise. */ * name is a known ar5212 register, and AH_FALSE otherwise. */
HAL_BOOL HAL_BOOL
ath_hal_lookup_register_name(struct ath_hal *ah, char* buf, int buflen, ath_hal_lookup_register_name(struct ath_hal *ah, char *buf, int buflen,
u_int32_t address) { u_int32_t address) {
const char* static_label = NULL; const char *static_label = NULL;
memset(buf, 0, buflen); memset(buf, 0, buflen);
#if 0 /* Enable once for each new board/magic type */ #if 0 /* Enable once for each new board/magic type */
printk("MAGIC: %x\n", ah->ah_magic); printk("MAGIC: %x\n", ah->ah_magic);
@ -459,7 +459,7 @@ ath_hal_lookup_register_name(struct ath_hal *ah, char* buf, int buflen,
int key = ((address - 0x8800) / keytable_entry_size); int key = ((address - 0x8800) / keytable_entry_size);
int reg = ((address - 0x8800) % keytable_entry_size) / int reg = ((address - 0x8800) % keytable_entry_size) /
sizeof(u_int32_t); sizeof(u_int32_t);
char* format = NULL; char *format = NULL;
switch (reg) { switch (reg) {
case 0: format = "KEY(%3d).KEYBITS[031:000]"; break; case 0: format = "KEY(%3d).KEYBITS[031:000]"; break;
case 1: format = "KEY(%3d).KEYBITS[047:032]"; break; case 1: format = "KEY(%3d).KEYBITS[047:032]"; break;
@ -572,7 +572,7 @@ ath_hal_lookup_register_name(struct ath_hal *ah, char* buf, int buflen,
EXPORT_SYMBOL(ath_hal_lookup_register_name); EXPORT_SYMBOL(ath_hal_lookup_register_name);
static void static void
_print_decoded_register_delta(struct ath_hal *ah, const char* device_name, _print_decoded_register_delta(struct ath_hal *ah, const char *device_name,
HAL_BOOL prefer_alq, int regop, HAL_BOOL prefer_alq, int regop,
u_int32_t address, u_int32_t v_old, u_int32_t v_new, u_int32_t address, u_int32_t v_old, u_int32_t v_new,
HAL_BOOL verbose) HAL_BOOL verbose)
@ -655,7 +655,7 @@ _print_decoded_register_delta(struct ath_hal *ah, const char* device_name,
* names) we can add it to this helper function and a subsequent line is * names) we can add it to this helper function and a subsequent line is
* printed with the status in symbolic form. */ * printed with the status in symbolic form. */
static void static void
_print_decoded_register_bitfields(struct ath_hal *ah, const char* device_name, _print_decoded_register_bitfields(struct ath_hal *ah, const char *device_name,
HAL_BOOL prefer_alq, int regop, HAL_BOOL prefer_alq, int regop,
u_int32_t address, u_int32_t old_v, u_int32_t address, u_int32_t old_v,
u_int32_t v, HAL_BOOL verbose) u_int32_t v, HAL_BOOL verbose)
@ -824,7 +824,7 @@ _print_decoded_register_bitfields(struct ath_hal *ah, const char* device_name,
/* Print out a single register name/address/value in hex and binary */ /* Print out a single register name/address/value in hex and binary */
static inline void static inline void
_print_decoded_register(struct ath_hal *ah, const char* device_name, _print_decoded_register(struct ath_hal *ah, const char *device_name,
HAL_BOOL prefer_alq, int regop, HAL_BOOL prefer_alq, int regop,
u_int32_t address, u_int32_t oldval, u_int32_t address, u_int32_t oldval,
u_int32_t newval, HAL_BOOL verbose) u_int32_t newval, HAL_BOOL verbose)
@ -837,7 +837,7 @@ _print_decoded_register(struct ath_hal *ah, const char* device_name,
/* Print out a single register name/address/value in hex and binary */ /* Print out a single register name/address/value in hex and binary */
static inline void static inline void
_print_undecoded_register(struct ath_hal *ah, const char* device_name, _print_undecoded_register(struct ath_hal *ah, const char *device_name,
HAL_BOOL prefer_alq, int regop, HAL_BOOL prefer_alq, int regop,
u_int32_t address, u_int32_t newval) u_int32_t address, u_int32_t newval)
{ {
@ -855,7 +855,7 @@ _print_undecoded_register(struct ath_hal *ah, const char* device_name,
/* Print out a single register name/address/value in hex and binary */ /* Print out a single register name/address/value in hex and binary */
void void
ath_hal_print_decoded_register(struct ath_hal *ah, ath_hal_print_decoded_register(struct ath_hal *ah,
const char* device_name, const char *device_name,
u_int32_t address, u_int32_t oldval, u_int32_t address, u_int32_t oldval,
u_int32_t newval, HAL_BOOL bitfields) u_int32_t newval, HAL_BOOL bitfields)
{ {
@ -867,7 +867,7 @@ EXPORT_SYMBOL(ath_hal_print_decoded_register);
/* Print out a single register in simple undecoded form */ /* Print out a single register in simple undecoded form */
void void
ath_hal_print_register(struct ath_hal *ah, ath_hal_print_register(struct ath_hal *ah,
const char* device_name, const char *device_name,
u_int32_t address, u_int32_t newval) u_int32_t address, u_int32_t newval)
{ {
_print_undecoded_register(ah, device_name, AH_FALSE /* don't use alq */, _print_undecoded_register(ah, device_name, AH_FALSE /* don't use alq */,
@ -956,7 +956,7 @@ ath_hal_malloc(size_t size)
} }
void __ahdecl void __ahdecl
ath_hal_free(void* p) ath_hal_free(void *p)
{ {
kfree(p); kfree(p);
} }

View File

@ -289,16 +289,16 @@ extern void _ath_hal_detach(struct ath_hal *);
void void
ath_hal_print_decoded_register(struct ath_hal *ah, ath_hal_print_decoded_register(struct ath_hal *ah,
const char* device_name, const char *device_name,
u_int32_t address, u_int32_t oldval, u_int32_t address, u_int32_t oldval,
u_int32_t newval, HAL_BOOL bitfields); u_int32_t newval, HAL_BOOL bitfields);
void void
ath_hal_print_register(struct ath_hal *ah, ath_hal_print_register(struct ath_hal *ah,
const char* device_name, const char *device_name,
u_int32_t address, u_int32_t value); u_int32_t address, u_int32_t value);
HAL_BOOL HAL_BOOL
ath_hal_lookup_register_name(struct ath_hal *ah, char* buf, int buflen, ath_hal_lookup_register_name(struct ath_hal *ah, char *buf, int buflen,
u_int32_t address); u_int32_t address);
#endif /* _ATH_AH_OSDEP_H_ */ #endif /* _ATH_AH_OSDEP_H_ */

View File

@ -317,7 +317,7 @@ ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state)
{ {
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ath_softc *sc = ic->ic_dev->priv; struct ath_softc *sc = ic->ic_dev->priv;
struct amrr_softc *asc = (struct amrr_softc *) sc->sc_rc; struct amrr_softc *asc = (struct amrr_softc *)sc->sc_rc;
struct ieee80211_node *ni; struct ieee80211_node *ni;
if (state == IEEE80211_S_INIT) { if (state == IEEE80211_S_INIT) {
@ -473,7 +473,7 @@ ath_rate_attach(struct ath_softc *sc)
static void static void
ath_rate_detach(struct ath_ratectrl *arc) ath_rate_detach(struct ath_ratectrl *arc)
{ {
struct amrr_softc *asc = (struct amrr_softc *) arc; struct amrr_softc *asc = (struct amrr_softc *)arc;
del_timer(&asc->timer); del_timer(&asc->timer);
kfree(asc); kfree(asc);

View File

@ -770,7 +770,7 @@ ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state newstate)
static void static void
ath_timer_function(unsigned long data) ath_timer_function(unsigned long data)
{ {
struct minstrel_softc *ssc = (struct minstrel_softc *) data; struct minstrel_softc *ssc = (struct minstrel_softc *)data;
struct ath_softc *sc = ssc->sc; struct ath_softc *sc = ssc->sc;
struct ieee80211com *ic; struct ieee80211com *ic;
struct net_device *dev = ssc->sc_dev; struct net_device *dev = ssc->sc_dev;
@ -815,7 +815,7 @@ ath_timer_function(unsigned long data)
static void static void
ath_rate_statistics(void *arg, struct ieee80211_node *ni) ath_rate_statistics(void *arg, struct ieee80211_node *ni)
{ {
struct ath_node *an = (struct ath_node *) ni; struct ath_node *an = (struct ath_node *)ni;
struct ieee80211_rateset *rs = &ni->ni_rates; struct ieee80211_rateset *rs = &ni->ni_rates;
struct minstrel_node *rn = ATH_NODE_MINSTREL(an); struct minstrel_node *rn = ATH_NODE_MINSTREL(an);
unsigned int i; unsigned int i;
@ -933,7 +933,7 @@ ath_rate_attach(struct ath_softc *sc)
static void static void
ath_rate_detach(struct ath_ratectrl *arc) ath_rate_detach(struct ath_ratectrl *arc)
{ {
struct minstrel_softc *osc = (struct minstrel_softc *) arc; struct minstrel_softc *osc = (struct minstrel_softc *)arc;
osc->close_timer_now = 1; osc->close_timer_now = 1;
del_timer(&osc->timer); del_timer(&osc->timer);
kfree(osc); kfree(osc);
@ -948,7 +948,7 @@ ath_proc_read_nodes(struct ieee80211vap *vap, char *buf, int space)
struct ieee80211_node *ni; struct ieee80211_node *ni;
struct minstrel_node *odst; struct minstrel_node *odst;
struct ieee80211_node_table *nt = struct ieee80211_node_table *nt =
(struct ieee80211_node_table *) &vap->iv_ic->ic_sta; (struct ieee80211_node_table *)&vap->iv_ic->ic_sta;
unsigned int x = 0; unsigned int x = 0;
unsigned int this_tp, this_prob, this_eprob; unsigned int this_tp, this_prob, this_eprob;
struct ath_softc *sc = vap->iv_ic->ic_dev->priv;; struct ath_softc *sc = vap->iv_ic->ic_dev->priv;;

View File

@ -423,7 +423,7 @@ ath_rate_attach(struct ath_softc *sc)
static void static void
ath_rate_detach(struct ath_ratectrl *arc) ath_rate_detach(struct ath_ratectrl *arc)
{ {
struct onoe_softc *osc = (struct onoe_softc *) arc; struct onoe_softc *osc = (struct onoe_softc *)arc;
kfree(osc); kfree(osc);
_MOD_DEC_USE(THIS_MODULE); _MOD_DEC_USE(THIS_MODULE);

View File

@ -983,7 +983,7 @@ ath_rate_attach(struct ath_softc *sc)
static void static void
ath_rate_detach(struct ath_ratectrl *arc) ath_rate_detach(struct ath_ratectrl *arc)
{ {
struct sample_softc *osc = (struct sample_softc *) arc; struct sample_softc *osc = (struct sample_softc *)arc;
kfree(osc); kfree(osc);
_MOD_DEC_USE(THIS_MODULE); _MOD_DEC_USE(THIS_MODULE);
} }
@ -996,7 +996,7 @@ proc_read_nodes(struct ieee80211vap *vap, const int size, char *buf, int space)
struct ath_node *an; struct ath_node *an;
struct sample_node *sn; struct sample_node *sn;
struct ieee80211_node_table *nt = struct ieee80211_node_table *nt =
(struct ieee80211_node_table *) &vap->iv_ic->ic_sta; (struct ieee80211_node_table *)&vap->iv_ic->ic_sta;
unsigned int ndx; unsigned int ndx;
unsigned int size_bin; unsigned int size_bin;

View File

@ -147,7 +147,7 @@ struct ieee80211_channel {
#define IEEE80211_CHAN_MAX 255 #define IEEE80211_CHAN_MAX 255
#define IEEE80211_CHAN_BYTES 32 /* howmany(IEEE80211_CHAN_MAX, NBBY) */ #define IEEE80211_CHAN_BYTES 32 /* howmany(IEEE80211_CHAN_MAX, NBBY) */
#define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */ #define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */
#define IEEE80211_CHAN_ANYC ((struct ieee80211_channel *) IEEE80211_CHAN_ANY) #define IEEE80211_CHAN_ANYC ((struct ieee80211_channel *)IEEE80211_CHAN_ANY)
#define IEEE80211_RADAR_CHANCHANGE_TBTT_COUNT 0 #define IEEE80211_RADAR_CHANCHANGE_TBTT_COUNT 0
#define IEEE80211_DEFAULT_CHANCHANGE_TBTT_COUNT 3 #define IEEE80211_DEFAULT_CHANCHANGE_TBTT_COUNT 3

View File

@ -64,7 +64,7 @@ const char *ieee80211_phymode_name[] = {
}; };
EXPORT_SYMBOL(ieee80211_phymode_name); EXPORT_SYMBOL(ieee80211_phymode_name);
const char* ieee80211_opmode_name[] = { const char *ieee80211_opmode_name[] = {
"ibss", /* IEEE80211_M_IBSS = 0 - IBSS (adhoc) station */ "ibss", /* IEEE80211_M_IBSS = 0 - IBSS (adhoc) station */
"station", /* IEEE80211_M_STA = 1 - infrastructure station */ "station", /* IEEE80211_M_STA = 1 - infrastructure station */
"wds", /* IEEE80211_M_WDS = 2 - WDS link */ "wds", /* IEEE80211_M_WDS = 2 - WDS link */
@ -78,7 +78,7 @@ const char* ieee80211_opmode_name[] = {
EXPORT_SYMBOL(ieee80211_opmode_name); EXPORT_SYMBOL(ieee80211_opmode_name);
static void ieee80211com_media_status(struct net_device*, struct ifmediareq *); static void ieee80211com_media_status(struct net_device *, struct ifmediareq *);
static int ieee80211com_media_change(struct net_device *); static int ieee80211com_media_change(struct net_device *);
static struct net_device_stats *ieee80211_getstats(struct net_device *); static struct net_device_stats *ieee80211_getstats(struct net_device *);
static int ieee80211_change_mtu(struct net_device *, int); static int ieee80211_change_mtu(struct net_device *, int);
@ -860,7 +860,7 @@ ieee80211_dfs_action(struct ieee80211com *ic) {
void void
ieee80211_expire_excl_restrictions(struct ieee80211com *ic) ieee80211_expire_excl_restrictions(struct ieee80211com *ic)
{ {
struct ieee80211_channel* c = NULL; struct ieee80211_channel *c = NULL;
struct net_device *dev = ic->ic_dev; struct net_device *dev = ic->ic_dev;
struct timeval tv_now; struct timeval tv_now;
int i; int i;
@ -939,7 +939,7 @@ ieee80211_update_dfs_excl_timer(struct ieee80211com *ic)
static void static void
ieee80211_expire_dfs_excl_timer(unsigned long data) ieee80211_expire_dfs_excl_timer(unsigned long data)
{ {
struct ieee80211com *ic = (struct ieee80211com *) data; struct ieee80211com *ic = (struct ieee80211com *)data;
struct ieee80211vap *vap; struct ieee80211vap *vap;
printk(KERN_INFO "%s: %s: expiring Non-Occupancy Period\n", printk(KERN_INFO "%s: %s: expiring Non-Occupancy Period\n",

View File

@ -117,7 +117,7 @@ ieee80211_beacon_init(struct ieee80211_node *ni, struct ieee80211_beacon_offsets
*frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */
bo->bo_tim_len = 0; bo->bo_tim_len = 0;
} else { } else {
struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) frm; struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *)frm;
tie->tim_ie = IEEE80211_ELEMID_TIM; tie->tim_ie = IEEE80211_ELEMID_TIM;
tie->tim_len = 4; /* length */ tie->tim_len = 4; /* length */
@ -400,7 +400,7 @@ ieee80211_beacon_update(struct ieee80211_node *ni,
if (vap->iv_opmode == IEEE80211_M_HOSTAP) { /* NB: no IBSS support*/ if (vap->iv_opmode == IEEE80211_M_HOSTAP) { /* NB: no IBSS support*/
struct ieee80211_tim_ie *tie = struct ieee80211_tim_ie *tie =
(struct ieee80211_tim_ie *) bo->bo_tim; (struct ieee80211_tim_ie *)bo->bo_tim;
if (vap->iv_flags & IEEE80211_F_TIMUPDATE) { if (vap->iv_flags & IEEE80211_F_TIMUPDATE) {
u_int timlen, timoff, i; u_int timlen, timoff, i;
/* /*

View File

@ -644,7 +644,7 @@ ieee80211_crypto_decap(struct ieee80211_node *ni, struct sk_buff *skb, int hdrle
* This assumes unicast keys are only configured when * This assumes unicast keys are only configured when
* the key id in the header is meaningless (typically 0). * the key id in the header is meaningless (typically 0).
*/ */
wh = (struct ieee80211_frame *) skb->data; wh = (struct ieee80211_frame *)skb->data;
ivp = skb->data + hdrlen; ivp = skb->data + hdrlen;
keyid = ivp[IEEE80211_WEP_IVLEN]; keyid = ivp[IEEE80211_WEP_IVLEN];
if (IEEE80211_IS_MULTICAST(wh->i_addr1) || if (IEEE80211_IS_MULTICAST(wh->i_addr1) ||

View File

@ -151,7 +151,7 @@ extern const struct ieee80211_cipher ieee80211_cipher_none;
void ieee80211_crypto_register(const struct ieee80211_cipher *); void ieee80211_crypto_register(const struct ieee80211_cipher *);
void ieee80211_crypto_unregister(const struct ieee80211_cipher *); void ieee80211_crypto_unregister(const struct ieee80211_cipher *);
int ieee80211_crypto_available(struct ieee80211vap*, u_int); int ieee80211_crypto_available(struct ieee80211vap *, u_int);
struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211_node *, struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211_node *,
struct sk_buff *); struct sk_buff *);

View File

@ -415,7 +415,7 @@ ccmp_init_blocks(struct crypto_cipher *tfm, struct ieee80211_frame *wh,
((struct ieee80211_frame_addr4 *)wh)->i_addr4); ((struct ieee80211_frame_addr4 *)wh)->i_addr4);
if (IS_QOS_DATA(wh)) { if (IS_QOS_DATA(wh)) {
struct ieee80211_qosframe_addr4 *qwh4 = struct ieee80211_qosframe_addr4 *qwh4 =
(struct ieee80211_qosframe_addr4 *) wh; (struct ieee80211_qosframe_addr4 *)wh;
aad[30] = qwh4->i_qos[0] & 0x0f;/* just priority bits */ aad[30] = qwh4->i_qos[0] & 0x0f;/* just priority bits */
aad[31] = 0; aad[31] = 0;
b0[1] = aad[30]; b0[1] = aad[30];
@ -428,7 +428,7 @@ ccmp_init_blocks(struct crypto_cipher *tfm, struct ieee80211_frame *wh,
} else { } else {
if (IS_QOS_DATA(wh)) { if (IS_QOS_DATA(wh)) {
struct ieee80211_qosframe *qwh = struct ieee80211_qosframe *qwh =
(struct ieee80211_qosframe*) wh; (struct ieee80211_qosframe *)wh;
aad[24] = qwh->i_qos[0] & 0x0f; /* just priority bits */ aad[24] = qwh->i_qos[0] & 0x0f; /* just priority bits */
aad[25] = 0; aad[25] = 0;
b0[1] = aad[24]; b0[1] = aad[24];
@ -470,7 +470,7 @@ static int
ccmp_encrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen) ccmp_encrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen)
{ {
struct ccmp_ctx *ctx = key->wk_private; struct ccmp_ctx *ctx = key->wk_private;
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb0->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb0->data;
struct sk_buff *skb; struct sk_buff *skb;
int data_len, i; int data_len, i;
uint8_t aad[2 * AES_BLOCK_LEN], b0[AES_BLOCK_LEN], b[AES_BLOCK_LEN]; uint8_t aad[2 * AES_BLOCK_LEN], b0[AES_BLOCK_LEN], b[AES_BLOCK_LEN];
@ -583,7 +583,7 @@ static int
ccmp_decrypt(struct ieee80211_key *key, u_int64_t pn, struct sk_buff *skb0, int hdrlen) ccmp_decrypt(struct ieee80211_key *key, u_int64_t pn, struct sk_buff *skb0, int hdrlen)
{ {
struct ccmp_ctx *ctx = key->wk_private; struct ccmp_ctx *ctx = key->wk_private;
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb0->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb0->data;
struct sk_buff *skb; struct sk_buff *skb;
uint8_t aad[2 * AES_BLOCK_LEN]; uint8_t aad[2 * AES_BLOCK_LEN];
uint8_t b0[AES_BLOCK_LEN], b[AES_BLOCK_LEN], a[AES_BLOCK_LEN]; uint8_t b0[AES_BLOCK_LEN], b[AES_BLOCK_LEN], a[AES_BLOCK_LEN];

View File

@ -161,7 +161,7 @@ tkip_encap(struct ieee80211_key *k, struct sk_buff *skb, u_int8_t keyid)
if (vap->iv_flags & IEEE80211_F_COUNTERM) { if (vap->iv_flags & IEEE80211_F_COUNTERM) {
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
struct ieee80211_frame *wh = struct ieee80211_frame *wh =
(struct ieee80211_frame *) skb->data; (struct ieee80211_frame *)skb->data;
#endif #endif
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2, IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
@ -210,7 +210,7 @@ tkip_enmic(struct ieee80211_key *k, struct sk_buff *skb0, int force_sw)
if ((k->wk_flags & IEEE80211_KEY_SWMIC) || force_sw) { if ((k->wk_flags & IEEE80211_KEY_SWMIC) || force_sw) {
struct ieee80211_frame *wh = struct ieee80211_frame *wh =
(struct ieee80211_frame *) skb0->data; (struct ieee80211_frame *)skb0->data;
struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211vap *vap = ctx->tc_vap;
struct ieee80211com *ic = ctx->tc_ic; struct ieee80211com *ic = ctx->tc_ic;
int hdrlen; int hdrlen;
@ -353,7 +353,7 @@ tkip_demic(struct ieee80211_key *k, struct sk_buff *skb0, int hdrlen, int force_
skb = skb->next; skb = skb->next;
pktlen += skb->len; pktlen += skb->len;
} }
wh = (struct ieee80211_frame *) skb0->data; wh = (struct ieee80211_frame *)skb0->data;
/* NB: skb left pointing at last in chain */ /* NB: skb left pointing at last in chain */
if ((k->wk_flags & IEEE80211_KEY_SWMIC) || force_sw) { if ((k->wk_flags & IEEE80211_KEY_SWMIC) || force_sw) {
struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211vap *vap = ctx->tc_vap;
@ -576,7 +576,7 @@ tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, u16 IV16)
{ {
/* Make temporary area overlap WEP seed so that the final copy can be /* Make temporary area overlap WEP seed so that the final copy can be
* avoided on little endian hosts. */ * avoided on little endian hosts. */
u16 *PPK = (u16 *) &WEPSeed[4]; u16 *PPK = (u16 *)&WEPSeed[4];
/* Step 1 - make copy of TTAK and bring in TSC */ /* Step 1 - make copy of TTAK and bring in TSC */
PPK[0] = TTAK[0]; PPK[0] = TTAK[0];
@ -587,15 +587,15 @@ tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, u16 IV16)
PPK[5] = TTAK[4] + IV16; PPK[5] = TTAK[4] + IV16;
/* Step 2 - 96-bit bijective mixing using S-box */ /* Step 2 - 96-bit bijective mixing using S-box */
PPK[0] += _S_(PPK[5] ^ Mk16_le((const __le16 *) &TK[0])); PPK[0] += _S_(PPK[5] ^ Mk16_le((const __le16 *)&TK[0]));
PPK[1] += _S_(PPK[0] ^ Mk16_le((const __le16 *) &TK[2])); PPK[1] += _S_(PPK[0] ^ Mk16_le((const __le16 *)&TK[2]));
PPK[2] += _S_(PPK[1] ^ Mk16_le((const __le16 *) &TK[4])); PPK[2] += _S_(PPK[1] ^ Mk16_le((const __le16 *)&TK[4]));
PPK[3] += _S_(PPK[2] ^ Mk16_le((const __le16 *) &TK[6])); PPK[3] += _S_(PPK[2] ^ Mk16_le((const __le16 *)&TK[6]));
PPK[4] += _S_(PPK[3] ^ Mk16_le((const __le16 *) &TK[8])); PPK[4] += _S_(PPK[3] ^ Mk16_le((const __le16 *)&TK[8]));
PPK[5] += _S_(PPK[4] ^ Mk16_le((const __le16 *) &TK[10])); PPK[5] += _S_(PPK[4] ^ Mk16_le((const __le16 *)&TK[10]));
PPK[0] += RotR1(PPK[5] ^ Mk16_le((const __le16 *) &TK[12])); PPK[0] += RotR1(PPK[5] ^ Mk16_le((const __le16 *)&TK[12]));
PPK[1] += RotR1(PPK[0] ^ Mk16_le((const __le16 *) &TK[14])); PPK[1] += RotR1(PPK[0] ^ Mk16_le((const __le16 *)&TK[14]));
PPK[2] += RotR1(PPK[1]); PPK[2] += RotR1(PPK[1]);
PPK[3] += RotR1(PPK[2]); PPK[3] += RotR1(PPK[2]);
PPK[4] += RotR1(PPK[3]); PPK[4] += RotR1(PPK[3]);
@ -606,7 +606,7 @@ tkip_mixing_phase2(u8 *WEPSeed, const u8 *TK, const u16 *TTAK, u16 IV16)
WEPSeed[0] = Hi8(IV16); WEPSeed[0] = Hi8(IV16);
WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F; WEPSeed[1] = (Hi8(IV16) | 0x20) & 0x7F;
WEPSeed[2] = Lo8(IV16); WEPSeed[2] = Lo8(IV16);
WEPSeed[3] = Lo8((PPK[5] ^ Mk16_le((const __le16 *) &TK[0])) >> 1); WEPSeed[3] = Lo8((PPK[5] ^ Mk16_le((const __le16 *)&TK[0])) >> 1);
#if _BYTE_ORDER == _BIG_ENDIAN #if _BYTE_ORDER == _BIG_ENDIAN
{ {
@ -809,7 +809,7 @@ static void
michael_mic_hdr(const struct ieee80211_frame *wh0, u8 hdr[16]) michael_mic_hdr(const struct ieee80211_frame *wh0, u8 hdr[16])
{ {
const struct ieee80211_frame_addr4 *wh = const struct ieee80211_frame_addr4 *wh =
(const struct ieee80211_frame_addr4 *) wh0; (const struct ieee80211_frame_addr4 *)wh0;
switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
case IEEE80211_FC1_DIR_NODS: case IEEE80211_FC1_DIR_NODS:
@ -832,7 +832,7 @@ michael_mic_hdr(const struct ieee80211_frame *wh0, u8 hdr[16])
if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) {
const struct ieee80211_qosframe *qwh = const struct ieee80211_qosframe *qwh =
(const struct ieee80211_qosframe *) wh; (const struct ieee80211_qosframe *)wh;
hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID; hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID;
} else } else
hdr[12] = 0; hdr[12] = 0;
@ -849,7 +849,7 @@ michael_mic(struct tkip_ctx *ctx, const u8 *key,
const uint8_t *data; const uint8_t *data;
u_int space; u_int space;
michael_mic_hdr((struct ieee80211_frame *) skb->data, hdr); michael_mic_hdr((struct ieee80211_frame *)skb->data, hdr);
l = get_le32(key); l = get_le32(key);
r = get_le32(key + 4); r = get_le32(key + 4);
@ -952,7 +952,7 @@ static int
tkip_encrypt(struct tkip_ctx *ctx, struct ieee80211_key *key, tkip_encrypt(struct tkip_ctx *ctx, struct ieee80211_key *key,
struct sk_buff *skb0, int hdrlen) struct sk_buff *skb0, int hdrlen)
{ {
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb0->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb0->data;
struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211vap *vap = ctx->tc_vap;
struct sk_buff *skb; struct sk_buff *skb;
size_t pktlen; size_t pktlen;
@ -996,7 +996,7 @@ static int
tkip_decrypt(struct tkip_ctx *ctx, struct ieee80211_key *key, tkip_decrypt(struct tkip_ctx *ctx, struct ieee80211_key *key,
struct sk_buff *skb0, int hdrlen) struct sk_buff *skb0, int hdrlen)
{ {
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb0->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb0->data;
struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211vap *vap = ctx->tc_vap;
struct sk_buff *skb; struct sk_buff *skb;
size_t pktlen; size_t pktlen;
@ -1016,7 +1016,7 @@ tkip_decrypt(struct tkip_ctx *ctx, struct ieee80211_key *key,
iv16 = (u16) ctx->rx_rsc; iv16 = (u16) ctx->rx_rsc;
iv32 = (u32) (ctx->rx_rsc >> 16); iv32 = (u32) (ctx->rx_rsc >> 16);
wh = (struct ieee80211_frame *) skb0->data; wh = (struct ieee80211_frame *)skb0->data;
tid = 0; tid = 0;
if (IEEE80211_QOS_HAS_SEQ(wh)) if (IEEE80211_QOS_HAS_SEQ(wh))
tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] & IEEE80211_QOS_TID; tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] & IEEE80211_QOS_TID;

View File

@ -358,7 +358,7 @@ wep_encrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen)
if (data_len != 0) { /* out of data */ if (data_len != 0) { /* out of data */
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
const struct ieee80211_frame *wh = const struct ieee80211_frame *wh =
(const struct ieee80211_frame *) skb0->data; (const struct ieee80211_frame *)skb0->data;
#endif #endif
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO,
wh->i_addr2, wh->i_addr2,
@ -377,7 +377,7 @@ wep_encrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen)
if (skb_tailroom(skb) < wep.ic_trailer) { if (skb_tailroom(skb) < wep.ic_trailer) {
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
const struct ieee80211_frame *wh = const struct ieee80211_frame *wh =
(const struct ieee80211_frame *) skb0->data; (const struct ieee80211_frame *)skb0->data;
#endif #endif
/* NB: should not happen */ /* NB: should not happen */
IEEE80211_NOTE_MAC(ctx->wc_vap, IEEE80211_MSG_CRYPTO, IEEE80211_NOTE_MAC(ctx->wc_vap, IEEE80211_MSG_CRYPTO,
@ -458,7 +458,7 @@ wep_decrypt(struct ieee80211_key *key, struct sk_buff *skb0, int hdrlen)
if (data_len != 0) { /* out of data */ if (data_len != 0) { /* out of data */
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
const struct ieee80211_frame *wh = const struct ieee80211_frame *wh =
(const struct ieee80211_frame *) skb0->data; (const struct ieee80211_frame *)skb0->data;
#endif #endif
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO,
wh->i_addr2, wh->i_addr2,

View File

@ -170,7 +170,7 @@ iwspy_event(struct ieee80211vap *vap, struct ieee80211_node *ni, u_int rssi)
set_quality(&thr.low, vap->iv_spy.thr_low, vap->iv_ic->ic_channoise); set_quality(&thr.low, vap->iv_spy.thr_low, vap->iv_ic->ic_channoise);
set_quality(&thr.high, vap->iv_spy.thr_high, vap->iv_ic->ic_channoise); set_quality(&thr.high, vap->iv_spy.thr_high, vap->iv_ic->ic_channoise);
wireless_send_event(vap->iv_dev, wireless_send_event(vap->iv_dev,
SIOCGIWTHRSPY, &wrq, (char*) &thr); SIOCGIWTHRSPY, &wrq, (char *)&thr);
break; break;
} }
} }
@ -672,7 +672,7 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
IEEE80211_NODE_STAT(ni, rx_decap); IEEE80211_NODE_STAT(ni, rx_decap);
goto err; goto err;
} }
eh = (struct ether_header *) skb->data; eh = (struct ether_header *)skb->data;
if (!accept_data_frame(vap, ni, key, skb, eh)) if (!accept_data_frame(vap, ni, key, skb, eh))
goto out; goto out;
@ -685,7 +685,7 @@ ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null,
#ifdef ATH_SUPERG_FF #ifdef ATH_SUPERG_FF
/* check for FF */ /* check for FF */
llc = (struct llc *) (skb->data + sizeof(struct ether_header)); llc = (struct llc *)(skb->data + sizeof(struct ether_header));
if (ntohs(llc->llc_snap.ether_type) == (u_int16_t)ATH_ETH_TYPE) { if (ntohs(llc->llc_snap.ether_type) == (u_int16_t)ATH_ETH_TYPE) {
struct sk_buff *skb1 = NULL; struct sk_buff *skb1 = NULL;
struct ether_header *eh_tmp; struct ether_header *eh_tmp;
@ -970,7 +970,7 @@ static int accept_data_frame(struct ieee80211vap *vap,
static struct sk_buff * static struct sk_buff *
ieee80211_defrag(struct ieee80211_node *ni, struct sk_buff *skb, int hdrlen) ieee80211_defrag(struct ieee80211_node *ni, struct sk_buff *skb, int hdrlen)
{ {
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
u_int16_t rxseq, last_rxseq; u_int16_t rxseq, last_rxseq;
u_int8_t fragno, last_fragno; u_int8_t fragno, last_fragno;
u_int8_t more_frag = wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG; u_int8_t more_frag = wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG;
@ -1015,7 +1015,7 @@ ieee80211_defrag(struct ieee80211_node *ni, struct sk_buff *skb, int hdrlen)
if (ni->ni_rxfrag) { if (ni->ni_rxfrag) {
struct ieee80211_frame *lwh; struct ieee80211_frame *lwh;
lwh = (struct ieee80211_frame *) ni->ni_rxfrag->data; lwh = (struct ieee80211_frame *)ni->ni_rxfrag->data;
last_rxseq = le16_to_cpu(*(__le16 *)lwh->i_seq) >> last_rxseq = le16_to_cpu(*(__le16 *)lwh->i_seq) >>
IEEE80211_SEQ_SEQ_SHIFT; IEEE80211_SEQ_SEQ_SHIFT;
last_fragno = le16_to_cpu(*(__le16 *)lwh->i_seq) & last_fragno = le16_to_cpu(*(__le16 *)lwh->i_seq) &
@ -1081,7 +1081,7 @@ ieee80211_defrag(struct ieee80211_node *ni, struct sk_buff *skb, int hdrlen)
/* Update tail and length */ /* Update tail and length */
skb_put(ni->ni_rxfrag, skb->len - hdrlen); skb_put(ni->ni_rxfrag, skb->len - hdrlen);
/* Keep a copy of last sequence and fragno */ /* Keep a copy of last sequence and fragno */
*(__le16 *) lwh->i_seq = *(__le16 *) wh->i_seq; *(__le16 *)lwh->i_seq = *(__le16 *)wh->i_seq;
} }
/* we're done with the fragment */ /* we're done with the fragment */
ieee80211_dev_kfree_skb(&skb); ieee80211_dev_kfree_skb(&skb);
@ -1214,7 +1214,7 @@ ieee80211_decap(struct ieee80211vap *vap, struct sk_buff *skb, int hdrlen)
memcpy(&wh, skb->data, hdrlen); /* Make a copy of the variably sized .11 header */ memcpy(&wh, skb->data, hdrlen); /* Make a copy of the variably sized .11 header */
llc = (struct llc *) skb_pull(skb, hdrlen); llc = (struct llc *)skb_pull(skb, hdrlen);
/* XXX: For some unknown reason some APs think they are from DEC and /* XXX: For some unknown reason some APs think they are from DEC and
* use an OUI of 00-00-f8. This should be killed as soon as sanity is * use an OUI of 00-00-f8. This should be killed as soon as sanity is
* restored. */ * restored. */
@ -1226,7 +1226,7 @@ ieee80211_decap(struct ieee80211vap *vap, struct sk_buff *skb, int hdrlen)
llc = NULL; llc = NULL;
} }
eh = (struct ether_header *) skb_push(skb, sizeof(struct ether_header)); eh = (struct ether_header *)skb_push(skb, sizeof(struct ether_header));
switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) { switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) {
case IEEE80211_FC1_DIR_NODS: case IEEE80211_FC1_DIR_NODS:
IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1); IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1);
@ -2199,7 +2199,7 @@ ieee80211_parse_athParams(struct ieee80211_node *ni, u_int8_t *ie)
struct ieee80211com *ic = ni->ni_ic; struct ieee80211com *ic = ni->ni_ic;
#endif /* ATH_SUPERG_DYNTURBO */ #endif /* ATH_SUPERG_DYNTURBO */
struct ieee80211_ie_athAdvCap *athIe = struct ieee80211_ie_athAdvCap *athIe =
(struct ieee80211_ie_athAdvCap *) ie; (struct ieee80211_ie_athAdvCap *)ie;
ni->ni_ath_flags = athIe->athAdvCap_capability; ni->ni_ath_flags = athIe->athAdvCap_capability;
if (ni->ni_ath_flags & IEEE80211_ATHC_COMP) if (ni->ni_ath_flags & IEEE80211_ATHC_COMP)
@ -2298,7 +2298,7 @@ void
ieee80211_saveath(struct ieee80211_node *ni, u_int8_t *ie) ieee80211_saveath(struct ieee80211_node *ni, u_int8_t *ie)
{ {
const struct ieee80211_ie_athAdvCap *athIe = const struct ieee80211_ie_athAdvCap *athIe =
(const struct ieee80211_ie_athAdvCap *) ie; (const struct ieee80211_ie_athAdvCap *)ie;
ieee80211_saveie(&ni->ni_ath_ie, ie); ieee80211_saveie(&ni->ni_ath_ie, ie);
if (athIe != NULL) { if (athIe != NULL) {
@ -3029,7 +3029,7 @@ ieee80211_recv_mgmt(struct ieee80211vap *vap,
if (ni_or_null == NULL) if (ni_or_null == NULL)
ni = vap->iv_bss; ni = vap->iv_bss;
wh = (struct ieee80211_frame *) skb->data; wh = (struct ieee80211_frame *)skb->data;
frm = (u_int8_t *)&wh[1]; frm = (u_int8_t *)&wh[1];
efrm = skb->data + skb->len; efrm = skb->data + skb->len;
@ -3339,7 +3339,7 @@ ieee80211_recv_mgmt(struct ieee80211vap *vap,
* power save mode for any reason. * power save mode for any reason.
*/ */
struct ieee80211_tim_ie *tim = struct ieee80211_tim_ie *tim =
(struct ieee80211_tim_ie *) scan.tim; (struct ieee80211_tim_ie *)scan.tim;
int aid = IEEE80211_AID(ni->ni_associd); int aid = IEEE80211_AID(ni->ni_associd);
int ix = aid / NBBY; int ix = aid / NBBY;
int min = tim->tim_bitctl &~ 1; int min = tim->tim_bitctl &~ 1;
@ -4131,7 +4131,7 @@ ieee80211_recv_pspoll(struct ieee80211_node *ni, struct sk_buff *skb0)
if (ni->ni_associd == 0) { if (ni->ni_associd == 0) {
IEEE80211_DISCARD(vap, IEEE80211_DISCARD(vap,
IEEE80211_MSG_POWER | IEEE80211_MSG_DEBUG, IEEE80211_MSG_POWER | IEEE80211_MSG_DEBUG,
(struct ieee80211_frame *) wh, "ps-poll", (struct ieee80211_frame *)wh, "ps-poll",
"%s", "unassociated station"); "%s", "unassociated station");
vap->iv_stats.is_ps_unassoc++; vap->iv_stats.is_ps_unassoc++;
IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_DEAUTH, IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_DEAUTH,
@ -4143,7 +4143,7 @@ ieee80211_recv_pspoll(struct ieee80211_node *ni, struct sk_buff *skb0)
if (aid != ni->ni_associd) { if (aid != ni->ni_associd) {
IEEE80211_DISCARD(vap, IEEE80211_DISCARD(vap,
IEEE80211_MSG_POWER | IEEE80211_MSG_DEBUG, IEEE80211_MSG_POWER | IEEE80211_MSG_DEBUG,
(struct ieee80211_frame *) wh, "ps-poll", (struct ieee80211_frame *)wh, "ps-poll",
"aid mismatch: sta aid 0x%x poll aid 0x%x", "aid mismatch: sta aid 0x%x poll aid 0x%x",
ni->ni_associd, aid); ni->ni_associd, aid);
vap->iv_stats.is_ps_badaid++; vap->iv_stats.is_ps_badaid++;
@ -4198,11 +4198,11 @@ athff_decap(struct sk_buff *skb)
return -1; return -1;
memcpy(&eh_src, skb->data, sizeof(struct ether_header)); memcpy(&eh_src, skb->data, sizeof(struct ether_header));
llc = (struct llc *) skb_pull(skb, sizeof(struct ether_header)); llc = (struct llc *)skb_pull(skb, sizeof(struct ether_header));
eh_src.ether_type = llc->llc_un.type_snap.ether_type; eh_src.ether_type = llc->llc_un.type_snap.ether_type;
skb_pull(skb, LLC_SNAPFRAMELEN); skb_pull(skb, LLC_SNAPFRAMELEN);
eh_dst = (struct ether_header *) skb_push(skb, sizeof(struct ether_header)); eh_dst = (struct ether_header *)skb_push(skb, sizeof(struct ether_header));
memcpy(eh_dst, &eh_src, sizeof(struct ether_header)); memcpy(eh_dst, &eh_src, sizeof(struct ether_header));
return 0; return 0;

View File

@ -136,7 +136,7 @@ if_printf(struct net_device *dev, const char *fmt, ...)
struct sk_buff * struct sk_buff *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_getmgtframe_debug(u_int8_t **frm, u_int pktlen, ieee80211_getmgtframe_debug(u_int8_t **frm, u_int pktlen,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_getmgtframe(u_int8_t **frm, u_int pktlen) ieee80211_getmgtframe(u_int8_t **frm, u_int pktlen)
#endif #endif
@ -432,7 +432,8 @@ static ssize_t
proc_ieee80211_read(struct file *file, char __user *buf, size_t len, loff_t *offset) proc_ieee80211_read(struct file *file, char __user *buf, size_t len, loff_t *offset)
{ {
loff_t pos = *offset; loff_t pos = *offset;
struct proc_ieee80211_priv *pv = (struct proc_ieee80211_priv *) file->private_data; struct proc_ieee80211_priv *pv =
(struct proc_ieee80211_priv *)file->private_data;
if (!pv->rbuf) if (!pv->rbuf)
return -EINVAL; return -EINVAL;
@ -485,7 +486,7 @@ proc_ieee80211_write(struct file *file, const char __user *buf, size_t len, loff
{ {
loff_t pos = *offset; loff_t pos = *offset;
struct proc_ieee80211_priv *pv = struct proc_ieee80211_priv *pv =
(struct proc_ieee80211_priv *) file->private_data; (struct proc_ieee80211_priv *)file->private_data;
if (!pv->wbuf) if (!pv->wbuf)
return -EINVAL; return -EINVAL;
@ -508,7 +509,7 @@ static int
proc_ieee80211_close(struct inode *inode, struct file *file) proc_ieee80211_close(struct inode *inode, struct file *file)
{ {
struct proc_ieee80211_priv *pv = struct proc_ieee80211_priv *pv =
(struct proc_ieee80211_priv *) file->private_data; (struct proc_ieee80211_priv *)file->private_data;
if (pv->rbuf) if (pv->rbuf)
vfree(pv->rbuf); vfree(pv->rbuf);
if (pv->wbuf) if (pv->wbuf)
@ -958,7 +959,7 @@ static int
ieee80211_rcv_dev_event(struct notifier_block *this, unsigned long event, ieee80211_rcv_dev_event(struct notifier_block *this, unsigned long event,
void *ptr) void *ptr)
{ {
struct net_device *dev = (struct net_device *) ptr; struct net_device *dev = (struct net_device *)ptr;
if (!dev || dev->open != &ieee80211_open) if (!dev || dev->open != &ieee80211_open)
return 0; return 0;

View File

@ -468,7 +468,7 @@ extern void if_printf(struct net_device *, const char *, ...);
#define ieee80211_getmgtframe(_ppfrm, _pktlen) \ #define ieee80211_getmgtframe(_ppfrm, _pktlen) \
ieee80211_getmgtframe_debug(_ppfrm, _pktlen, __func__, __LINE__) ieee80211_getmgtframe_debug(_ppfrm, _pktlen, __func__, __LINE__)
extern struct sk_buff * ieee80211_getmgtframe_debug(u_int8_t **frm, u_int pktlen, extern struct sk_buff * ieee80211_getmgtframe_debug(u_int8_t **frm, u_int pktlen,
const char* func, int line); const char *func, int line);
#else #else
extern struct sk_buff * ieee80211_getmgtframe(u_int8_t **frm, u_int pktlen); extern struct sk_buff * ieee80211_getmgtframe(u_int8_t **frm, u_int pktlen);
#endif #endif

View File

@ -139,7 +139,7 @@ ieee80211_monitor_encap(struct ieee80211vap *vap, struct sk_buff *skb)
switch (skb->dev->type) { switch (skb->dev->type) {
case ARPHRD_IEEE80211: { case ARPHRD_IEEE80211: {
struct ieee80211_frame *wh = (struct ieee80211_frame *) skb->data; struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL)
ph->try[0] = 1; ph->try[0] = 1;
break; break;
@ -147,7 +147,7 @@ ieee80211_monitor_encap(struct ieee80211vap *vap, struct sk_buff *skb)
case ARPHRD_IEEE80211_PRISM: { case ARPHRD_IEEE80211_PRISM: {
struct ieee80211_frame *wh = NULL; struct ieee80211_frame *wh = NULL;
struct wlan_ng_prism2_header *p2h = struct wlan_ng_prism2_header *p2h =
(struct wlan_ng_prism2_header *) skb->data; (struct wlan_ng_prism2_header *)skb->data;
/* does it look like there is a prism header here? */ /* does it look like there is a prism header here? */
if (skb->len > sizeof(struct wlan_ng_prism2_header) && if (skb->len > sizeof(struct wlan_ng_prism2_header) &&
p2h->msgcode == DIDmsg_lnxind_wlansniffrm && p2h->msgcode == DIDmsg_lnxind_wlansniffrm &&
@ -155,7 +155,7 @@ ieee80211_monitor_encap(struct ieee80211vap *vap, struct sk_buff *skb)
ph->rate[0] = p2h->rate.data; ph->rate[0] = p2h->rate.data;
skb_pull(skb, sizeof(struct wlan_ng_prism2_header)); skb_pull(skb, sizeof(struct wlan_ng_prism2_header));
} }
wh = (struct ieee80211_frame *) skb->data; wh = (struct ieee80211_frame *)skb->data;
if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL) if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL)
ph->try[0] = 1; ph->try[0] = 1;
break; break;
@ -265,7 +265,7 @@ ieee80211_monitor_encap(struct ieee80211vap *vap, struct sk_buff *skb)
case ARPHRD_IEEE80211_ATHDESC: { case ARPHRD_IEEE80211_ATHDESC: {
if (skb->len > ATHDESC_HEADER_SIZE) { if (skb->len > ATHDESC_HEADER_SIZE) {
struct ar5212_openbsd_desc *desc = struct ar5212_openbsd_desc *desc =
(struct ar5212_openbsd_desc *) (skb->data + 8); (struct ar5212_openbsd_desc *)(skb->data + 8);
ph->power = desc->xmit_power; ph->power = desc->xmit_power;
ph->rate[0] = ratecode_to_dot11(desc->xmit_rate0); ph->rate[0] = ratecode_to_dot11(desc->xmit_rate0);
ph->rate[1] = ratecode_to_dot11(desc->xmit_rate1); ph->rate[1] = ratecode_to_dot11(desc->xmit_rate1);
@ -462,7 +462,7 @@ ieee80211_input_monitor(struct ieee80211com *ic, struct sk_buff *skb,
break; break;
} }
th = (struct ath_tx_radiotap_header *) skb_push(skb1, th = (struct ath_tx_radiotap_header *)skb_push(skb1,
sizeof(struct ath_tx_radiotap_header)); sizeof(struct ath_tx_radiotap_header));
memset(th, 0, sizeof(struct ath_tx_radiotap_header)); memset(th, 0, sizeof(struct ath_tx_radiotap_header));
th->wt_ihdr.it_version = 0; th->wt_ihdr.it_version = 0;
@ -491,7 +491,7 @@ ieee80211_input_monitor(struct ieee80211com *ic, struct sk_buff *skb,
break; break;
} }
th = (struct ath_rx_radiotap_header *) skb_push(skb1, th = (struct ath_rx_radiotap_header *)skb_push(skb1,
sizeof(struct ath_rx_radiotap_header)); sizeof(struct ath_rx_radiotap_header));
memset(th, 0, sizeof(struct ath_rx_radiotap_header)); memset(th, 0, sizeof(struct ath_rx_radiotap_header));
th->wr_ihdr.it_version = 0; th->wr_ihdr.it_version = 0;

View File

@ -70,7 +70,7 @@
#define ieee80211_alloc_node(_vap, _mac) \ #define ieee80211_alloc_node(_vap, _mac) \
ieee80211_alloc_node_debug(_vap, _mac, __func__, __LINE__) ieee80211_alloc_node_debug(_vap, _mac, __func__, __LINE__)
static struct ieee80211_node *ieee80211_alloc_node_debug(struct ieee80211vap *, static struct ieee80211_node *ieee80211_alloc_node_debug(struct ieee80211vap *,
const u_int8_t *, const char* func, int line); const u_int8_t *, const char *func, int line);
#else #else
static struct ieee80211_node *ieee80211_alloc_node(struct ieee80211vap *, static struct ieee80211_node *ieee80211_alloc_node(struct ieee80211vap *,
const u_int8_t *); const u_int8_t *);
@ -80,10 +80,10 @@ static int ieee80211_sta_join1(struct ieee80211_node *);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
static struct ieee80211_node *node_alloc_debug(struct ieee80211vap *, static struct ieee80211_node *node_alloc_debug(struct ieee80211vap *,
const char* func, int line); const char *func, int line);
static void node_cleanup_debug(struct ieee80211_node *, const char* func, static void node_cleanup_debug(struct ieee80211_node *, const char *func,
int line); int line);
static void node_free_debug(struct ieee80211_node *, const char* func, static void node_free_debug(struct ieee80211_node *, const char *func,
int line); int line);
#else /* #ifdef IEEE80211_DEBUG_REFCNT */ #else /* #ifdef IEEE80211_DEBUG_REFCNT */
static struct ieee80211_node *node_alloc(struct ieee80211vap *); static struct ieee80211_node *node_alloc(struct ieee80211vap *);
@ -98,7 +98,7 @@ static u_int8_t node_getrssi(const struct ieee80211_node *);
#define node_table_leave_locked(_table, _node) \ #define node_table_leave_locked(_table, _node) \
node_table_leave_locked_debug(_table, _node, __func__, __LINE__) node_table_leave_locked_debug(_table, _node, __func__, __LINE__)
static void node_table_leave_locked_debug(struct ieee80211_node_table *, static void node_table_leave_locked_debug(struct ieee80211_node_table *,
struct ieee80211_node *, const char* func, int line); struct ieee80211_node *, const char *func, int line);
#else #else
static void node_table_leave_locked(struct ieee80211_node_table *, static void node_table_leave_locked(struct ieee80211_node_table *,
struct ieee80211_node *); struct ieee80211_node *);
@ -108,7 +108,7 @@ static void node_table_leave_locked(struct ieee80211_node_table *,
#define node_table_join_locked(_table, _node) \ #define node_table_join_locked(_table, _node) \
node_table_join_locked_debug(_table, _node, __func__, __LINE__) node_table_join_locked_debug(_table, _node, __func__, __LINE__)
static void node_table_join_locked_debug(struct ieee80211_node_table *, static void node_table_join_locked_debug(struct ieee80211_node_table *,
struct ieee80211_node *, const char* func, int line); struct ieee80211_node *, const char *func, int line);
#else #else
static void node_table_join_locked(struct ieee80211_node_table *, static void node_table_join_locked(struct ieee80211_node_table *,
struct ieee80211_node *); struct ieee80211_node *);
@ -296,7 +296,7 @@ copy_bss_state(struct ieee80211_node *nbss, const struct ieee80211_node *obss)
} }
void void
ieee80211_create_ibss(struct ieee80211vap* vap, struct ieee80211_channel *chan) ieee80211_create_ibss(struct ieee80211vap *vap, struct ieee80211_channel *chan)
{ {
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_node *ni; struct ieee80211_node *ni;
@ -671,7 +671,7 @@ ieee80211_sta_join1(struct ieee80211_node *selbs)
void void
ieee80211_sta_join1_tasklet(IEEE80211_TQUEUE_ARG data) ieee80211_sta_join1_tasklet(IEEE80211_TQUEUE_ARG data)
{ {
struct ieee80211vap *vap= (struct ieee80211vap *) data; struct ieee80211vap *vap= (struct ieee80211vap *)data;
int rc; int rc;
rc = ieee80211_new_state(vap, vap->iv_nsparams.newstate, vap->iv_nsparams.arg); rc = ieee80211_new_state(vap, vap->iv_nsparams.newstate, vap->iv_nsparams.arg);
@ -784,7 +784,7 @@ static __inline
void void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
node_table_join_locked_debug(struct ieee80211_node_table *nt, node_table_join_locked_debug(struct ieee80211_node_table *nt,
struct ieee80211_node *ni, const char* func, int line) struct ieee80211_node *ni, const char *func, int line)
#else #else
node_table_join_locked(struct ieee80211_node_table *nt, node_table_join_locked(struct ieee80211_node_table *nt,
struct ieee80211_node *ni) struct ieee80211_node *ni)
@ -810,7 +810,7 @@ static __inline
void void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
node_table_leave_locked_debug(struct ieee80211_node_table *nt, node_table_leave_locked_debug(struct ieee80211_node_table *nt,
struct ieee80211_node *ni, const char* func, int line) struct ieee80211_node *ni, const char *func, int line)
#else #else
node_table_leave_locked(struct ieee80211_node_table *nt, node_table_leave_locked(struct ieee80211_node_table *nt,
struct ieee80211_node *ni) struct ieee80211_node *ni)
@ -838,7 +838,7 @@ node_table_leave_locked(struct ieee80211_node_table *nt,
*/ */
static struct ieee80211_node * static struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
node_alloc_debug(struct ieee80211vap *vap, const char* func, int line) node_alloc_debug(struct ieee80211vap *vap, const char *func, int line)
#else #else
node_alloc(struct ieee80211vap *vap) node_alloc(struct ieee80211vap *vap)
#endif #endif
@ -861,7 +861,7 @@ node_alloc(struct ieee80211vap *vap)
*/ */
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
node_cleanup_debug(struct ieee80211_node *ni, const char* func, int line) node_cleanup_debug(struct ieee80211_node *ni, const char *func, int line)
#else #else
node_cleanup(struct ieee80211_node *ni) node_cleanup(struct ieee80211_node *ni)
#endif #endif
@ -927,10 +927,10 @@ node_print_message(
int refcnt_adjust, int refcnt_adjust,
const struct ieee80211_node *ni, const struct ieee80211_node *ni,
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
const char* func1, int line1, const char *func1, int line1,
#endif #endif
const char* func2, int line2, const char *func2, int line2,
const char* message, const char *message,
...) ...)
{ {
va_list args; va_list args;
@ -978,7 +978,7 @@ EXPORT_SYMBOL(node_print_message);
static void static void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
node_free_debug(struct ieee80211_node *ni, const char* func, int line) node_free_debug(struct ieee80211_node *ni, const char *func, int line)
#else #else
node_free(struct ieee80211_node *ni) node_free(struct ieee80211_node *ni)
#endif #endif
@ -1027,14 +1027,14 @@ node_getrssi(const struct ieee80211_node *ni)
* used by the routines below to create entries with a * used by the routines below to create entries with a
* specific purpose. * specific purpose.
* Dont assume a BSS? * Dont assume a BSS?
* Allocates a new ieee80211_node* that has a reference * Allocates a new struct ieee80211_node that has a reference
* count of one, and adds it to the node table. * count of one, and adds it to the node table.
*/ */
struct ieee80211_node * struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_alloc_node_table_debug(struct ieee80211vap *vap, ieee80211_alloc_node_table_debug(struct ieee80211vap *vap,
const u_int8_t *macaddr, const u_int8_t *macaddr,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_alloc_node_table(struct ieee80211vap *vap, ieee80211_alloc_node_table(struct ieee80211vap *vap,
const u_int8_t *macaddr) const u_int8_t *macaddr)
@ -1082,7 +1082,7 @@ EXPORT_SYMBOL(ieee80211_alloc_node_table);
*/ */
static struct ieee80211_node * static struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_alloc_node_debug(struct ieee80211vap *vap, const u_int8_t *macaddr, const char* func, int line) ieee80211_alloc_node_debug(struct ieee80211vap *vap, const u_int8_t *macaddr, const char *func, int line)
#else #else
ieee80211_alloc_node(struct ieee80211vap *vap, const u_int8_t *macaddr) ieee80211_alloc_node(struct ieee80211vap *vap, const u_int8_t *macaddr)
#endif #endif
@ -1135,7 +1135,7 @@ int
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_add_wds_addr_debug(struct ieee80211_node_table *nt, ieee80211_add_wds_addr_debug(struct ieee80211_node_table *nt,
struct ieee80211_node *ni, const u_int8_t *macaddr, u_int8_t wds_static, struct ieee80211_node *ni, const u_int8_t *macaddr, u_int8_t wds_static,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_add_wds_addr(struct ieee80211_node_table *nt, ieee80211_add_wds_addr(struct ieee80211_node_table *nt,
struct ieee80211_node *ni, const u_int8_t *macaddr, u_int8_t wds_static) struct ieee80211_node *ni, const u_int8_t *macaddr, u_int8_t wds_static)
@ -1177,7 +1177,7 @@ EXPORT_SYMBOL(ieee80211_add_wds_addr);
void void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_remove_wds_addr_debug(struct ieee80211_node_table *nt, const u_int8_t *macaddr, ieee80211_remove_wds_addr_debug(struct ieee80211_node_table *nt, const u_int8_t *macaddr,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_remove_wds_addr(struct ieee80211_node_table *nt, const u_int8_t *macaddr) ieee80211_remove_wds_addr(struct ieee80211_node_table *nt, const u_int8_t *macaddr)
#endif #endif
@ -1211,7 +1211,7 @@ EXPORT_SYMBOL(ieee80211_remove_wds_addr);
void void
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_del_wds_node_debug(struct ieee80211_node_table *nt, struct ieee80211_node *ni, ieee80211_del_wds_node_debug(struct ieee80211_node_table *nt, struct ieee80211_node *ni,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_del_wds_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni) ieee80211_del_wds_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni)
#endif #endif
@ -1267,13 +1267,13 @@ ieee80211_node_wds_ageout(unsigned long data)
/* Add the specified station to the station table. /* Add the specified station to the station table.
* Allocates a new ieee80211_node* that has a reference count of one * Allocates a new struct ieee80211_node that has a reference count of one
* If tmp is 0, it is added to the node table and the reference is used. * If tmp is 0, it is added to the node table and the reference is used.
* If tmp is 1, then the caller gets to use the reference. */ * If tmp is 1, then the caller gets to use the reference. */
struct ieee80211_node * struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_dup_bss_debug(struct ieee80211vap *vap, const u_int8_t *macaddr, ieee80211_dup_bss_debug(struct ieee80211vap *vap, const u_int8_t *macaddr,
unsigned char tmp, const char* func, int line) unsigned char tmp, const char *func, int line)
#else #else
ieee80211_dup_bss(struct ieee80211vap *vap, const u_int8_t *macaddr, ieee80211_dup_bss(struct ieee80211vap *vap, const u_int8_t *macaddr,
unsigned char tmp) unsigned char tmp)
@ -1314,7 +1314,7 @@ ieee80211_dup_bss(struct ieee80211vap *vap, const u_int8_t *macaddr,
static struct ieee80211_node * static struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_find_wds_node_locked_debug(struct ieee80211_node_table *nt, ieee80211_find_wds_node_locked_debug(struct ieee80211_node_table *nt,
const u_int8_t *macaddr, const char* func, int line) const u_int8_t *macaddr, const char *func, int line)
#else #else
ieee80211_find_wds_node_locked(struct ieee80211_node_table *nt, ieee80211_find_wds_node_locked(struct ieee80211_node_table *nt,
const u_int8_t *macaddr) const u_int8_t *macaddr)
@ -1389,7 +1389,7 @@ ieee80211_find_node_locked(struct ieee80211_node_table *nt,
struct ieee80211_node * struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_find_wds_node_debug(struct ieee80211_node_table *nt, const u_int8_t *macaddr, ieee80211_find_wds_node_debug(struct ieee80211_node_table *nt, const u_int8_t *macaddr,
const char* func, int line) const char *func, int line)
#else #else
ieee80211_find_wds_node(struct ieee80211_node_table *nt, const u_int8_t *macaddr) ieee80211_find_wds_node(struct ieee80211_node_table *nt, const u_int8_t *macaddr)
#endif #endif
@ -1449,7 +1449,7 @@ struct ieee80211_node *
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ieee80211_fakeup_adhoc_node_debug(struct ieee80211vap *vap, ieee80211_fakeup_adhoc_node_debug(struct ieee80211vap *vap,
const u_int8_t macaddr[IEEE80211_ADDR_LEN], const u_int8_t macaddr[IEEE80211_ADDR_LEN],
const char* func, int line) const char *func, int line)
#else #else
ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap, ieee80211_fakeup_adhoc_node(struct ieee80211vap *vap,
const u_int8_t macaddr[IEEE80211_ADDR_LEN]) const u_int8_t macaddr[IEEE80211_ADDR_LEN])
@ -1875,7 +1875,7 @@ restart:
static void static void
ieee80211_node_timeout(unsigned long arg) ieee80211_node_timeout(unsigned long arg)
{ {
struct ieee80211com *ic = (struct ieee80211com *) arg; struct ieee80211com *ic = (struct ieee80211com *)arg;
ieee80211_scan_timeout(ic); ieee80211_scan_timeout(ic);
ieee80211_timeout_stations(&ic->ic_sta); ieee80211_timeout_stations(&ic->ic_sta);
@ -1954,7 +1954,7 @@ void
ieee80211_dump_nodes(struct ieee80211_node_table *nt) ieee80211_dump_nodes(struct ieee80211_node_table *nt)
{ {
ieee80211_iterate_nodes(nt, ieee80211_iterate_nodes(nt,
(ieee80211_iter_func *) ieee80211_dump_node, nt); (ieee80211_iter_func *)ieee80211_dump_node, nt);
} }
/* /*
@ -2169,7 +2169,7 @@ ieee80211_node_join(struct ieee80211_node *ni, int resp)
if (ni->ni_needed_chans != NULL) { if (ni->ni_needed_chans != NULL) {
/* remove nodes which don't support one of ni->ni_needed_chans */ /* remove nodes which don't support one of ni->ni_needed_chans */
ieee80211_iterate_nodes(&ic->ic_sta, &remove_worse_nodes, (void*)ni); ieee80211_iterate_nodes(&ic->ic_sta, &remove_worse_nodes, (void *)ni);
FREE(ni->ni_needed_chans, M_DEVBUF); FREE(ni->ni_needed_chans, M_DEVBUF);
ni->ni_needed_chans = NULL; ni->ni_needed_chans = NULL;
} }
@ -2452,13 +2452,13 @@ ieee80211_unref_node(struct ieee80211_node **pni)
{ {
struct ieee80211_node *ni = NULL; struct ieee80211_node *ni = NULL;
if (pni == NULL) { if (pni == NULL) {
printk(KERN_ERR "%s: NULL ieee80211_node**\n", __func__); printk(KERN_ERR "%s: NULL ieee80211_node **\n", __func__);
dump_stack(); dump_stack();
return; return;
} }
ni = *pni; ni = *pni;
if (ni == NULL) { if (ni == NULL) {
printk(KERN_ERR "%s: NULL ieee80211_node*\n", __func__); printk(KERN_ERR "%s: NULL ieee80211_node *\n", __func__);
dump_stack(); dump_stack();
return; return;
} }

View File

@ -134,7 +134,7 @@ struct ieee80211_node {
u_int8_t *ni_needed_chans; /* nodes which don't support these will be removed */ u_int8_t *ni_needed_chans; /* nodes which don't support these will be removed */
u_int8_t ni_n_needed_chans; /* size of ni_needed_chans list */ u_int8_t ni_n_needed_chans; /* size of ni_needed_chans list */
u_int16_t ni_txseqs[17]; /* tx seq per-tid */ u_int16_t ni_txseqs[17]; /* tx seq per-tid */
u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid*/ u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid */
unsigned long ni_rxfragstamp; /* time stamp of last rx frag */ unsigned long ni_rxfragstamp; /* time stamp of last rx frag */
struct sk_buff *ni_rxfrag; /* rx frag reassembly */ struct sk_buff *ni_rxfrag; /* rx frag reassembly */
struct ieee80211_rsnparms ni_rsn; /* RSN/WPA parameters */ struct ieee80211_rsnparms ni_rsn; /* RSN/WPA parameters */
@ -255,26 +255,26 @@ struct ieee80211_node_table {
struct timer_list nt_wds_aging_timer; /* timer to age out wds entries */ struct timer_list nt_wds_aging_timer; /* timer to age out wds entries */
}; };
/* Allocates a new ieee80211_node* that has a reference count of one, and /* Allocates a new ieee80211_node * that has a reference count of one, and
* adds it to the node table. */ * adds it to the node table. */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_alloc_node_table(_vap, _mac) \ #define ieee80211_alloc_node_table(_vap, _mac) \
ieee80211_alloc_node_table_debug(_vap, _mac, __func__, __LINE__) ieee80211_alloc_node_table_debug(_vap, _mac, __func__, __LINE__)
struct ieee80211_node *ieee80211_alloc_node_table_debug(struct ieee80211vap *, struct ieee80211_node *ieee80211_alloc_node_table_debug(struct ieee80211vap *,
const u_int8_t *, const char* name, int line); const u_int8_t *, const char *name, int line);
#else #else
struct ieee80211_node *ieee80211_alloc_node_table(struct ieee80211vap *, struct ieee80211_node *ieee80211_alloc_node_table(struct ieee80211vap *,
const u_int8_t *); const u_int8_t *);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
/* Allocates a new ieee80211_node* that has a reference count. /* Allocates a new ieee80211_node * that has a reference count.
* If tmp is 0, it is added to the node table and the reference is used. * If tmp is 0, it is added to the node table and the reference is used.
* If tmp is 1, then the caller gets to use the reference. */ * If tmp is 1, then the caller gets to use the reference. */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_dup_bss(_vap, _mac, _tmp) \ #define ieee80211_dup_bss(_vap, _mac, _tmp) \
ieee80211_dup_bss_debug(_vap, _mac, _tmp, __func__, __LINE__) ieee80211_dup_bss_debug(_vap, _mac, _tmp, __func__, __LINE__)
struct ieee80211_node *ieee80211_dup_bss_debug(struct ieee80211vap *, struct ieee80211_node *ieee80211_dup_bss_debug(struct ieee80211vap *,
const u_int8_t *, unsigned char tmp, const char*, int); const u_int8_t *, unsigned char tmp, const char *, int);
#else #else
struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *, struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *,
const u_int8_t *, unsigned char tmp); const u_int8_t *, unsigned char tmp);
@ -282,7 +282,7 @@ struct ieee80211_node *ieee80211_dup_bss(struct ieee80211vap *,
void ieee80211_node_reset(struct ieee80211_node *, struct ieee80211vap *); void ieee80211_node_reset(struct ieee80211_node *, struct ieee80211vap *);
/* Returns a ieee80211_node* with refcount incremented, if found */ /* Returns a ieee80211_node * with refcount incremented, if found */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_find_node(_nt, _mac) \ #define ieee80211_find_node(_nt, _mac) \
ieee80211_find_node_debug(_nt, _mac, __func__, __LINE__) ieee80211_find_node_debug(_nt, _mac, __func__, __LINE__)
@ -293,7 +293,7 @@ struct ieee80211_node *ieee80211_find_node(struct ieee80211_node_table *,
const u_int8_t *); const u_int8_t *);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
/* Returns a ieee80211_node* with refcount incremented, if found */ /* Returns a ieee80211_node * with refcount incremented, if found */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_find_rxnode(_nt, _wh) \ #define ieee80211_find_rxnode(_nt, _wh) \
ieee80211_find_rxnode_debug(_nt, _wh, __func__, __LINE__) ieee80211_find_rxnode_debug(_nt, _wh, __func__, __LINE__)
@ -304,7 +304,7 @@ struct ieee80211_node *ieee80211_find_rxnode(struct ieee80211com *,
const struct ieee80211_frame_min *); const struct ieee80211_frame_min *);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
/* Returns a ieee80211_node* with refcount incremented, if found */ /* Returns a ieee80211_node * with refcount incremented, if found */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_find_txnode(_nt, _mac) \ #define ieee80211_find_txnode(_nt, _mac) \
ieee80211_find_txnode_debug(_nt, _mac, __func__, __LINE__) ieee80211_find_txnode_debug(_nt, _mac, __func__, __LINE__)
@ -328,7 +328,7 @@ void ieee80211_free_node(struct ieee80211_node *ni);
* This only happens when finding the a node reference from the node table, * This only happens when finding the a node reference from the node table,
* which is locked seperately. Thus, we do not need to lock the follwoing * which is locked seperately. Thus, we do not need to lock the follwoing
* functions. * functions.
* Increment the reference counter for ieee80211_node* * Increment the reference counter for ieee80211_node *
*/ */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_ref_node(_ni) \ #define ieee80211_ref_node(_ni) \
@ -350,7 +350,7 @@ ieee80211_pass_node(struct ieee80211_node **pni) {
return (tmp); return (tmp);
} }
/* Decrement ieee80211_node* refcount, and relinquish the pointer. */ /* Decrement ieee80211_node * refcount, and relinquish the pointer. */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_unref_node(_pni) \ #define ieee80211_unref_node(_pni) \
ieee80211_unref_node_debug(_pni, __func__, __LINE__) ieee80211_unref_node_debug(_pni, __func__, __LINE__)
@ -366,7 +366,7 @@ ieee80211_unref_node(struct ieee80211_node **pni);
#define ieee80211_add_wds_addr(_table, _node, _mac, _static) \ #define ieee80211_add_wds_addr(_table, _node, _mac, _static) \
ieee80211_add_wds_addr_debug(_table, _node, _mac, _static, __func__, __LINE__) ieee80211_add_wds_addr_debug(_table, _node, _mac, _static, __func__, __LINE__)
int ieee80211_add_wds_addr_debug(struct ieee80211_node_table *, struct ieee80211_node *, int ieee80211_add_wds_addr_debug(struct ieee80211_node_table *, struct ieee80211_node *,
const u_int8_t *, u_int8_t, const char* func, int line); const u_int8_t *, u_int8_t, const char *func, int line);
#else #else
int ieee80211_add_wds_addr(struct ieee80211_node_table *, struct ieee80211_node *, int ieee80211_add_wds_addr(struct ieee80211_node_table *, struct ieee80211_node *,
const u_int8_t *, u_int8_t); const u_int8_t *, u_int8_t);
@ -377,7 +377,7 @@ int ieee80211_add_wds_addr(struct ieee80211_node_table *, struct ieee80211_node
#define ieee80211_remove_wds_addr(_table, _mac) \ #define ieee80211_remove_wds_addr(_table, _mac) \
ieee80211_remove_wds_addr_debug(_table, _mac, __func__, __LINE__) ieee80211_remove_wds_addr_debug(_table, _mac, __func__, __LINE__)
void ieee80211_remove_wds_addr_debug(struct ieee80211_node_table *, const u_int8_t *, void ieee80211_remove_wds_addr_debug(struct ieee80211_node_table *, const u_int8_t *,
const char* func, int line); const char *func, int line);
#else #else
void ieee80211_remove_wds_addr(struct ieee80211_node_table *, const u_int8_t *); void ieee80211_remove_wds_addr(struct ieee80211_node_table *, const u_int8_t *);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -387,7 +387,7 @@ void ieee80211_remove_wds_addr(struct ieee80211_node_table *, const u_int8_t *);
#define ieee80211_del_wds_node(_table, _node) \ #define ieee80211_del_wds_node(_table, _node) \
ieee80211_del_wds_node_debug(_table, _node, __func__, __LINE__) ieee80211_del_wds_node_debug(_table, _node, __func__, __LINE__)
void ieee80211_del_wds_node_debug(struct ieee80211_node_table *, struct ieee80211_node *, void ieee80211_del_wds_node_debug(struct ieee80211_node_table *, struct ieee80211_node *,
const char* func, int line); const char *func, int line);
#else #else
void ieee80211_del_wds_node(struct ieee80211_node_table *, struct ieee80211_node *); void ieee80211_del_wds_node(struct ieee80211_node_table *, struct ieee80211_node *);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
@ -397,7 +397,7 @@ void ieee80211_del_wds_node(struct ieee80211_node_table *, struct ieee80211_node
#define ieee80211_find_wds_node(_table, _mac) \ #define ieee80211_find_wds_node(_table, _mac) \
ieee80211_find_wds_node_debug(_table, _mac, __func__, __LINE__) ieee80211_find_wds_node_debug(_table, _mac, __func__, __LINE__)
struct ieee80211_node *ieee80211_find_wds_node_debug(struct ieee80211_node_table *, struct ieee80211_node *ieee80211_find_wds_node_debug(struct ieee80211_node_table *,
const u_int8_t *, const char* func, int line); const u_int8_t *, const char *func, int line);
#else #else
struct ieee80211_node *ieee80211_find_wds_node(struct ieee80211_node_table *, struct ieee80211_node *ieee80211_find_wds_node(struct ieee80211_node_table *,
const u_int8_t *); const u_int8_t *);
@ -415,7 +415,7 @@ void ieee80211_dump_nodes(struct ieee80211_node_table *);
#define ieee80211_fakeup_adhoc_node(_vap, _mac) \ #define ieee80211_fakeup_adhoc_node(_vap, _mac) \
ieee80211_fakeup_adhoc_node_debug(_vap, _mac, __func__, __LINE__) ieee80211_fakeup_adhoc_node_debug(_vap, _mac, __func__, __LINE__)
struct ieee80211_node *ieee80211_fakeup_adhoc_node_debug(struct ieee80211vap *, struct ieee80211_node *ieee80211_fakeup_adhoc_node_debug(struct ieee80211vap *,
const u_int8_t macaddr[], const char*, int); const u_int8_t macaddr[], const char *, int);
#else #else
struct ieee80211_node *ieee80211_fakeup_adhoc_node(struct ieee80211vap *, struct ieee80211_node *ieee80211_fakeup_adhoc_node(struct ieee80211vap *,
const u_int8_t macaddr[]); const u_int8_t macaddr[]);

View File

@ -83,7 +83,7 @@ static int
ieee80211_classify(struct ieee80211_node *ni, struct sk_buff *skb) ieee80211_classify(struct ieee80211_node *ni, struct sk_buff *skb)
{ {
struct ieee80211vap *vap = ni->ni_vap; struct ieee80211vap *vap = ni->ni_vap;
struct ether_header *eh = (struct ether_header *) skb->data; struct ether_header *eh = (struct ether_header *)skb->data;
int v_wme_ac = 0, d_wme_ac = 0; int v_wme_ac = 0, d_wme_ac = 0;
/* default priority */ /* default priority */
@ -898,7 +898,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
* add first skb tunnel hdrs * add first skb tunnel hdrs
*/ */
llc = (struct llc *) skb_push(skb, LLC_SNAPFRAMELEN); llc = (struct llc *)skb_push(skb, LLC_SNAPFRAMELEN);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI; llc->llc_control = LLC_UI;
llc->llc_snap.org_code[0] = 0; llc->llc_snap.org_code[0] = 0;
@ -906,7 +906,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
llc->llc_snap.org_code[2] = 0; llc->llc_snap.org_code[2] = 0;
llc->llc_snap.ether_type = eh.ether_type; llc->llc_snap.ether_type = eh.ether_type;
eh_inter = (struct ether_header *) skb_push(skb, sizeof(struct ether_header)); eh_inter = (struct ether_header *)skb_push(skb, sizeof(struct ether_header));
memcpy(eh_inter, &eh, sizeof(struct ether_header) - sizeof eh.ether_type); memcpy(eh_inter, &eh, sizeof(struct ether_header) - sizeof eh.ether_type);
eh_inter->ether_type = htons(payload); eh_inter->ether_type = htons(payload);
@ -914,7 +914,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
/* XXX: the offset of 2, below, should be computed. but... it will not /* XXX: the offset of 2, below, should be computed. but... it will not
* practically ever change. * practically ever change.
*/ */
ffhdr = (struct athl2p_tunnel_hdr *) skb_push(skb, sizeof(struct athl2p_tunnel_hdr) + 2); ffhdr = (struct athl2p_tunnel_hdr *)skb_push(skb, sizeof(struct athl2p_tunnel_hdr) + 2);
memset(ffhdr, 0, sizeof(struct athl2p_tunnel_hdr) + 2); memset(ffhdr, 0, sizeof(struct athl2p_tunnel_hdr) + 2);
/* /*
@ -923,7 +923,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
payload = skb2->len + LLC_SNAPFRAMELEN; payload = skb2->len + LLC_SNAPFRAMELEN;
llc = (struct llc *) skb_push(skb2, LLC_SNAPFRAMELEN); llc = (struct llc *)skb_push(skb2, LLC_SNAPFRAMELEN);
if (llc == NULL) { if (llc == NULL) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPG, IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPG,
"%s: failed to push llc for 2nd skb (%p)\n", "%s: failed to push llc for 2nd skb (%p)\n",
@ -937,7 +937,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
llc->llc_snap.org_code[2] = 0; llc->llc_snap.org_code[2] = 0;
llc->llc_snap.ether_type = eh2.ether_type; llc->llc_snap.ether_type = eh2.ether_type;
eh_inter = (struct ether_header *) skb_push(skb2, sizeof(struct ether_header)); eh_inter = (struct ether_header *)skb_push(skb2, sizeof(struct ether_header));
if (eh_inter == NULL) { if (eh_inter == NULL) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPG, IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPG,
"%s: failed to push eth hdr for 2nd skb (%p)\n", "%s: failed to push eth hdr for 2nd skb (%p)\n",
@ -953,7 +953,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
} }
#endif #endif
llc = (struct llc *) skb_push(skb, LLC_SNAPFRAMELEN); llc = (struct llc *)skb_push(skb, LLC_SNAPFRAMELEN);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI; llc->llc_control = LLC_UI;
#ifndef ATH_SUPERG_FF #ifndef ATH_SUPERG_FF
@ -976,7 +976,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
#endif /* ATH_SUPERG_FF */ #endif /* ATH_SUPERG_FF */
datalen = skb->len; /* NB: w/o 802.11 header */ datalen = skb->len; /* NB: w/o 802.11 header */
wh = (struct ieee80211_frame *) skb_push(skb, hdrsize); wh = (struct ieee80211_frame *)skb_push(skb, hdrsize);
wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_DATA; wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_DATA;
wh->i_dur = 0; wh->i_dur = 0;
if (use4addr) { if (use4addr) {
@ -1031,7 +1031,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT; wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT;
if (addqos) { if (addqos) {
struct ieee80211_qosframe *qwh = struct ieee80211_qosframe *qwh =
(struct ieee80211_qosframe *) wh; (struct ieee80211_qosframe *)wh;
u_int8_t *qos; u_int8_t *qos;
int tid; int tid;
@ -1066,7 +1066,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
tailsize = IEEE80211_CRC_LEN; tailsize = IEEE80211_CRC_LEN;
if (key != NULL) { if (key != NULL) {
cip = (struct ieee80211_cipher *) key->wk_cipher; cip = (struct ieee80211_cipher *)key->wk_cipher;
ciphdrsize = cip->ic_header; ciphdrsize = cip->ic_header;
tailsize += (cip->ic_trailer + cip->ic_miclen); tailsize += (cip->ic_trailer + cip->ic_miclen);
@ -1127,7 +1127,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
void *pdu; void *pdu;
fragnum = 0; fragnum = 0;
wh = twh = (struct ieee80211_frame *) skb->data; wh = twh = (struct ieee80211_frame *)skb->data;
/* /*
** Setup WLAN headers as fragment headers ** Setup WLAN headers as fragment headers
@ -1149,8 +1149,8 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
/* /*
* Copy WLAN header into each frag header skb * Copy WLAN header into each frag header skb
*/ */
twh = (struct ieee80211_frame *) skb_put(tskb, hdrsize); twh = (struct ieee80211_frame *)skb_put(tskb, hdrsize);
memcpy((void *) twh, (void *) wh, hdrsize); memcpy((void *)twh, (void *)wh, hdrsize);
*(__le16 *)&twh->i_seq[0] |= *(__le16 *)&twh->i_seq[0] |=
htole16((fragnum & IEEE80211_SEQ_FRAG_MASK) << htole16((fragnum & IEEE80211_SEQ_FRAG_MASK) <<
@ -1170,7 +1170,7 @@ ieee80211_encap(struct ieee80211_node *ni, struct sk_buff *skb, int *framecnt)
* more efficient than cloning skbs. * more efficient than cloning skbs.
*/ */
pdu = skb_put(tskb, pdulen); pdu = skb_put(tskb, pdulen);
memcpy(pdu, (void *) skb->data+offset, pdulen); memcpy(pdu, (void *)skb->data + offset, pdulen);
offset += pdusize; offset += pdusize;
datalen -= pdusize; datalen -= pdusize;
@ -1528,7 +1528,7 @@ static u_int8_t *
ieee80211_add_wme(u_int8_t *frm, struct ieee80211_node *ni) ieee80211_add_wme(u_int8_t *frm, struct ieee80211_node *ni)
{ {
static const u_int8_t oui[4] = { WME_OUI_BYTES, WME_OUI_TYPE }; static const u_int8_t oui[4] = { WME_OUI_BYTES, WME_OUI_TYPE };
struct ieee80211_ie_wme *ie = (struct ieee80211_ie_wme *) frm; struct ieee80211_ie_wme *ie = (struct ieee80211_ie_wme *)frm;
struct ieee80211_wme_state *wme = &ni->ni_ic->ic_wme; struct ieee80211_wme_state *wme = &ni->ni_ic->ic_wme;
struct ieee80211vap *vap = ni->ni_vap; struct ieee80211vap *vap = ni->ni_vap;
@ -1572,7 +1572,7 @@ ieee80211_add_wme_param(u_int8_t *frm, struct ieee80211_wme_state *wme,
frm += 2; \ frm += 2; \
} while (0) } while (0)
static const u_int8_t oui[4] = { WME_OUI_BYTES, WME_OUI_TYPE }; static const u_int8_t oui[4] = { WME_OUI_BYTES, WME_OUI_TYPE };
struct ieee80211_wme_param *ie = (struct ieee80211_wme_param *) frm; struct ieee80211_wme_param *ie = (struct ieee80211_wme_param *)frm;
int i; int i;
*frm++ = IEEE80211_ELEMID_VENDOR; *frm++ = IEEE80211_ELEMID_VENDOR;
@ -1613,7 +1613,7 @@ ieee80211_add_athAdvCap(u_int8_t *frm, u_int8_t capability, u_int16_t defaultKey
static const u_int8_t oui[6] = {(ATH_OUI & 0xff), ((ATH_OUI >>8) & 0xff), static const u_int8_t oui[6] = {(ATH_OUI & 0xff), ((ATH_OUI >>8) & 0xff),
((ATH_OUI >> 16) & 0xff), ATH_OUI_TYPE, ((ATH_OUI >> 16) & 0xff), ATH_OUI_TYPE,
ATH_OUI_SUBTYPE, ATH_OUI_VERSION}; ATH_OUI_SUBTYPE, ATH_OUI_VERSION};
struct ieee80211_ie_athAdvCap *ie = (struct ieee80211_ie_athAdvCap *) frm; struct ieee80211_ie_athAdvCap *ie = (struct ieee80211_ie_athAdvCap *)frm;
*frm++ = IEEE80211_ELEMID_VENDOR; *frm++ = IEEE80211_ELEMID_VENDOR;
*frm++ = 0; /* Length filled in below */ *frm++ = 0; /* Length filled in below */
@ -1639,7 +1639,7 @@ ieee80211_add_xr_param(u_int8_t *frm, struct ieee80211vap *vap)
static const u_int8_t oui[6] = {(ATH_OUI & 0xff), ((ATH_OUI >>8) & 0xff), static const u_int8_t oui[6] = {(ATH_OUI & 0xff), ((ATH_OUI >>8) & 0xff),
((ATH_OUI >> 16) & 0xff), ATH_OUI_TYPE_XR, ((ATH_OUI >> 16) & 0xff), ATH_OUI_TYPE_XR,
ATH_OUI_SUBTYPE_XR, ATH_OUI_VER_XR}; ATH_OUI_SUBTYPE_XR, ATH_OUI_VER_XR};
struct ieee80211_xr_param *ie = (struct ieee80211_xr_param *) frm; struct ieee80211_xr_param *ie = (struct ieee80211_xr_param *)frm;
*frm++ = IEEE80211_ELEMID_VENDOR; *frm++ = IEEE80211_ELEMID_VENDOR;
*frm++ = 0; /* Length filled in below */ *frm++ = 0; /* Length filled in below */
@ -2207,7 +2207,7 @@ ieee80211_send_pspoll(struct ieee80211_node *ni)
SKB_NI(skb) = ieee80211_ref_node(ni); SKB_NI(skb) = ieee80211_ref_node(ni);
skb->priority = WME_AC_VO; skb->priority = WME_AC_VO;
wh = (struct ieee80211_ctlframe_addr2 *) skb_put(skb, sizeof(struct ieee80211_ctlframe_addr2)); wh = (struct ieee80211_ctlframe_addr2 *)skb_put(skb, sizeof(struct ieee80211_ctlframe_addr2));
wh->i_aidordur = htole16(0xc000 | IEEE80211_NODE_AID(ni)); wh->i_aidordur = htole16(0xc000 | IEEE80211_NODE_AID(ni));
IEEE80211_ADDR_COPY(wh->i_addr1, vap->iv_bssid); IEEE80211_ADDR_COPY(wh->i_addr1, vap->iv_bssid);

View File

@ -1236,7 +1236,7 @@ EXPORT_SYMBOL(ieee80211_beacon_miss);
static void static void
ieee80211_sta_swbmiss(unsigned long arg) ieee80211_sta_swbmiss(unsigned long arg)
{ {
struct ieee80211vap *vap = (struct ieee80211vap *) arg; struct ieee80211vap *vap = (struct ieee80211vap *)arg;
ieee80211_beacon_miss(vap->iv_ic); ieee80211_beacon_miss(vap->iv_ic);
} }
@ -1247,7 +1247,7 @@ ieee80211_sta_swbmiss(unsigned long arg)
static void static void
ieee80211_tx_timeout(unsigned long arg) ieee80211_tx_timeout(unsigned long arg)
{ {
struct ieee80211vap *vap = (struct ieee80211vap *) arg; struct ieee80211vap *vap = (struct ieee80211vap *)arg;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
"%s: state %s%s\n", __func__, "%s: state %s%s\n", __func__,
@ -1696,7 +1696,7 @@ static int get_dominant_state(struct ieee80211com *ic) {
} }
static void static void
dump_vap_states(struct ieee80211com *ic, struct ieee80211vap* highlighed) dump_vap_states(struct ieee80211com *ic, struct ieee80211vap *highlighed)
{ {
/* RE-count the number of VAPs in RUN, SCAN states */ /* RE-count the number of VAPs in RUN, SCAN states */
int nrunning = 0; int nrunning = 0;

View File

@ -68,7 +68,7 @@ struct scan_state {
struct tasklet_struct ss_pwrsav; /* sta ps ena tasklet */ struct tasklet_struct ss_pwrsav; /* sta ps ena tasklet */
struct timer_list ss_scan_timer; /* scan timer */ struct timer_list ss_scan_timer; /* scan timer */
}; };
#define SCAN_PRIVATE(ss) ((struct scan_state *) ss) #define SCAN_PRIVATE(_ss) ((struct scan_state *)(_ss))
/* /*
* Amount of time to go off-channel during a background * Amount of time to go off-channel during a background
@ -90,9 +90,9 @@ struct scan_state {
#define ROAM_RSSI_11A_DEFAULT 9 /* rssi threshold for 11a bss */ #define ROAM_RSSI_11A_DEFAULT 9 /* rssi threshold for 11a bss */
#define ROAM_RSSI_11B_DEFAULT 9 /* rssi threshold for 11b bss */ #define ROAM_RSSI_11B_DEFAULT 9 /* rssi threshold for 11b bss */
#define ROAM_RSSI_11BONLY_DEFAULT 9 /* rssi threshold for 11b-only bss */ #define ROAM_RSSI_11BONLY_DEFAULT 9 /* rssi threshold for 11b-only bss */
#define ROAM_RATE_11A_DEFAULT 2*24 /* tx rate threshold for 11a bss */ #define ROAM_RATE_11A_DEFAULT 2 * 24 /* tx rate threshold for 11a bss */
#define ROAM_RATE_11B_DEFAULT 2*9 /* tx rate threshold for 11b bss */ #define ROAM_RATE_11B_DEFAULT 2 * 9 /* tx rate threshold for 11b bss */
#define ROAM_RATE_11BONLY_DEFAULT 2*5 /* tx rate threshold for 11b-only bss */ #define ROAM_RATE_11BONLY_DEFAULT 2 * 5 /* tx rate threshold for 11b-only bss */
static void scan_restart_pwrsav(unsigned long); static void scan_restart_pwrsav(unsigned long);
static void scan_next(unsigned long); static void scan_next(unsigned long);
@ -286,7 +286,7 @@ EXPORT_SYMBOL(ieee80211_scan_dump_channels);
static void static void
scan_restart_pwrsav(unsigned long arg) scan_restart_pwrsav(unsigned long arg)
{ {
struct scan_state *ss = (struct scan_state *) arg; struct scan_state *ss = (struct scan_state *)arg;
struct ieee80211vap *vap = ss->base.ss_vap; struct ieee80211vap *vap = ss->base.ss_vap;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
int delay; int delay;
@ -630,7 +630,7 @@ static void
scan_next(unsigned long arg) scan_next(unsigned long arg)
{ {
#define ISCAN_REP (ISCAN_MINDWELL | ISCAN_START | ISCAN_DISCARD) #define ISCAN_REP (ISCAN_MINDWELL | ISCAN_START | ISCAN_DISCARD)
struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *)arg;
struct ieee80211vap *vap = ss->ss_vap; struct ieee80211vap *vap = ss->ss_vap;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_channel *chan; struct ieee80211_channel *chan;

View File

@ -284,7 +284,7 @@ found:
ise->se_timoff = sp->timoff; ise->se_timoff = sp->timoff;
if (sp->tim != NULL) { if (sp->tim != NULL) {
const struct ieee80211_tim_ie *tim = const struct ieee80211_tim_ie *tim =
(const struct ieee80211_tim_ie *) sp->tim; (const struct ieee80211_tim_ie *)sp->tim;
ise->se_dtimperiod = tim->tim_period; ise->se_dtimperiod = tim->tim_period;
} }
saveie(&ise->se_wme_ie, sp->wme); saveie(&ise->se_wme_ie, sp->wme);
@ -950,7 +950,8 @@ notfound:
* a reference to an entry w/o holding the lock on the table. * a reference to an entry w/o holding the lock on the table.
*/ */
static struct sta_entry * static struct sta_entry *
sta_lookup(struct sta_table *st, const u_int8_t macaddr[IEEE80211_ADDR_LEN], struct ieee80211_scan_ssid* essid) sta_lookup(struct sta_table *st, const u_int8_t macaddr[IEEE80211_ADDR_LEN],
struct ieee80211_scan_ssid *essid)
{ {
struct sta_entry *se; struct sta_entry *se;
int hash = STA_HASH(macaddr); int hash = STA_HASH(macaddr);

View File

@ -100,10 +100,10 @@ static void skb_print_message(
int show_counter, int show_counter,
const struct sk_buff *skb, const struct sk_buff *skb,
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
const char* func1, int line1, const char *func1, int line1,
#endif #endif
const char* func2, int line2, const char *func2, int line2,
const char* message, const char *message,
...) ...)
{ {
va_list args; va_list args;
@ -146,34 +146,34 @@ static void skb_print_message(
static void static void
print_skb_refchange_message( print_skb_refchange_message(
const struct sk_buff *skb, int users_adjustment, const struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2); const char *func2, int line2);
static void static void
print_skb_trackchange_message( print_skb_trackchange_message(
const struct sk_buff *skb, int users_adjustment, const struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2, const char *func2, int line2,
char* message); char *message);
/* Called automatically when an SKB reaches zero users, /* Called automatically when an SKB reaches zero users,
* reporting any leaked node references. */ * reporting any leaked node references. */
#ifdef IEEE80211_DEBUG_REFCNT_SKBDEST #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
static void skb_destructor(struct sk_buff* skb); static void skb_destructor(struct sk_buff *skb);
#endif #endif
static void get_skb_description(char *dst, int dst_size, const char* label, const struct sk_buff *skb, int users_adjustment); static void get_skb_description(char *dst, int dst_size, const char *label, const struct sk_buff *skb, int users_adjustment);
static struct sk_buff * static struct sk_buff *
clean_clone_or_copy(struct sk_buff *skb); clean_clone_or_copy(struct sk_buff *skb);
static struct sk_buff * static struct sk_buff *
track_skb(struct sk_buff *skb, int users_adjustment, track_skb(struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2); const char *func2, int line2);
static struct sk_buff * static struct sk_buff *
untrack_skb(struct sk_buff *skb, int users_adjustment, untrack_skb(struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2); const char *func2, int line2);
#define UNREF_USE_KFREE_SKB 0 #define UNREF_USE_KFREE_SKB 0
#define UNREF_USE_DEV_KFREE_SKB_ANY 1 #define UNREF_USE_DEV_KFREE_SKB_ANY 1
@ -183,20 +183,20 @@ untrack_skb(struct sk_buff *skb, int users_adjustment,
/* Assumes SKB is not yet freed at the time of the call and shows the new users /* Assumes SKB is not yet freed at the time of the call and shows the new users
* count as (users - 1). */ * count as (users - 1). */
static void unref_skb(struct sk_buff *skb, int type, static void unref_skb(struct sk_buff *skb, int type,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2); const char *func2, int line2);
/* Assumes SKB reference counter has already been updated and reports count as /* Assumes SKB reference counter has already been updated and reports count as
* atomic_read(&skb->users). */ * atomic_read(&skb->users). */
static struct sk_buff * static struct sk_buff *
ref_skb(struct sk_buff *skb, ref_skb(struct sk_buff *skb,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2); const char *func2, int line2);
#ifdef IEEE80211_DEBUG_REFCNT_SKBDEST #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
/* Destructor for reporting node reference leaks */ /* Destructor for reporting node reference leaks */
static void skb_destructor(struct sk_buff* skb) { static void skb_destructor(struct sk_buff *skb) {
/* Report any node reference leaks - caused by kernel net device queue /* Report any node reference leaks - caused by kernel net device queue
* dropping buffer, rather than passing it to the driver. */ * dropping buffer, rather than passing it to the driver. */
if (SKB_NI(skb) != NULL) { if (SKB_NI(skb) != NULL) {
@ -213,7 +213,7 @@ static void skb_destructor(struct sk_buff* skb) {
EXPORT_SYMBOL(skb_destructor); EXPORT_SYMBOL(skb_destructor);
#endif /* #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST */ #endif /* #ifdef IEEE80211_DEBUG_REFCNT_SKBDEST */
static void get_skb_description(char *dst, int dst_size, const char* label, const struct sk_buff *skb, int users_adjustment) { static void get_skb_description(char *dst, int dst_size, const char *label, const struct sk_buff *skb, int users_adjustment) {
dst[0] = '\0'; dst[0] = '\0';
if (NULL != skb) { if (NULL != skb) {
int adj_users = atomic_read(&skb->users) + users_adjustment; int adj_users = atomic_read(&skb->users) + users_adjustment;
@ -248,8 +248,8 @@ static void get_skb_description(char *dst, int dst_size, const char* label, cons
static void print_skb_refchange_message( static void print_skb_refchange_message(
const struct sk_buff *skb, int users_adjustment, const struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2) const char *func2, int line2)
{ {
char skb_desc[128] = { '\0' }; char skb_desc[128] = { '\0' };
if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB_REF)) if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB_REF))
@ -263,9 +263,9 @@ static void print_skb_refchange_message(
static void print_skb_trackchange_message( static void print_skb_trackchange_message(
const struct sk_buff *skb, int users_adjustment, const struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2, const char *func2, int line2,
char* message) char *message)
{ {
char skb_desc[128] = { '\0' }; char skb_desc[128] = { '\0' };
if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB)) if (0 == (ath_debug_global & GLOBAL_DEBUG_SKB))
@ -286,8 +286,8 @@ clean_clone_or_copy(struct sk_buff *skb) {
static struct sk_buff * static struct sk_buff *
track_skb(struct sk_buff *skb, int users_adjustment, track_skb(struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2) const char *func2, int line2)
{ {
if (NULL == skb) { if (NULL == skb) {
skb_print_message(0 /* show_counter */, skb_print_message(0 /* show_counter */,
@ -326,8 +326,8 @@ track_skb(struct sk_buff *skb, int users_adjustment,
static struct sk_buff * static struct sk_buff *
untrack_skb(struct sk_buff *skb, int users_adjustment, untrack_skb(struct sk_buff *skb, int users_adjustment,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2) const char *func2, int line2)
{ {
if (NULL == skb) { if (NULL == skb) {
skb_print_message(0 /* show_counter */, skb_print_message(0 /* show_counter */,
@ -373,8 +373,8 @@ untrack_skb(struct sk_buff *skb, int users_adjustment,
* count as (users - 1). */ * count as (users - 1). */
static void static void
unref_skb(struct sk_buff *skb, int type, unref_skb(struct sk_buff *skb, int type,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2) const char *func2, int line2)
{ {
if (NULL == skb) { if (NULL == skb) {
skb_print_message(0 /* show_counter */, skb_print_message(0 /* show_counter */,
@ -453,8 +453,8 @@ unref_skb(struct sk_buff *skb, int type,
* atomic_read(&skb->users). */ * atomic_read(&skb->users). */
static struct sk_buff * static struct sk_buff *
ref_skb(struct sk_buff *skb, ref_skb(struct sk_buff *skb,
const char* func1, int line1, const char *func1, int line1,
const char* func2, int line2) const char *func2, int line2)
{ {
if (NULL == skb) { if (NULL == skb) {
skb_print_message(0 /* show_counter */, skb_print_message(0 /* show_counter */,
@ -486,9 +486,9 @@ ref_skb(struct sk_buff *skb,
* - Free the node reference and set it to null. * - Free the node reference and set it to null.
* - Break the linked list, clearing next skb's prev pointer if possible. */ * - Break the linked list, clearing next skb's prev pointer if possible. */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
void ieee80211_dev_kfree_skb_debug(struct sk_buff** pskb, const char* func, int line) void ieee80211_dev_kfree_skb_debug(struct sk_buff **pskb, const char *func, int line)
#else #else
void ieee80211_dev_kfree_skb(struct sk_buff** pskb) void ieee80211_dev_kfree_skb(struct sk_buff **pskb)
#endif #endif
{ {
struct sk_buff *skb; struct sk_buff *skb;
@ -527,10 +527,10 @@ void ieee80211_dev_kfree_skb(struct sk_buff** pskb)
* a list of skbs, starting with the first. */ * a list of skbs, starting with the first. */
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
void void
ieee80211_dev_kfree_skb_list_debug(struct sk_buff** pskb, const char* func, int line) ieee80211_dev_kfree_skb_list_debug(struct sk_buff **pskb, const char *func, int line)
#else #else
void void
ieee80211_dev_kfree_skb_list(struct sk_buff** pskb) ieee80211_dev_kfree_skb_list(struct sk_buff **pskb)
#endif #endif
{ {
struct sk_buff *skb, *tskb; struct sk_buff *skb, *tskb;
@ -554,10 +554,10 @@ ieee80211_dev_kfree_skb_list(struct sk_buff** pskb)
} }
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
struct sk_buff* struct sk_buff *
ieee80211_dev_alloc_skb_debug(int size, const char* func, int line) ieee80211_dev_alloc_skb_debug(int size, const char *func, int line)
#else #else
struct sk_buff* struct sk_buff *
ieee80211_dev_alloc_skb(int size) ieee80211_dev_alloc_skb(int size)
#endif #endif
{ {
@ -584,7 +584,7 @@ ieee80211_dev_alloc_skb(int size)
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
void void
ieee80211_skb_track_debug(struct sk_buff *skb, const char* func, int line) { ieee80211_skb_track_debug(struct sk_buff *skb, const char *func, int line) {
track_skb(skb, 0 /* users_adjustment */, track_skb(skb, 0 /* users_adjustment */,
func, line, __func__, __LINE__); func, line, __func__, __LINE__);
} }
@ -598,7 +598,7 @@ ieee80211_skb_track(struct sk_buff *skb) {
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
void void
ieee80211_skb_untrack_debug(struct sk_buff *skb, const char* func, int line) { ieee80211_skb_untrack_debug(struct sk_buff *skb, const char *func, int line) {
untrack_skb(skb, 0 /* users_adjustment */, untrack_skb(skb, 0 /* users_adjustment */,
func, line, __func__, __LINE__); func, line, __func__, __LINE__);
} }
@ -632,13 +632,13 @@ ieee80211_skb_references(void) {
int vlan_hwaccel_rx_debug(struct sk_buff *skb, int vlan_hwaccel_rx_debug(struct sk_buff *skb,
struct vlan_group *grp, unsigned short vlan_tag, struct vlan_group *grp, unsigned short vlan_tag,
const char* func, int line) { const char *func, int line) {
return vlan_hwaccel_rx( return vlan_hwaccel_rx(
untrack_skb(skb, 0, func, line, __func__, __LINE__), untrack_skb(skb, 0, func, line, __func__, __LINE__),
grp, vlan_tag); grp, vlan_tag);
} }
int netif_rx_debug(struct sk_buff *skb, const char* func, int line) { int netif_rx_debug(struct sk_buff *skb, const char *func, int line) {
return netif_rx(untrack_skb(skb, 0, func, line, __func__, __LINE__)); return netif_rx(untrack_skb(skb, 0, func, line, __func__, __LINE__));
} }
@ -725,7 +725,7 @@ struct sk_buff * skb_share_check_debug(struct sk_buff *skb, gfp_t pri,
} }
void kfree_skb_fast_debug(struct sk_buff *skb, void kfree_skb_fast_debug(struct sk_buff *skb,
const char* func, int line) const char *func, int line)
{ {
/* NOT so fast... */ /* NOT so fast... */
unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY, func, line, __func__, __LINE__); unref_skb(skb, UNREF_USE_DEV_KFREE_SKB_ANY, func, line, __func__, __LINE__);

View File

@ -66,7 +66,7 @@ extern atomic_t skb_refs_counter;
/* SKBs on the power save queue are tagged with an age and /* SKBs on the power save queue are tagged with an age and
* timed out. We reuse the hardware checksum field in the * timed out. We reuse the hardware checksum field in the
* mbuf packet header to store this data. * mbuf packet header to store this data.
* XXX: use private cb area. */ * XXX: use private CB area. */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
#define skb_age csum_offset #define skb_age csum_offset
#else #else
@ -84,9 +84,9 @@ extern atomic_t skb_refs_counter;
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_dev_kfree_skb(_pskb) \ #define ieee80211_dev_kfree_skb(_pskb) \
ieee80211_dev_kfree_skb_debug(_pskb, __func__, __LINE__) ieee80211_dev_kfree_skb_debug(_pskb, __func__, __LINE__)
void ieee80211_dev_kfree_skb_debug(struct sk_buff** pskb, const char* func, int line); void ieee80211_dev_kfree_skb_debug(struct sk_buff **pskb, const char *func, int line);
#else #else
void ieee80211_dev_kfree_skb(struct sk_buff** pskb); void ieee80211_dev_kfree_skb(struct sk_buff **pskb);
#endif #endif
static inline void ieee80211_skb_copy_noderef(struct sk_buff *src, static inline void ieee80211_skb_copy_noderef(struct sk_buff *src,
@ -96,24 +96,22 @@ static inline void ieee80211_skb_copy_noderef(struct sk_buff *src,
SKB_NI(dst) = ieee80211_ref_node(SKB_NI(src)); SKB_NI(dst) = ieee80211_ref_node(SKB_NI(src));
} }
/* /* ieee80211_dev_kfree_skb_list will invoke ieee80211_dev_kfree_skb on each node in
* ieee80211_dev_kfree_skb_list will invoke ieee80211_dev_kfree_skb on each node in * a list of skbs, starting with the first. */
* a list of skbs, starting with the first.
*/
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_dev_kfree_skb_list(_pskb) \ #define ieee80211_dev_kfree_skb_list(_pskb) \
ieee80211_dev_kfree_skb_list_debug(_pskb, __func__, __LINE__) ieee80211_dev_kfree_skb_list_debug(_pskb, __func__, __LINE__)
void ieee80211_dev_kfree_skb_list_debug(struct sk_buff** pskb, const char* func, int line); void ieee80211_dev_kfree_skb_list_debug(struct sk_buff **pskb, const char *func, int line);
#else #else
void ieee80211_dev_kfree_skb_list(struct sk_buff** pskb); void ieee80211_dev_kfree_skb_list(struct sk_buff **pskb);
#endif #endif
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
#define ieee80211_dev_alloc_skb(_size) \ #define ieee80211_dev_alloc_skb(_size) \
ieee80211_dev_alloc_skb_debug(_size, __func__, __LINE__) ieee80211_dev_alloc_skb_debug(_size, __func__, __LINE__)
struct sk_buff* ieee80211_dev_alloc_skb_debug(int size, const char* func, int line); struct sk_buff *ieee80211_dev_alloc_skb_debug(int size, const char *func, int line);
#else #else
struct sk_buff* ieee80211_dev_alloc_skb(int size); struct sk_buff *ieee80211_dev_alloc_skb(int size);
#endif #endif
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
@ -122,9 +120,9 @@ struct sk_buff* ieee80211_dev_alloc_skb(int size);
#define ieee80211_skb_untrack(_skb) \ #define ieee80211_skb_untrack(_skb) \
ieee80211_skb_untrack_debug(_skb, __func__, __LINE__) ieee80211_skb_untrack_debug(_skb, __func__, __LINE__)
void ieee80211_skb_track_debug(struct sk_buff *skb, void ieee80211_skb_track_debug(struct sk_buff *skb,
const char* func, int line); const char *func, int line);
void ieee80211_skb_untrack_debug(struct sk_buff *skb, void ieee80211_skb_untrack_debug(struct sk_buff *skb,
const char* func, int line); const char *func, int line);
#else #else
void ieee80211_skb_track(struct sk_buff *skb); void ieee80211_skb_track(struct sk_buff *skb);
void ieee80211_skb_untrack(struct sk_buff *skb); void ieee80211_skb_untrack(struct sk_buff *skb);
@ -145,33 +143,33 @@ int ieee80211_skb_references(void);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
int vlan_hwaccel_rx_debug(struct sk_buff *skb, struct vlan_group *grp, int vlan_hwaccel_rx_debug(struct sk_buff *skb, struct vlan_group *grp,
unsigned short vlan_tag, const char* func, int line); unsigned short vlan_tag, const char *func, int line);
int netif_rx_debug(struct sk_buff *skb, const char* func, int line); int netif_rx_debug(struct sk_buff *skb, const char *func, int line);
struct sk_buff * alloc_skb_debug(unsigned int length, gfp_t gfp_mask, struct sk_buff *alloc_skb_debug(unsigned int length, gfp_t gfp_mask,
const char *func, int line); const char *func, int line);
struct sk_buff * dev_alloc_skb_debug(unsigned int length, struct sk_buff *dev_alloc_skb_debug(unsigned int length,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_clone_debug(struct sk_buff *skb, gfp_t pri, struct sk_buff *skb_clone_debug(struct sk_buff *skb, gfp_t pri,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_copy_debug(struct sk_buff *skb, gfp_t pri, struct sk_buff *skb_copy_debug(struct sk_buff *skb, gfp_t pri,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_get_debug(struct sk_buff *skb, struct sk_buff *skb_get_debug(struct sk_buff *skb,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_realloc_headroom_debug(struct sk_buff *skb, unsigned int headroom, struct sk_buff *skb_realloc_headroom_debug(struct sk_buff *skb, unsigned int headroom,
const char *func, int line); const char *func, int line);
struct sk_buff * pskb_copy_debug(struct sk_buff *skb, gfp_t pri, struct sk_buff *pskb_copy_debug(struct sk_buff *skb, gfp_t pri,
const char *func, int line); const char *func, int line);
int dev_queue_xmit_debug(struct sk_buff *skb, int dev_queue_xmit_debug(struct sk_buff *skb,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_share_check_debug(struct sk_buff *skb, gfp_t pri, struct sk_buff *skb_share_check_debug(struct sk_buff *skb, gfp_t pri,
const char *func, int line); const char *func, int line);
void kfree_skb_fast_debug(struct sk_buff *skb, void kfree_skb_fast_debug(struct sk_buff *skb,
const char* func, int line); const char *func, int line);
struct sk_buff * skb_unshare_debug(struct sk_buff *skb, gfp_t pri, struct sk_buff *skb_unshare_debug(struct sk_buff *skb, gfp_t pri,
const char *func, int line); const char *func, int line);
struct sk_buff * skb_copy_expand_debug(const struct sk_buff *skb, int newheadroom, struct sk_buff *skb_copy_expand_debug(const struct sk_buff *skb, int newheadroom,
int newtailroom, gfp_t gfp_mask, int newtailroom, gfp_t gfp_mask,
const char *func, int line); const char *func, int line);
#undef alloc_skb #undef alloc_skb
#undef dev_alloc_skb #undef dev_alloc_skb

View File

@ -87,7 +87,7 @@
IEEE80211_BMISSTHRESH_BMIN : (_bmt)) IEEE80211_BMISSTHRESH_BMIN : (_bmt))
#define IEEE80211_BGSCAN_INTVAL_MIN 15 /* min bg scan intvl (secs) */ #define IEEE80211_BGSCAN_INTVAL_MIN 15 /* min bg scan intvl (secs) */
#define IEEE80211_BGSCAN_INTVAL_DEFAULT (5*60) /* default bg scan intvl */ #define IEEE80211_BGSCAN_INTVAL_DEFAULT (5 * 60) /* default BG scan int. */
#define IEEE80211_BGSCAN_IDLE_MIN 100 /* min idle time (ms) */ #define IEEE80211_BGSCAN_IDLE_MIN 100 /* min idle time (ms) */
#define IEEE80211_BGSCAN_IDLE_DEFAULT 250 /* default idle time (ms) */ #define IEEE80211_BGSCAN_IDLE_DEFAULT 250 /* default idle time (ms) */
@ -239,7 +239,7 @@ struct ieee80211vap {
u_int16_t iv_sta_assoc; /* stations associated */ u_int16_t iv_sta_assoc; /* stations associated */
u_int16_t iv_ps_sta; /* stations in power save */ u_int16_t iv_ps_sta; /* stations in power save */
u_int16_t iv_ps_pending; /* PS STAs w/ pending frames */ u_int16_t iv_ps_pending; /* PS STAs w/ pending frames */
u_int8_t *iv_tim_bitmap; /* power-save stations w/ data*/ u_int8_t *iv_tim_bitmap; /* power-save stations w/ data */
u_int16_t iv_tim_len; /* ic_tim_bitmap size (bytes) */ u_int16_t iv_tim_len; /* ic_tim_bitmap size (bytes) */
u_int8_t iv_dtim_period; /* DTIM period */ u_int8_t iv_dtim_period; /* DTIM period */
u_int8_t iv_dtim_count; /* DTIM count from last bcn */ u_int8_t iv_dtim_count; /* DTIM count from last bcn */
@ -317,7 +317,7 @@ struct ieee80211com {
u_int32_t ic_caps; /* capabilities */ u_int32_t ic_caps; /* capabilities */
u_int8_t ic_ath_cap; /* Atheros adv. capabilities */ u_int8_t ic_ath_cap; /* Atheros adv. capabilities */
u_int8_t ic_promisc; /* VAPs needing promisc mode */ u_int8_t ic_promisc; /* VAPs needing promisc mode */
u_int8_t ic_allmulti; /* VAPs needing all multicast*/ u_int8_t ic_allmulti; /* VAPs needing all multicast */
u_int8_t ic_nopened; /* VAPs been opened */ u_int8_t ic_nopened; /* VAPs been opened */
struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX];
struct ieee80211_rateset ic_sup_xr_rates; struct ieee80211_rateset ic_sup_xr_rates;
@ -376,13 +376,13 @@ struct ieee80211com {
* association of the STA and disassociation of x other STAs (out of * association of the STA and disassociation of x other STAs (out of
* y associated STAs in total), the number of common channel * y associated STAs in total), the number of common channel
* increases by z, then such an action is performed if * increases by z, then such an action is performed if
* 1000*x/y < z*ic_sc_slcg * 1000 * x/y < z * ic_sc_slcg
* ic_sc_sldg is the permil of Stations Lost per rssi Db Gained, the * ic_sc_sldg is the permil of Stations Lost per rssi Db Gained, the
* parameter used by SC_LOOSE algorithm. If due to the switch, * parameter used by SC_LOOSE algorithm. If due to the switch,
* the maximum RSSI of received packets on the current channel would * the maximum RSSI of received packets on the current channel would
* decrease by z decibels and x stations from the set of y stations * decrease by z decibels and x stations from the set of y stations
* would be lost, then such a switch will be performed if * would be lost, then such a switch will be performed if
* 1000*x/y < z*ic_sc_sldg * 1000 * x/y < z * ic_sc_sldg
* ic_sc_ie is the Supported Channels IE that is about to be sent along * ic_sc_ie is the Supported Channels IE that is about to be sent along
* with (re)assoc requests (STA mode) * with (re)assoc requests (STA mode)
*/ */
@ -466,11 +466,11 @@ struct ieee80211com {
int32_t (*ic_node_count)(struct ieee80211com *); int32_t (*ic_node_count)(struct ieee80211com *);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
struct ieee80211_node *(*ic_node_alloc_debug)(struct ieee80211vap *, struct ieee80211_node *(*ic_node_alloc_debug)(struct ieee80211vap *,
const char* func, int line); const char *func, int line);
void (*ic_node_cleanup_debug)(struct ieee80211_node *, void (*ic_node_cleanup_debug)(struct ieee80211_node *,
const char* func, int line); const char *func, int line);
void (*ic_node_free_debug)(struct ieee80211_node *, void (*ic_node_free_debug)(struct ieee80211_node *,
const char* func, int line); const char *func, int line);
#else #else
struct ieee80211_node *(*ic_node_alloc)(struct ieee80211vap *); struct ieee80211_node *(*ic_node_alloc)(struct ieee80211vap *);
void (*ic_node_cleanup)(struct ieee80211_node *); void (*ic_node_cleanup)(struct ieee80211_node *);

View File

@ -166,7 +166,7 @@ ieee80211_ioctl_giwname(struct net_device *dev, struct iw_request_info *info,
* to be base zero. * to be base zero.
*/ */
static int static int
getiwkeyix(struct ieee80211vap *vap, const struct iw_point* erq, ieee80211_keyix_t *rkix) getiwkeyix(struct ieee80211vap *vap, const struct iw_point *erq, ieee80211_keyix_t *rkix)
{ {
ieee80211_keyix_t kix; ieee80211_keyix_t kix;
@ -912,7 +912,7 @@ ieee80211_ioctl_giwrange(struct net_device *dev, struct iw_request_info *info,
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_node *ni = vap->iv_bss; struct ieee80211_node *ni = vap->iv_bss;
struct iw_range *range = (struct iw_range *) extra; struct iw_range *range = (struct iw_range *)extra;
struct ieee80211_rateset *rs; struct ieee80211_rateset *rs;
u_int8_t reported[IEEE80211_CHAN_BYTES]; /* XXX stack usage? */ u_int8_t reported[IEEE80211_CHAN_BYTES]; /* XXX stack usage? */
int i, r; int i, r;
@ -1100,8 +1100,8 @@ ieee80211_ioctl_getspy(struct net_device *dev, struct iw_request_info *info,
unsigned int number = vap->iv_spy.num; unsigned int number = vap->iv_spy.num;
int i; int i;
address = (struct sockaddr *) extra; address = (struct sockaddr *)extra;
spy_stat = (struct iw_quality *) (extra + number * sizeof(struct sockaddr)); spy_stat = (struct iw_quality *)(extra + number * sizeof(struct sockaddr));
for (i = 0; i < number; i++) { for (i = 0; i < number; i++) {
memcpy(address[i].sa_data, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN], memcpy(address[i].sa_data, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN],
@ -1184,7 +1184,7 @@ ieee80211_ioctl_getthrspy(struct net_device *dev, struct iw_request_info *info,
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct iw_thrspy *threshold; struct iw_thrspy *threshold;
threshold = (struct iw_thrspy *) extra; threshold = (struct iw_thrspy *)extra;
/* set threshold values */ /* set threshold values */
set_quality(&(threshold->low), vap->iv_spy.thr_low, ic->ic_channoise); set_quality(&(threshold->low), vap->iv_spy.thr_low, ic->ic_channoise);
@ -1431,7 +1431,7 @@ static int
ieee80211_get_txcont(struct net_device *dev, ieee80211_get_txcont(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_txcont(ic); params[0] = ic->ic_get_txcont(ic);
@ -1442,7 +1442,7 @@ static int
ieee80211_get_dfs_cac_time(struct net_device *dev, ieee80211_get_dfs_cac_time(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_dfs_cac_time(ic); params[0] = ic->ic_get_dfs_cac_time(ic);
@ -1453,7 +1453,7 @@ static int
ieee80211_get_dfs_excl_period(struct net_device *dev, ieee80211_get_dfs_excl_period(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_dfs_excl_period(ic); params[0] = ic->ic_get_dfs_excl_period(ic);
@ -1463,7 +1463,7 @@ static int
ieee80211_set_dfs_cac_time(struct net_device *dev, ieee80211_set_dfs_cac_time(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_dfs_cac_time(ic, params[1]); ic->ic_set_dfs_cac_time(ic, params[1]);
@ -1473,7 +1473,7 @@ static int
ieee80211_set_dfs_excl_period (struct net_device *dev, ieee80211_set_dfs_excl_period (struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_dfs_excl_period(ic, params[1]); ic->ic_set_dfs_excl_period(ic, params[1]);
@ -1484,7 +1484,7 @@ static int
ieee80211_get_dfs_testmode(struct net_device *dev, ieee80211_get_dfs_testmode(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_dfs_testmode(ic); params[0] = ic->ic_get_dfs_testmode(ic);
@ -1495,7 +1495,7 @@ static int
ieee80211_get_txcont_rate(struct net_device *dev, ieee80211_get_txcont_rate(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_txcont_rate(ic); params[0] = ic->ic_get_txcont_rate(ic);
@ -1506,7 +1506,7 @@ static int
ieee80211_set_txcont(struct net_device *dev, struct iw_request_info *info, ieee80211_set_txcont(struct net_device *dev, struct iw_request_info *info,
void *w, char *extra) void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_txcont(ic, params[1]); ic->ic_set_txcont(ic, params[1]);
@ -1517,7 +1517,7 @@ static int
ieee80211_set_dfs_testmode(struct net_device *dev, ieee80211_set_dfs_testmode(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_dfs_testmode(ic, params[1]); ic->ic_set_dfs_testmode(ic, params[1]);
@ -1528,7 +1528,7 @@ static int
ieee80211_set_txcont_rate(struct net_device *dev, ieee80211_set_txcont_rate(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_txcont_rate(ic, params[1]); ic->ic_set_txcont_rate(ic, params[1]);
@ -1539,7 +1539,7 @@ static int
ieee80211_set_txcont_power(struct net_device *dev, ieee80211_set_txcont_power(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
ic->ic_set_txcont_power(ic, params[1]); ic->ic_set_txcont_power(ic, params[1]);
@ -1550,7 +1550,7 @@ static int
ieee80211_get_txcont_power(struct net_device *dev, ieee80211_get_txcont_power(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_get_txcont_power(ic); params[0] = ic->ic_get_txcont_power(ic);
@ -1561,7 +1561,7 @@ static int
ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info, ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info,
void *w, char *extra) void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_dump_hal_map(ic); params[0] = ic->ic_dump_hal_map(ic);
@ -1573,7 +1573,7 @@ static int
ieee80211_ioctl_radar(struct net_device *dev, struct iw_request_info *info, ieee80211_ioctl_radar(struct net_device *dev, struct iw_request_info *info,
void *w, char *extra) void *w, char *extra)
{ {
int *params = (int*) extra; int *params = (int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
if (!(ic->ic_flags & IEEE80211_F_DOTH)) if (!(ic->ic_flags & IEEE80211_F_DOTH))
@ -1600,7 +1600,7 @@ ieee80211_ioctl_giwtxpow(struct net_device *dev, struct iw_request_info *info,
static int static int
ieee80211_dump_registers(struct net_device *dev, struct iw_request_info *info, void *w, char *extra) ieee80211_dump_registers(struct net_device *dev, struct iw_request_info *info, void *w, char *extra)
{ {
unsigned int *params = (unsigned int*) extra; unsigned int *params = (unsigned int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
switch (params[1]) { switch (params[1]) {
@ -1623,7 +1623,7 @@ ieee80211_dump_registers(struct net_device *dev, struct iw_request_info *info, v
static int static int
ieee80211_ioctl_writereg(struct net_device *dev, struct iw_request_info *info, void *w, char *extra) ieee80211_ioctl_writereg(struct net_device *dev, struct iw_request_info *info, void *w, char *extra)
{ {
unsigned int *params = (unsigned int*) extra; unsigned int *params = (unsigned int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
return ic->ic_write_register(ic, params[0], params[1]); return ic->ic_write_register(ic, params[0], params[1]);
@ -1634,7 +1634,7 @@ ieee80211_ioctl_writereg(struct net_device *dev, struct iw_request_info *info, v
static int static int
ieee80211_ioctl_readreg(struct net_device *dev, struct iw_request_info *info, void *w, char *extra) ieee80211_ioctl_readreg(struct net_device *dev, struct iw_request_info *info, void *w, char *extra)
{ {
unsigned int *params = (unsigned int*) extra; unsigned int *params = (unsigned int *)extra;
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
return ic->ic_read_register(ic, params[0], &params[0]); return ic->ic_read_register(ic, params[0], &params[0]);
@ -1819,7 +1819,7 @@ giwscan_cb(void *arg, const struct ieee80211_scan_entry *se)
iwe.u.data.flags = 1; iwe.u.data.flags = 1;
iwe.u.data.length = se->se_ssid[1]; iwe.u.data.length = se->se_ssid[1];
current_ev = iwe_stream_add_point(current_ev, current_ev = iwe_stream_add_point(current_ev,
end_buf, &iwe, (char *) se->se_ssid+2); end_buf, &iwe, (char *)se->se_ssid + 2);
/* We ran out of space in the buffer. */ /* We ran out of space in the buffer. */
if (last_ev == current_ev) if (last_ev == current_ev)
@ -2269,7 +2269,7 @@ ieee80211_ioctl_setparam(struct net_device *dev, struct iw_request_info *info,
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn; struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn;
unsigned int *i = (unsigned int *) extra; unsigned int *i = (unsigned int *)extra;
unsigned int param = i[0]; /* parameter id is 1st */ unsigned int param = i[0]; /* parameter id is 1st */
unsigned int value = i[1]; /* NB: most values are TYPE_INT */ unsigned int value = i[1]; /* NB: most values are TYPE_INT */
int retv = 0; int retv = 0;
@ -2952,7 +2952,7 @@ ieee80211_ioctl_getparam(struct net_device *dev, struct iw_request_info *info,
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn; struct ieee80211_rsnparms *rsn = &vap->iv_bss->ni_rsn;
unsigned int *param = (unsigned int *) extra; unsigned int *param = (unsigned int *)extra;
switch (param[0]) { switch (param[0]) {
case IEEE80211_PARAM_AUTHMODE: case IEEE80211_PARAM_AUTHMODE:
@ -4009,7 +4009,7 @@ ieee80211_ioctl_setwmmparams(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
unsigned int *param = (unsigned int *) extra; unsigned int *param = (unsigned int *)extra;
unsigned int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE; unsigned int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;
unsigned int bss = param[2]; unsigned int bss = param[2];
struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme; struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
@ -4097,7 +4097,7 @@ ieee80211_ioctl_getwmmparams(struct net_device *dev,
struct iw_request_info *info, void *w, char *extra) struct iw_request_info *info, void *w, char *extra)
{ {
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
unsigned int *param = (unsigned int *) extra; unsigned int *param = (unsigned int *)extra;
unsigned int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE; unsigned int ac = (param[1] < WME_NUM_AC) ? param[1] : WME_AC_BE;
struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme; struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
struct chanAccParams *chanParams = (param[2] == 0) ? struct chanAccParams *chanParams = (param[2] == 0) ?
@ -4490,7 +4490,7 @@ ieee80211_ioctl_chanswitch(struct net_device *dev, struct iw_request_info *info,
{ {
struct ieee80211vap *vap = dev->priv; struct ieee80211vap *vap = dev->priv;
struct ieee80211com *ic = vap->iv_ic; struct ieee80211com *ic = vap->iv_ic;
unsigned int *param = (unsigned int *) extra; unsigned int *param = (unsigned int *)extra;
if (!(ic->ic_flags & IEEE80211_F_DOTH)) if (!(ic->ic_flags & IEEE80211_F_DOTH))
return 0; return 0;
@ -4525,7 +4525,7 @@ ieee80211_ioctl_siwmlme(struct net_device *dev,
memcpy(mlme.im_macaddr, wextmlme->addr.sa_data, IEEE80211_ADDR_LEN); memcpy(mlme.im_macaddr, wextmlme->addr.sa_data, IEEE80211_ADDR_LEN);
return ieee80211_ioctl_setmlme(dev, NULL, NULL, (char*)&mlme); return ieee80211_ioctl_setmlme(dev, NULL, NULL, (char *)&mlme);
} }
@ -4567,7 +4567,7 @@ siwauth_wpa_version(struct net_device *dev,
else else
args[1] = 0; args[1] = 0;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4618,7 +4618,7 @@ siwauth_cipher_pairwise(struct net_device *dev,
dev->name, iwciph); dev->name, iwciph);
return -EINVAL; return -EINVAL;
} }
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
/* TODO We don't enforce wep key lengths. */ /* TODO We don't enforce wep key lengths. */
@ -4636,7 +4636,7 @@ siwauth_cipher_group(struct net_device *dev,
dev->name, iwciph); dev->name, iwciph);
return -EINVAL; return -EINVAL;
} }
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4653,7 +4653,7 @@ siwauth_key_mgmt(struct net_device *dev,
if (iwkm & IW_AUTH_KEY_MGMT_PSK) if (iwkm & IW_AUTH_KEY_MGMT_PSK)
args[1] |= WPA_ASE_8021X_PSK; args[1] |= WPA_ASE_8021X_PSK;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4663,7 +4663,7 @@ siwauth_tkip_countermeasures(struct net_device *dev,
int args[2]; int args[2];
args[0] = IEEE80211_PARAM_COUNTERMEASURES; args[0] = IEEE80211_PARAM_COUNTERMEASURES;
args[1] = erq->value; args[1] = erq->value;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4673,7 +4673,7 @@ siwauth_drop_unencrypted(struct net_device *dev,
int args[2]; int args[2];
args[0] = IEEE80211_PARAM_DROPUNENCRYPTED; args[0] = IEEE80211_PARAM_DROPUNENCRYPTED;
args[1] = erq->value; args[1] = erq->value;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
@ -4700,7 +4700,7 @@ siwauth_80211_auth_alg(struct net_device *dev,
} else { } else {
args[1] = IEEE80211_AUTH_OPEN; args[1] = IEEE80211_AUTH_OPEN;
} }
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4716,7 +4716,7 @@ siwauth_wpa_enabled(struct net_device *dev,
else else
args[1] = 0; /* disable WPA1 and WPA2 */ args[1] = 0; /* disable WPA1 and WPA2 */
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4732,7 +4732,7 @@ siwauth_rx_unencrypted_eapol(struct net_device *dev,
else else
args[1] = 0; args[1] = 0;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4753,7 +4753,7 @@ siwauth_roaming_control(struct net_device *dev,
default: default:
return -EINVAL; return -EINVAL;
} }
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
static int static int
@ -4763,7 +4763,7 @@ siwauth_privacy_invoked(struct net_device *dev,
int args[2]; int args[2];
args[0] = IEEE80211_PARAM_PRIVACY; args[0] = IEEE80211_PARAM_PRIVACY;
args[1] = erq->value; args[1] = erq->value;
return ieee80211_ioctl_setparam(dev, NULL, NULL, (char*)args); return ieee80211_ioctl_setparam(dev, NULL, NULL, (char *)args);
} }
/* /*
@ -4833,7 +4833,7 @@ giwauth_wpa_version(struct net_device *dev,
int rc; int rc;
int arg = IEEE80211_PARAM_WPA; int arg = IEEE80211_PARAM_WPA;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
@ -4863,7 +4863,7 @@ giwauth_cipher_pairwise(struct net_device *dev,
int rc; int rc;
int arg = IEEE80211_PARAM_UCASTCIPHER; int arg = IEEE80211_PARAM_UCASTCIPHER;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
@ -4881,7 +4881,7 @@ giwauth_cipher_group(struct net_device *dev,
int rc; int rc;
int arg = IEEE80211_PARAM_MCASTCIPHER; int arg = IEEE80211_PARAM_MCASTCIPHER;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
@ -4899,7 +4899,7 @@ giwauth_key_mgmt(struct net_device *dev,
int rc; int rc;
arg = IEEE80211_PARAM_KEYMGTALGS; arg = IEEE80211_PARAM_KEYMGTALGS;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
erq->value = 0; erq->value = 0;
@ -4918,7 +4918,7 @@ giwauth_tkip_countermeasures(struct net_device *dev,
int rc; int rc;
arg = IEEE80211_PARAM_COUNTERMEASURES; arg = IEEE80211_PARAM_COUNTERMEASURES;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
erq->value = arg; erq->value = arg;
@ -4932,7 +4932,7 @@ giwauth_drop_unencrypted(struct net_device *dev,
int arg; int arg;
int rc; int rc;
arg = IEEE80211_PARAM_DROPUNENCRYPTED; arg = IEEE80211_PARAM_DROPUNENCRYPTED;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
erq->value = arg; erq->value = arg;
@ -4953,7 +4953,7 @@ giwauth_wpa_enabled(struct net_device *dev,
int rc; int rc;
int arg = IEEE80211_PARAM_WPA; int arg = IEEE80211_PARAM_WPA;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
@ -4977,7 +4977,7 @@ giwauth_roaming_control(struct net_device *dev,
int arg; int arg;
arg = IEEE80211_PARAM_ROAMING; arg = IEEE80211_PARAM_ROAMING;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
@ -5001,7 +5001,7 @@ giwauth_privacy_invoked(struct net_device *dev,
int rc; int rc;
int arg; int arg;
arg = IEEE80211_PARAM_PRIVACY; arg = IEEE80211_PARAM_PRIVACY;
rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char*)&arg); rc = ieee80211_ioctl_getparam(dev, NULL, NULL, (char *)&arg);
if (rc) if (rc)
return rc; return rc;
erq->value = arg; erq->value = arg;
@ -5147,7 +5147,7 @@ ieee80211_ioctl_siwencodeext(struct net_device *dev,
dk.idk_keyix = kix; dk.idk_keyix = kix;
memcpy(&dk.idk_macaddr, ext->addr.sa_data, IEEE80211_ADDR_LEN); memcpy(&dk.idk_macaddr, ext->addr.sa_data, IEEE80211_ADDR_LEN);
return ieee80211_ioctl_delkey(dev, NULL, NULL, (char*)&dk); return ieee80211_ioctl_delkey(dev, NULL, NULL, (char *)&dk);
} }
/* TODO This memcmp for the broadcast address seems hackish, but /* TODO This memcmp for the broadcast address seems hackish, but
@ -5224,7 +5224,7 @@ ieee80211_ioctl_siwencodeext(struct net_device *dev,
memcpy(&kr.ik_keyrsc, ext->rx_seq, sizeof(kr.ik_keyrsc)); memcpy(&kr.ik_keyrsc, ext->rx_seq, sizeof(kr.ik_keyrsc));
} }
return ieee80211_ioctl_setkey(dev, NULL, NULL, (char*)&kr); return ieee80211_ioctl_setkey(dev, NULL, NULL, (char *)&kr);
} }
#endif /* WIRELESS_EXT >= 18 */ #endif /* WIRELESS_EXT >= 18 */
@ -5752,11 +5752,11 @@ static const iw_handler ieee80211_priv_handlers[] = {
}; };
static struct iw_handler_def ieee80211_iw_handler_def = { static struct iw_handler_def ieee80211_iw_handler_def = {
.standard = (iw_handler *) ieee80211_handlers, .standard = (iw_handler *)ieee80211_handlers,
.num_standard = ARRAY_SIZE(ieee80211_handlers), .num_standard = ARRAY_SIZE(ieee80211_handlers),
.private = (iw_handler *) ieee80211_priv_handlers, .private = (iw_handler *)ieee80211_priv_handlers,
.num_private = ARRAY_SIZE(ieee80211_priv_handlers), .num_private = ARRAY_SIZE(ieee80211_priv_handlers),
.private_args = (struct iw_priv_args *) ieee80211_priv_args, .private_args = (struct iw_priv_args *)ieee80211_priv_args,
.num_private_args = ARRAY_SIZE(ieee80211_priv_args), .num_private_args = ARRAY_SIZE(ieee80211_priv_args),
#if IW_HANDLER_VERSION >= 7 #if IW_HANDLER_VERSION >= 7
.get_wireless_stats = ieee80211_iw_getstats, .get_wireless_stats = ieee80211_iw_getstats,
@ -5782,13 +5782,13 @@ ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
vap->iv_ic->ic_vap_delete(vap); vap->iv_ic->ic_vap_delete(vap);
return 0; return 0;
case IEEE80211_IOCTL_GETKEY: case IEEE80211_IOCTL_GETKEY:
return ieee80211_ioctl_getkey(dev, (struct iwreq *) ifr); return ieee80211_ioctl_getkey(dev, (struct iwreq *)ifr);
case IEEE80211_IOCTL_GETWPAIE: case IEEE80211_IOCTL_GETWPAIE:
return ieee80211_ioctl_getwpaie(dev, (struct iwreq *) ifr); return ieee80211_ioctl_getwpaie(dev, (struct iwreq *)ifr);
case IEEE80211_IOCTL_STA_STATS: case IEEE80211_IOCTL_STA_STATS:
return ieee80211_ioctl_getstastats(dev, (struct iwreq *) ifr); return ieee80211_ioctl_getstastats(dev, (struct iwreq *)ifr);
case IEEE80211_IOCTL_STA_INFO: case IEEE80211_IOCTL_STA_INFO:
return ieee80211_ioctl_getstainfo(dev, (struct iwreq *) ifr); return ieee80211_ioctl_getstainfo(dev, (struct iwreq *)ifr);
case IEEE80211_IOCTL_SCAN_RESULTS: case IEEE80211_IOCTL_SCAN_RESULTS:
return ieee80211_ioctl_getscanresults(dev, (struct iwreq *)ifr); return ieee80211_ioctl_getscanresults(dev, (struct iwreq *)ifr);
} }
@ -5828,7 +5828,7 @@ EXPORT_SYMBOL(ieee80211_ioctl_create_vap);
* outside our control (e.g. in the driver). * outside our control (e.g. in the driver).
* Must be called with rtnl_lock held * Must be called with rtnl_lock held
*/ */
struct ieee80211vap* struct ieee80211vap *
ieee80211_create_vap(struct ieee80211com *ic, char *name, ieee80211_create_vap(struct ieee80211com *ic, char *name,
struct net_device *mdev, int opmode, int opflags) struct net_device *mdev, int opmode, int opflags)
{ {

View File

@ -192,7 +192,7 @@ ifmedia_ioctl(struct net_device *dev, struct ifreq *ifr,
struct ifmedia *ifm, u_long cmd) struct ifmedia *ifm, u_long cmd)
{ {
struct ifmedia_entry *match; struct ifmedia_entry *match;
struct ifmediareq *ifmr = (struct ifmediareq *) ifr; struct ifmediareq *ifmr = (struct ifmediareq *)ifr;
int error = 0, sticky; int error = 0, sticky;
if (dev == NULL || ifr == NULL || ifm == NULL) if (dev == NULL || ifr == NULL || ifm == NULL)

View File

@ -257,7 +257,7 @@ runtest(struct ieee80211vap *vap, struct ciphertest *t)
/* /*
* Encrypt frame. * Encrypt frame.
*/ */
ctx = (struct wep_ctx_hw *) key->wk_private; ctx = (struct wep_ctx_hw *)key->wk_private;
memcpy(&ctx->wc_iv, t->iv, sizeof(t->iv)); /* for encap/encrypt */ memcpy(&ctx->wc_iv, t->iv, sizeof(t->iv)); /* for encap/encrypt */
if (!(*cip->ic_encap)(key, skb, t->keyix << 6)) { if (!(*cip->ic_encap)(key, skb, t->keyix << 6)) {
printk("FAIL: wep encap failed\n"); printk("FAIL: wep encap failed\n");

View File

@ -168,7 +168,7 @@ sysctlbyname(const char *oid0, void *oldp, size_t *oldlenp,
if (fd == NULL) if (fd == NULL)
return -1; return -1;
/* XXX: only handle ints */ /* XXX: only handle ints */
if (fscanf(fd, "%u", (int *) oldp) != 1) { if (fscanf(fd, "%u", (int *)oldp) != 1) {
fclose(fd); fclose(fd);
return -1; return -1;
} }

View File

@ -174,14 +174,14 @@ print_sta_stats(FILE *fd, const u_int8_t macaddr[IEEE80211_ADDR_LEN])
(void) memset(&iwr, 0, sizeof(iwr)); (void) memset(&iwr, 0, sizeof(iwr));
(void) strncpy(iwr.ifr_name, ifr.ifr_name, sizeof(iwr.ifr_name)); (void) strncpy(iwr.ifr_name, ifr.ifr_name, sizeof(iwr.ifr_name));
iwr.u.data.pointer = (void *) &stats; iwr.u.data.pointer = (void *)&stats;
iwr.u.data.length = sizeof(stats); iwr.u.data.length = sizeof(stats);
memcpy(stats.is_u.macaddr, macaddr, IEEE80211_ADDR_LEN); memcpy(stats.is_u.macaddr, macaddr, IEEE80211_ADDR_LEN);
if (ioctl(s, IEEE80211_IOCTL_STA_STATS, &iwr) < 0) if (ioctl(s, IEEE80211_IOCTL_STA_STATS, &iwr) < 0)
err(1, "unable to get station stats for %s", err(1, "unable to get station stats for %s",
ether_ntoa((const struct ether_addr*) macaddr)); ether_ntoa((const struct ether_addr*)macaddr));
fprintf(fd, "%s:\n", ether_ntoa((const struct ether_addr*) macaddr)); fprintf(fd, "%s:\n", ether_ntoa((const struct ether_addr *)macaddr));
sep = "\t"; sep = "\t";
STAT(rx_data, "%u"); STAT(rx_data, "%u");
@ -294,7 +294,7 @@ main(int argc, char *argv[])
*/ */
(void) memset(&iwr, 0, sizeof(iwr)); (void) memset(&iwr, 0, sizeof(iwr));
(void) strncpy(iwr.ifr_name, ifr.ifr_name, sizeof(iwr.ifr_name)); (void) strncpy(iwr.ifr_name, ifr.ifr_name, sizeof(iwr.ifr_name));
iwr.u.data.pointer = (void *) buf; iwr.u.data.pointer = (void *)buf;
iwr.u.data.length = sizeof(buf); iwr.u.data.length = sizeof(buf);
if (ioctl(s, IEEE80211_IOCTL_STA_INFO, &iwr) < 0) if (ioctl(s, IEEE80211_IOCTL_STA_INFO, &iwr) < 0)
err(1, "unable to get station information"); err(1, "unable to get station information");
@ -302,7 +302,7 @@ main(int argc, char *argv[])
if (len >= sizeof(struct ieee80211req_sta_info)) { if (len >= sizeof(struct ieee80211req_sta_info)) {
cp = buf; cp = buf;
do { do {
si = (struct ieee80211req_sta_info *) cp; si = (struct ieee80211req_sta_info *)cp;
print_sta_stats(stdout, si->isi_macaddr); print_sta_stats(stdout, si->isi_macaddr);
cp += si->isi_len, len -= si->isi_len; cp += si->isi_len, len -= si->isi_len;
} while (len >= sizeof(struct ieee80211req_sta_info)); } while (len >= sizeof(struct ieee80211req_sta_info));

View File

@ -177,7 +177,7 @@ sysctlbyname(const char *oid0, void *oldp, size_t *oldlenp, void *newp,
if (fd == NULL) if (fd == NULL)
return -1; return -1;
/* XXX: only handle ints */ /* XXX: only handle ints */
if (fscanf(fd, "%u", (int *) oldp) != 1) { if (fscanf(fd, "%u", (int *)oldp) != 1) {
fclose(fd); fclose(fd);
return -1; return -1;
} }

View File

@ -68,7 +68,7 @@
static const struct { static const struct {
u_int phyerr; u_int phyerr;
const char* desc; const char *desc;
} phyerrdescriptions[] = { } phyerrdescriptions[] = {
{ HAL_PHYERR_UNDERRUN, "transmit underrun" }, { HAL_PHYERR_UNDERRUN, "transmit underrun" },
{ HAL_PHYERR_TIMING, "timing error" }, { HAL_PHYERR_TIMING, "timing error" },
@ -177,7 +177,7 @@ printstats(FILE *fd, const struct ath_stats *stats)
} }
static u_int static u_int
getifrate(int s, const char* ifname) getifrate(int s, const char *ifname)
{ {
struct iwreq wrq; struct iwreq wrq;

View File

@ -519,7 +519,7 @@ typedef __uint8_t __u8;
/* Retry limits and lifetime flags available */ /* Retry limits and lifetime flags available */
#define IW_RETRY_ON 0x0000 /* No details... */ #define IW_RETRY_ON 0x0000 /* No details... */
#define IW_RETRY_TYPE 0xF000 /* Type of parameter */ #define IW_RETRY_TYPE 0xF000 /* Type of parameter */
#define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries*/ #define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries */
#define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */ #define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */
#define IW_RETRY_MODIFIER 0x000F /* Modify a parameter */ #define IW_RETRY_MODIFIER 0x000F /* Modify a parameter */
#define IW_RETRY_MIN 0x0001 /* Value is a minimum */ #define IW_RETRY_MIN 0x0001 /* Value is a minimum */
@ -1083,8 +1083,8 @@ struct iw_event
/* iw_point events are special. First, the payload (extra data) come at /* iw_point events are special. First, the payload (extra data) come at
* the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second,
* we omit the pointer, so start at an offset. */ * we omit the pointer, so start at an offset. */
#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \ #define IW_EV_POINT_OFF (((char *)&(((struct iw_point *)NULL)->length)) - \
(char *) NULL) (char *)NULL)
#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \ #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
IW_EV_POINT_OFF) IW_EV_POINT_OFF)

View File

@ -173,7 +173,7 @@ main(int argc, char *argv[])
free(if_base); free(if_base);
if_base = NULL; if_base = NULL;
ifr.ifr_data = (void *) &cp; ifr.ifr_data = (void *)&cp;
vap_create(&ifr); vap_create(&ifr);
printf("%s\n", ifr.ifr_name); printf("%s\n", ifr.ifr_name);
} else if (streq(cmd, "destroy")) { } else if (streq(cmd, "destroy")) {
@ -434,12 +434,12 @@ getstamode(u_int8_t opmode)
} }
static void static void
printie(const char* tag, const uint8_t *ie, size_t ielen, int maxlen) printie(const char *tag, const uint8_t *ie, size_t ielen, int maxlen)
{ {
printf("%s", tag); printf("%s", tag);
if (verbose) { if (verbose) {
maxlen -= strlen(tag)+2; maxlen -= strlen(tag) + 2;
if (2*ielen > maxlen) if (2 * ielen > maxlen)
maxlen--; maxlen--;
printf("<"); printf("<");
for (; ielen > 0; ie++, ielen--) { for (; ielen > 0; ie++, ielen--) {
@ -565,7 +565,7 @@ ieee80211_ntoa(const uint8_t mac[IEEE80211_ADDR_LEN])
static void static void
list_stations(const char *ifname) list_stations(const char *ifname)
{ {
uint8_t buf[24*1024]; uint8_t buf[24 * 1024];
struct iwreq iwr; struct iwreq iwr;
uint8_t *cp; uint8_t *cp;
int s, len; int s, len;
@ -576,7 +576,7 @@ list_stations(const char *ifname)
(void) memset(&iwr, 0, sizeof(iwr)); (void) memset(&iwr, 0, sizeof(iwr));
(void) strncpy(iwr.ifr_name, ifname, sizeof(iwr.ifr_name)); (void) strncpy(iwr.ifr_name, ifname, sizeof(iwr.ifr_name));
iwr.u.data.pointer = (void *) buf; iwr.u.data.pointer = (void *)buf;
iwr.u.data.length = sizeof(buf); iwr.u.data.length = sizeof(buf);
if (ioctl(s, IEEE80211_IOCTL_STA_INFO, &iwr) < 0) if (ioctl(s, IEEE80211_IOCTL_STA_INFO, &iwr) < 0)
errx(1, "unable to get station information"); errx(1, "unable to get station information");
@ -607,7 +607,7 @@ list_stations(const char *ifname)
struct ieee80211req_sta_info *si; struct ieee80211req_sta_info *si;
uint8_t *vp; uint8_t *vp;
si = (struct ieee80211req_sta_info *) cp; si = (struct ieee80211req_sta_info *)cp;
vp = (u_int8_t *)(si+1); vp = (u_int8_t *)(si+1);
printf("%s %4u %4d %3dM %4d %4d %5d %6d %7d %6d %7d %-4.4s %-5.5s %3x %8x %8s", printf("%s %4u %4d %3dM %4d %4d %5d %6d %7d %6d %7d %-4.4s %-5.5s %3x %8x %8s",
ieee80211_ntoa(si->isi_macaddr), ieee80211_ntoa(si->isi_macaddr),
@ -683,8 +683,8 @@ list_scan(const char *ifname)
struct ieee80211req_scan_result *sr; struct ieee80211req_scan_result *sr;
uint8_t *vp; uint8_t *vp;
sr = (struct ieee80211req_scan_result *) cp; sr = (struct ieee80211req_scan_result *)cp;
vp = (u_int8_t *)(sr+1); vp = (u_int8_t *)(sr + 1);
printf("%-14.*s %s %3d %3dM %2d:%-2d %3d %-4.4s", printf("%-14.*s %s %3d %3dM %2d:%-2d %3d %-4.4s",
copy_essid(ssid, sizeof(ssid), vp, sr->isr_ssid_len), copy_essid(ssid, sizeof(ssid), vp, sr->isr_ssid_len),
ssid, ssid,