OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 Video54 Technologies, Inc. | 2 * Copyright (c) 2004 Video54 Technologies, Inc. |
3 * Copyright (c) 2004-2009 Atheros Communications, Inc. | 3 * Copyright (c) 2004-2009 Atheros Communications, Inc. |
4 * | 4 * |
5 * Permission to use, copy, modify, and/or distribute this software for any | 5 * Permission to use, copy, modify, and/or distribute this software for any |
6 * purpose with or without fee is hereby granted, provided that the above | 6 * purpose with or without fee is hereby granted, provided that the above |
7 * copyright notice and this permission notice appear in all copies. | 7 * copyright notice and this permission notice appear in all copies. |
8 * | 8 * |
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 caps |= WLAN_RC_DS_FLAG; | 1313 caps |= WLAN_RC_DS_FLAG; |
1314 if (is_cw40) | 1314 if (is_cw40) |
1315 caps |= WLAN_RC_40_FLAG; | 1315 caps |= WLAN_RC_40_FLAG; |
1316 if (is_sgi) | 1316 if (is_sgi) |
1317 caps |= WLAN_RC_SGI_FLAG; | 1317 caps |= WLAN_RC_SGI_FLAG; |
1318 } | 1318 } |
1319 | 1319 |
1320 return caps; | 1320 return caps; |
1321 } | 1321 } |
1322 | 1322 |
1323 static bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, | |
1324 u8 tidno) | |
1325 { | |
1326 struct ath_atx_tid *txtid; | |
1327 | |
1328 if (!(sc->sc_flags & SC_OP_TXAGGR)) | |
1329 return false; | |
1330 | |
1331 txtid = ATH_AN_2_TID(an, tidno); | |
1332 | |
1333 if (!(txtid->state & (AGGR_ADDBA_COMPLETE | AGGR_ADDBA_PROGRESS))) | |
1334 return true; | |
1335 return false; | |
1336 } | |
1337 | |
1338 | |
1339 /***********************************/ | 1323 /***********************************/ |
1340 /* mac80211 Rate Control callbacks */ | 1324 /* mac80211 Rate Control callbacks */ |
1341 /***********************************/ | 1325 /***********************************/ |
1342 | 1326 |
1343 static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | 1327 static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, |
1344 struct ieee80211_sta *sta, void *priv_sta, | 1328 struct ieee80211_sta *sta, void *priv_sta, |
1345 struct sk_buff *skb) | 1329 struct sk_buff *skb) |
1346 { | 1330 { |
1347 struct ath_softc *sc = priv; | 1331 struct ath_softc *sc = priv; |
1348 struct ath_rate_priv *ath_rc_priv = priv_sta; | 1332 struct ath_rate_priv *ath_rc_priv = priv_sta; |
(...skipping 19 matching lines...) Expand all Loading... |
1368 return; | 1352 return; |
1369 | 1353 |
1370 /* This packet was aggregated but doesn't carry status info */ | 1354 /* This packet was aggregated but doesn't carry status info */ |
1371 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && | 1355 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && |
1372 !(tx_info->flags & IEEE80211_TX_STAT_AMPDU)) | 1356 !(tx_info->flags & IEEE80211_TX_STAT_AMPDU)) |
1373 return; | 1357 return; |
1374 | 1358 |
1375 if (tx_info->flags & IEEE80211_TX_STAT_TX_FILTERED) | 1359 if (tx_info->flags & IEEE80211_TX_STAT_TX_FILTERED) |
1376 return; | 1360 return; |
1377 | 1361 |
| 1362 if (!(tx_info->flags & IEEE80211_TX_STAT_AMPDU)) { |
| 1363 tx_info->status.ampdu_ack_len = |
| 1364 (tx_info->flags & IEEE80211_TX_STAT_ACK ? 1 : 0); |
| 1365 tx_info->status.ampdu_len = 1; |
| 1366 } |
| 1367 |
1378 /* | 1368 /* |
1379 * If an underrun error is seen assume it as an excessive retry only | 1369 * If an underrun error is seen assume it as an excessive retry only |
1380 * if max frame trigger level has been reached (2 KB for singel stream, | 1370 * if max frame trigger level has been reached (2 KB for singel stream, |
1381 * and 4 KB for dual stream). Adjust the long retry as if the frame was | 1371 * and 4 KB for dual stream). Adjust the long retry as if the frame was |
1382 * tried hw->max_rate_tries times to affect how ratectrl updates PER for | 1372 * tried hw->max_rate_tries times to affect how ratectrl updates PER for |
1383 * the failed rate. In case of congestion on the bus penalizing these | 1373 * the failed rate. In case of congestion on the bus penalizing these |
1384 * type of underruns should help hardware actually transmit new frames | 1374 * type of underruns should help hardware actually transmit new frames |
1385 * successfully by eventually preferring slower rates. This itself | 1375 * successfully by eventually preferring slower rates. This itself |
1386 * should also alleviate congestion on the bus. | 1376 * should also alleviate congestion on the bus. |
1387 */ | 1377 */ |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 | 1555 |
1566 int ath_rate_control_register(void) | 1556 int ath_rate_control_register(void) |
1567 { | 1557 { |
1568 return ieee80211_rate_control_register(&ath_rate_ops); | 1558 return ieee80211_rate_control_register(&ath_rate_ops); |
1569 } | 1559 } |
1570 | 1560 |
1571 void ath_rate_control_unregister(void) | 1561 void ath_rate_control_unregister(void) |
1572 { | 1562 { |
1573 ieee80211_rate_control_unregister(&ath_rate_ops); | 1563 ieee80211_rate_control_unregister(&ath_rate_ops); |
1574 } | 1564 } |
OLD | NEW |