| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 Atheros Communications Inc. | 2 * Copyright (c) 2010 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } else { | 227 } else { |
| 228 /* XXX Intermediate descriptor in a multi-descriptor frame.*/ | 228 /* XXX Intermediate descriptor in a multi-descriptor frame.*/ |
| 229 ads->ctl11 = 0; | 229 ads->ctl11 = 0; |
| 230 ads->ctl12 = AR_TxMore; | 230 ads->ctl12 = AR_TxMore; |
| 231 ads->ctl13 = 0; | 231 ads->ctl13 = 0; |
| 232 ads->ctl14 = 0; | 232 ads->ctl14 = 0; |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 | 235 |
| 236 static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds, | 236 static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds, |
| 237 » » » » struct ath_tx_status *ts) | 237 » » » » struct ath_tx_status *ts, |
| 238 » » » » void *txs_desc) |
| 238 { | 239 { |
| 239 struct ar9003_txs *ads; | 240 struct ar9003_txs *ads; |
| 240 | 241 |
| 241 ads = &ah->ts_ring[ah->ts_tail]; | 242 ads = &ah->ts_ring[ah->ts_tail]; |
| 242 | 243 |
| 243 if ((ads->status8 & AR_TxDone) == 0) | 244 if ((ads->status8 & AR_TxDone) == 0) |
| 244 return -EINPROGRESS; | 245 return -EINPROGRESS; |
| 245 | 246 |
| 246 ah->ts_tail = (ah->ts_tail + 1) % ah->ts_size; | 247 ah->ts_tail = (ah->ts_tail + 1) % ah->ts_size; |
| 247 | 248 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 ts->ts_rssi_ext0 = MS(ads->status7, AR_TxRSSIAnt10); | 299 ts->ts_rssi_ext0 = MS(ads->status7, AR_TxRSSIAnt10); |
| 299 ts->ts_rssi_ext1 = MS(ads->status7, AR_TxRSSIAnt11); | 300 ts->ts_rssi_ext1 = MS(ads->status7, AR_TxRSSIAnt11); |
| 300 ts->ts_rssi_ext2 = MS(ads->status7, AR_TxRSSIAnt12); | 301 ts->ts_rssi_ext2 = MS(ads->status7, AR_TxRSSIAnt12); |
| 301 ts->ts_shortretry = MS(ads->status3, AR_RTSFailCnt); | 302 ts->ts_shortretry = MS(ads->status3, AR_RTSFailCnt); |
| 302 ts->ts_longretry = MS(ads->status3, AR_DataFailCnt); | 303 ts->ts_longretry = MS(ads->status3, AR_DataFailCnt); |
| 303 ts->ts_virtcol = MS(ads->status3, AR_VirtRetryCnt); | 304 ts->ts_virtcol = MS(ads->status3, AR_VirtRetryCnt); |
| 304 ts->ts_antenna = 0; | 305 ts->ts_antenna = 0; |
| 305 | 306 |
| 306 ts->tid = MS(ads->status8, AR_TxTid); | 307 ts->tid = MS(ads->status8, AR_TxTid); |
| 307 | 308 |
| 309 memcpy(txs_desc, ads, sizeof(*ads)); |
| 308 memset(ads, 0, sizeof(*ads)); | 310 memset(ads, 0, sizeof(*ads)); |
| 309 | 311 |
| 310 return 0; | 312 return 0; |
| 311 } | 313 } |
| 312 | 314 |
| 313 static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds, | 315 static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds, |
| 314 u32 pktlen, enum ath9k_pkt_type type, u32 txpower, | 316 u32 pktlen, enum ath9k_pkt_type type, u32 txpower, |
| 315 u32 keyIx, enum ath9k_key_type keyType, u32 flags) | 317 u32 keyIx, enum ath9k_key_type keyType, u32 flags) |
| 316 { | 318 { |
| 317 struct ar9003_txc *ads = (struct ar9003_txc *) ds; | 319 struct ar9003_txc *ads = (struct ar9003_txc *) ds; |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 { | 672 { |
| 671 | 673 |
| 672 ah->ts_paddr_start = ts_paddr_start; | 674 ah->ts_paddr_start = ts_paddr_start; |
| 673 ah->ts_paddr_end = ts_paddr_start + (size * sizeof(struct ar9003_txs)); | 675 ah->ts_paddr_end = ts_paddr_start + (size * sizeof(struct ar9003_txs)); |
| 674 ah->ts_size = size; | 676 ah->ts_size = size; |
| 675 ah->ts_ring = (struct ar9003_txs *) ts_start; | 677 ah->ts_ring = (struct ar9003_txs *) ts_start; |
| 676 | 678 |
| 677 ath9k_hw_reset_txstatus_ring(ah); | 679 ath9k_hw_reset_txstatus_ring(ah); |
| 678 } | 680 } |
| 679 EXPORT_SYMBOL(ath9k_hw_setup_statusring); | 681 EXPORT_SYMBOL(ath9k_hw_setup_statusring); |
| OLD | NEW |