diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 12 |
6 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index f3b5a609554..e512d519c59 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -54,8 +54,6 @@ struct ath_node; | |||
54 | 54 | ||
55 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) | 55 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) |
56 | 56 | ||
57 | #define ASSERT(exp) BUG_ON(!(exp)) | ||
58 | |||
59 | #define TSF_TO_TU(_h,_l) \ | 57 | #define TSF_TO_TU(_h,_l) \ |
60 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) | 58 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) |
61 | 59 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 9d03d27a7dc..93da19cbff1 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -3814,7 +3814,7 @@ void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio) | |||
3814 | { | 3814 | { |
3815 | u32 gpio_shift; | 3815 | u32 gpio_shift; |
3816 | 3816 | ||
3817 | ASSERT(gpio < ah->caps.num_gpio_pins); | 3817 | BUG_ON(gpio >= ah->caps.num_gpio_pins); |
3818 | 3818 | ||
3819 | gpio_shift = gpio << 1; | 3819 | gpio_shift = gpio << 1; |
3820 | 3820 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index e9aac3cbd4d..0d8977341b2 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2030,7 +2030,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, | |||
2030 | if ((sizeof(struct ath_desc) % 4) != 0) { | 2030 | if ((sizeof(struct ath_desc) % 4) != 0) { |
2031 | ath_print(common, ATH_DBG_FATAL, | 2031 | ath_print(common, ATH_DBG_FATAL, |
2032 | "ath_desc not DWORD aligned\n"); | 2032 | "ath_desc not DWORD aligned\n"); |
2033 | ASSERT((sizeof(struct ath_desc) % 4) == 0); | 2033 | BUG_ON((sizeof(struct ath_desc) % 4) != 0); |
2034 | error = -ENOMEM; | 2034 | error = -ENOMEM; |
2035 | goto fail; | 2035 | goto fail; |
2036 | } | 2036 | } |
@@ -2088,7 +2088,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, | |||
2088 | * descriptor fetch. | 2088 | * descriptor fetch. |
2089 | */ | 2089 | */ |
2090 | while (ATH_DESC_4KB_BOUND_CHECK(bf->bf_daddr)) { | 2090 | while (ATH_DESC_4KB_BOUND_CHECK(bf->bf_daddr)) { |
2091 | ASSERT((caddr_t) bf->bf_desc < | 2091 | BUG_ON((caddr_t) bf->bf_desc >= |
2092 | ((caddr_t) dd->dd_desc + | 2092 | ((caddr_t) dd->dd_desc + |
2093 | dd->dd_desc_len)); | 2093 | dd->dd_desc_len)); |
2094 | 2094 | ||
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 7346649af2d..063936423d8 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -425,7 +425,7 @@ static void ath_rc_init_valid_txmask(struct ath_rate_priv *ath_rc_priv) | |||
425 | static inline void ath_rc_set_valid_txmask(struct ath_rate_priv *ath_rc_priv, | 425 | static inline void ath_rc_set_valid_txmask(struct ath_rate_priv *ath_rc_priv, |
426 | u8 index, int valid_tx_rate) | 426 | u8 index, int valid_tx_rate) |
427 | { | 427 | { |
428 | ASSERT(index <= ath_rc_priv->rate_table_size); | 428 | BUG_ON(index > ath_rc_priv->rate_table_size); |
429 | ath_rc_priv->valid_rate_index[index] = valid_tx_rate ? 1 : 0; | 429 | ath_rc_priv->valid_rate_index[index] = valid_tx_rate ? 1 : 0; |
430 | } | 430 | } |
431 | 431 | ||
@@ -1243,7 +1243,7 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1243 | 1243 | ||
1244 | ath_rc_priv->rate_table_size = hi + 1; | 1244 | ath_rc_priv->rate_table_size = hi + 1; |
1245 | ath_rc_priv->rate_max_phy = 0; | 1245 | ath_rc_priv->rate_max_phy = 0; |
1246 | ASSERT(ath_rc_priv->rate_table_size <= RATE_TABLE_SIZE); | 1246 | BUG_ON(ath_rc_priv->rate_table_size > RATE_TABLE_SIZE); |
1247 | 1247 | ||
1248 | for (i = 0, k = 0; i < WLAN_RC_PHY_MAX; i++) { | 1248 | for (i = 0, k = 0; i < WLAN_RC_PHY_MAX; i++) { |
1249 | for (j = 0; j < ath_rc_priv->valid_phy_ratecnt[i]; j++) { | 1249 | for (j = 0; j < ath_rc_priv->valid_phy_ratecnt[i]; j++) { |
@@ -1257,8 +1257,8 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1257 | 1257 | ||
1258 | ath_rc_priv->rate_max_phy = ath_rc_priv->valid_phy_rateidx[i][j-1]; | 1258 | ath_rc_priv->rate_max_phy = ath_rc_priv->valid_phy_rateidx[i][j-1]; |
1259 | } | 1259 | } |
1260 | ASSERT(ath_rc_priv->rate_table_size <= RATE_TABLE_SIZE); | 1260 | BUG_ON(ath_rc_priv->rate_table_size > RATE_TABLE_SIZE); |
1261 | ASSERT(k <= RATE_TABLE_SIZE); | 1261 | BUG_ON(k > RATE_TABLE_SIZE); |
1262 | 1262 | ||
1263 | ath_rc_priv->max_valid_rate = k; | 1263 | ath_rc_priv->max_valid_rate = k; |
1264 | ath_rc_sort_validrates(rate_table, ath_rc_priv); | 1264 | ath_rc_sort_validrates(rate_table, ath_rc_priv); |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 6caef1b5dfe..3a2204d8470 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -59,7 +59,7 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) | |||
59 | 59 | ||
60 | /* virtual addr of the beginning of the buffer. */ | 60 | /* virtual addr of the beginning of the buffer. */ |
61 | skb = bf->bf_mpdu; | 61 | skb = bf->bf_mpdu; |
62 | ASSERT(skb != NULL); | 62 | BUG_ON(skb == NULL); |
63 | ds->ds_vdata = skb->data; | 63 | ds->ds_vdata = skb->data; |
64 | 64 | ||
65 | /* setup rx descriptors. The rx.bufsize here tells the harware | 65 | /* setup rx descriptors. The rx.bufsize here tells the harware |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index f302652af39..a8620b1d091 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -107,7 +107,7 @@ static void ath_tx_resume_tid(struct ath_softc *sc, struct ath_atx_tid *tid) | |||
107 | { | 107 | { |
108 | struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum]; | 108 | struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum]; |
109 | 109 | ||
110 | ASSERT(tid->paused > 0); | 110 | BUG_ON(tid->paused <= 0); |
111 | spin_lock_bh(&txq->axq_lock); | 111 | spin_lock_bh(&txq->axq_lock); |
112 | 112 | ||
113 | tid->paused--; | 113 | tid->paused--; |
@@ -131,7 +131,7 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid) | |||
131 | struct list_head bf_head; | 131 | struct list_head bf_head; |
132 | INIT_LIST_HEAD(&bf_head); | 132 | INIT_LIST_HEAD(&bf_head); |
133 | 133 | ||
134 | ASSERT(tid->paused > 0); | 134 | BUG_ON(tid->paused <= 0); |
135 | spin_lock_bh(&txq->axq_lock); | 135 | spin_lock_bh(&txq->axq_lock); |
136 | 136 | ||
137 | tid->paused--; | 137 | tid->paused--; |
@@ -143,7 +143,7 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid) | |||
143 | 143 | ||
144 | while (!list_empty(&tid->buf_q)) { | 144 | while (!list_empty(&tid->buf_q)) { |
145 | bf = list_first_entry(&tid->buf_q, struct ath_buf, list); | 145 | bf = list_first_entry(&tid->buf_q, struct ath_buf, list); |
146 | ASSERT(!bf_isretried(bf)); | 146 | BUG_ON(bf_isretried(bf)); |
147 | list_move_tail(&bf->list, &bf_head); | 147 | list_move_tail(&bf->list, &bf_head); |
148 | ath_tx_send_ht_normal(sc, txq, tid, &bf_head); | 148 | ath_tx_send_ht_normal(sc, txq, tid, &bf_head); |
149 | } | 149 | } |
@@ -178,7 +178,7 @@ static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid, | |||
178 | index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno); | 178 | index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno); |
179 | cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); | 179 | cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); |
180 | 180 | ||
181 | ASSERT(tid->tx_buf[cindex] == NULL); | 181 | BUG_ON(tid->tx_buf[cindex] != NULL); |
182 | tid->tx_buf[cindex] = bf; | 182 | tid->tx_buf[cindex] = bf; |
183 | 183 | ||
184 | if (index >= ((tid->baw_tail - tid->baw_head) & | 184 | if (index >= ((tid->baw_tail - tid->baw_head) & |
@@ -358,7 +358,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, | |||
358 | else | 358 | else |
359 | INIT_LIST_HEAD(&bf_head); | 359 | INIT_LIST_HEAD(&bf_head); |
360 | } else { | 360 | } else { |
361 | ASSERT(!list_empty(bf_q)); | 361 | BUG_ON(list_empty(bf_q)); |
362 | list_move_tail(&bf->list, &bf_head); | 362 | list_move_tail(&bf->list, &bf_head); |
363 | } | 363 | } |
364 | 364 | ||
@@ -946,7 +946,7 @@ int ath_txq_update(struct ath_softc *sc, int qnum, | |||
946 | return 0; | 946 | return 0; |
947 | } | 947 | } |
948 | 948 | ||
949 | ASSERT(sc->tx.txq[qnum].axq_qnum == qnum); | 949 | BUG_ON(sc->tx.txq[qnum].axq_qnum != qnum); |
950 | 950 | ||
951 | ath9k_hw_get_txq_props(ah, qnum, &qi); | 951 | ath9k_hw_get_txq_props(ah, qnum, &qi); |
952 | qi.tqi_aifs = qinfo->tqi_aifs; | 952 | qi.tqi_aifs = qinfo->tqi_aifs; |