| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008-2009 Atheros Communications Inc. | 2 * Copyright (c) 2008-2009 Atheros Communications Inc. |
| 3 * | 3 * |
| 4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
| 5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
| 6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
| 7 * | 7 * |
| 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 #define ATH_TX_COMPLETE_POLL_INT 1000 | 188 #define ATH_TX_COMPLETE_POLL_INT 1000 |
| 189 | 189 |
| 190 enum ATH_AGGR_STATUS { | 190 enum ATH_AGGR_STATUS { |
| 191 ATH_AGGR_DONE, | 191 ATH_AGGR_DONE, |
| 192 ATH_AGGR_BAW_CLOSED, | 192 ATH_AGGR_BAW_CLOSED, |
| 193 ATH_AGGR_LIMITED, | 193 ATH_AGGR_LIMITED, |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 #define ATH_TXFIFO_DEPTH 8 | 196 #define ATH_TXFIFO_DEPTH 8 |
| 197 struct ath_txq { | 197 struct ath_txq { |
| 198 int axq_class; | |
| 199 u32 axq_qnum; | 198 u32 axq_qnum; |
| 200 u32 *axq_link; | 199 u32 *axq_link; |
| 201 struct list_head axq_q; | 200 struct list_head axq_q; |
| 202 spinlock_t axq_lock; | 201 spinlock_t axq_lock; |
| 203 u32 axq_depth; | 202 u32 axq_depth; |
| 204 bool stopped; | 203 bool stopped; |
| 205 bool axq_tx_inprogress; | 204 bool axq_tx_inprogress; |
| 206 struct list_head axq_acq; | 205 struct list_head axq_acq; |
| 207 struct list_head txq_fifo[ATH_TXFIFO_DEPTH]; | 206 struct list_head txq_fifo[ATH_TXFIFO_DEPTH]; |
| 208 struct list_head txq_fifo_pending; | 207 struct list_head txq_fifo_pending; |
| 209 u8 txq_headidx; | 208 u8 txq_headidx; |
| 210 u8 txq_tailidx; | 209 u8 txq_tailidx; |
| 210 int pending_frames; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 struct ath_atx_ac { | 213 struct ath_atx_ac { |
| 214 struct ath_txq *txq; |
| 214 int sched; | 215 int sched; |
| 215 int qnum; | |
| 216 struct list_head list; | 216 struct list_head list; |
| 217 struct list_head tid_q; | 217 struct list_head tid_q; |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 struct ath_buf_state { | 220 struct ath_buf_state { |
| 221 int bfs_nframes; | 221 int bfs_nframes; |
| 222 u16 bfs_al; | 222 u16 bfs_al; |
| 223 u16 bfs_frmlen; | 223 u16 bfs_frmlen; |
| 224 int bfs_seqno; | 224 int bfs_seqno; |
| 225 int bfs_tidno; | 225 int bfs_tidno; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 247 struct ath_buf_state bf_state; | 247 struct ath_buf_state bf_state; |
| 248 dma_addr_t bf_dmacontext; | 248 dma_addr_t bf_dmacontext; |
| 249 struct ath_wiphy *aphy; | 249 struct ath_wiphy *aphy; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 struct ath_atx_tid { | 252 struct ath_atx_tid { |
| 253 struct list_head list; | 253 struct list_head list; |
| 254 struct list_head buf_q; | 254 struct list_head buf_q; |
| 255 struct ath_node *an; | 255 struct ath_node *an; |
| 256 struct ath_atx_ac *ac; | 256 struct ath_atx_ac *ac; |
| 257 » unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)]; | 257 » struct ath_buf *tx_buf[ATH_TID_MAX_BUFS]; |
| 258 u16 seq_start; | 258 u16 seq_start; |
| 259 u16 seq_next; | 259 u16 seq_next; |
| 260 u16 baw_size; | 260 u16 baw_size; |
| 261 int tidno; | 261 int tidno; |
| 262 int baw_head; /* first un-acked tx buffer */ | 262 int baw_head; /* first un-acked tx buffer */ |
| 263 int baw_tail; /* next unused tx buffer slot */ | 263 int baw_tail; /* next unused tx buffer slot */ |
| 264 int sched; | 264 int sched; |
| 265 int paused; | 265 int paused; |
| 266 u8 state; | 266 u8 state; |
| 267 }; | 267 }; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 286 u8 paprd; | 286 u8 paprd; |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 #define ATH_TX_ERROR 0x01 | 289 #define ATH_TX_ERROR 0x01 |
| 290 #define ATH_TX_XRETRY 0x02 | 290 #define ATH_TX_XRETRY 0x02 |
| 291 #define ATH_TX_BAR 0x04 | 291 #define ATH_TX_BAR 0x04 |
| 292 | 292 |
| 293 struct ath_tx { | 293 struct ath_tx { |
| 294 u16 seq_no; | 294 u16 seq_no; |
| 295 u32 txqsetup; | 295 u32 txqsetup; |
| 296 int hwq_map[WME_NUM_AC]; | |
| 297 spinlock_t txbuflock; | 296 spinlock_t txbuflock; |
| 298 struct list_head txbuf; | 297 struct list_head txbuf; |
| 299 struct ath_txq txq[ATH9K_NUM_TX_QUEUES]; | 298 struct ath_txq txq[ATH9K_NUM_TX_QUEUES]; |
| 300 struct ath_descdma txdma; | 299 struct ath_descdma txdma; |
| 301 » int pending_frames[WME_NUM_AC]; | 300 » struct ath_txq *txq_map[WME_NUM_AC]; |
| 302 }; | 301 }; |
| 303 | 302 |
| 304 struct ath_rx_edma { | 303 struct ath_rx_edma { |
| 305 struct sk_buff_head rx_fifo; | 304 struct sk_buff_head rx_fifo; |
| 306 struct sk_buff_head rx_buffers; | 305 struct sk_buff_head rx_buffers; |
| 307 u32 rx_fifo_hwsize; | 306 u32 rx_fifo_hwsize; |
| 308 }; | 307 }; |
| 309 | 308 |
| 310 struct ath_rx { | 309 struct ath_rx { |
| 311 u8 defant; | 310 u8 defant; |
| 312 u8 rxotherant; | 311 u8 rxotherant; |
| 313 u32 *rxlink; | 312 u32 *rxlink; |
| 314 unsigned int rxfilter; | 313 unsigned int rxfilter; |
| 315 spinlock_t rxbuflock; | 314 spinlock_t rxbuflock; |
| 316 struct list_head rxbuf; | 315 struct list_head rxbuf; |
| 317 struct ath_descdma rxdma; | 316 struct ath_descdma rxdma; |
| 318 struct ath_buf *rx_bufptr; | 317 struct ath_buf *rx_bufptr; |
| 319 struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]; | 318 struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]; |
| 320 }; | 319 }; |
| 321 | 320 |
| 322 int ath_startrecv(struct ath_softc *sc); | 321 int ath_startrecv(struct ath_softc *sc); |
| 323 bool ath_stoprecv(struct ath_softc *sc); | 322 bool ath_stoprecv(struct ath_softc *sc); |
| 324 void ath_flushrecv(struct ath_softc *sc); | 323 void ath_flushrecv(struct ath_softc *sc); |
| 325 u32 ath_calcrxfilter(struct ath_softc *sc); | 324 u32 ath_calcrxfilter(struct ath_softc *sc); |
| 326 int ath_rx_init(struct ath_softc *sc, int nbufs); | 325 int ath_rx_init(struct ath_softc *sc, int nbufs); |
| 327 void ath_rx_cleanup(struct ath_softc *sc); | 326 void ath_rx_cleanup(struct ath_softc *sc); |
| 328 int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp); | 327 int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp); |
| 329 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); | 328 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); |
| 330 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); | 329 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); |
| 331 int ath_tx_setup(struct ath_softc *sc, int haltype); | |
| 332 void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); | 330 void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx); |
| 333 void ath_draintxq(struct ath_softc *sc, | 331 void ath_draintxq(struct ath_softc *sc, |
| 334 struct ath_txq *txq, bool retry_tx); | 332 struct ath_txq *txq, bool retry_tx); |
| 335 void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an); | 333 void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an); |
| 336 void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an); | 334 void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an); |
| 337 void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq); | 335 void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq); |
| 338 int ath_tx_init(struct ath_softc *sc, int nbufs); | 336 int ath_tx_init(struct ath_softc *sc, int nbufs); |
| 339 void ath_tx_cleanup(struct ath_softc *sc); | 337 void ath_tx_cleanup(struct ath_softc *sc); |
| 340 int ath_txq_update(struct ath_softc *sc, int qnum, | 338 int ath_txq_update(struct ath_softc *sc, int qnum, |
| 341 struct ath9k_tx_queue_info *q); | 339 struct ath9k_tx_queue_info *q); |
| 342 int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, | 340 int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, |
| 343 struct ath_tx_control *txctl); | 341 struct ath_tx_control *txctl); |
| 344 void ath_tx_tasklet(struct ath_softc *sc); | 342 void ath_tx_tasklet(struct ath_softc *sc); |
| 345 void ath_tx_edma_tasklet(struct ath_softc *sc); | 343 void ath_tx_edma_tasklet(struct ath_softc *sc); |
| 346 void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb); | 344 void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb); |
| 345 bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno); |
| 347 int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | 346 int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, |
| 348 u16 tid, u16 *ssn); | 347 u16 tid, u16 *ssn); |
| 349 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); | 348 void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); |
| 350 void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid
); | 349 void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid
); |
| 351 void ath9k_enable_ps(struct ath_softc *sc); | 350 void ath9k_enable_ps(struct ath_softc *sc); |
| 352 | 351 |
| 353 /********/ | 352 /********/ |
| 354 /* VIFs */ | 353 /* VIFs */ |
| 355 /********/ | 354 /********/ |
| 356 | 355 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 ATH_WIPHY_PAUSED, | 613 ATH_WIPHY_PAUSED, |
| 615 ATH_WIPHY_SCAN, | 614 ATH_WIPHY_SCAN, |
| 616 } state; | 615 } state; |
| 617 bool idle; | 616 bool idle; |
| 618 int chan_idx; | 617 int chan_idx; |
| 619 int chan_is_ht; | 618 int chan_is_ht; |
| 620 }; | 619 }; |
| 621 | 620 |
| 622 void ath9k_tasklet(unsigned long data); | 621 void ath9k_tasklet(unsigned long data); |
| 623 int ath_reset(struct ath_softc *sc, bool retry_tx); | 622 int ath_reset(struct ath_softc *sc, bool retry_tx); |
| 624 int ath_get_mac80211_qnum(u32 queue, struct ath_softc *sc); | |
| 625 int ath_cabq_update(struct ath_softc *); | 623 int ath_cabq_update(struct ath_softc *); |
| 626 | 624 |
| 627 static inline void ath_read_cachesize(struct ath_common *common, int *csz) | 625 static inline void ath_read_cachesize(struct ath_common *common, int *csz) |
| 628 { | 626 { |
| 629 common->bus_ops->read_cachesize(common, csz); | 627 common->bus_ops->read_cachesize(common, csz); |
| 630 } | 628 } |
| 631 | 629 |
| 632 extern struct ieee80211_ops ath9k_ops; | 630 extern struct ieee80211_ops ath9k_ops; |
| 633 extern int modparam_nohwcrypt; | 631 extern int modparam_nohwcrypt; |
| 634 extern int led_blink; | 632 extern int led_blink; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 bool ath9k_all_wiphys_idle(struct ath_softc *sc); | 682 bool ath9k_all_wiphys_idle(struct ath_softc *sc); |
| 685 void ath9k_set_wiphy_idle(struct ath_wiphy *aphy, bool idle); | 683 void ath9k_set_wiphy_idle(struct ath_wiphy *aphy, bool idle); |
| 686 | 684 |
| 687 void ath_mac80211_stop_queue(struct ath_softc *sc, u16 skb_queue); | 685 void ath_mac80211_stop_queue(struct ath_softc *sc, u16 skb_queue); |
| 688 bool ath_mac80211_start_queue(struct ath_softc *sc, u16 skb_queue); | 686 bool ath_mac80211_start_queue(struct ath_softc *sc, u16 skb_queue); |
| 689 | 687 |
| 690 void ath_start_rfkill_poll(struct ath_softc *sc); | 688 void ath_start_rfkill_poll(struct ath_softc *sc); |
| 691 extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw); | 689 extern void ath9k_rfkill_poll_state(struct ieee80211_hw *hw); |
| 692 | 690 |
| 693 #endif /* ATH9K_H */ | 691 #endif /* ATH9K_H */ |
| OLD | NEW |