Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/beacon.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10 matching lines...) Expand all
21 /* 21 /*
22 * This function will modify certain transmit queue properties depending on 22 * This function will modify certain transmit queue properties depending on
23 * the operating mode of the station (AP or AdHoc). Parameters are AIFS 23 * the operating mode of the station (AP or AdHoc). Parameters are AIFS
24 * settings and channel width min/max 24 * settings and channel width min/max
25 */ 25 */
26 int ath_beaconq_config(struct ath_softc *sc) 26 int ath_beaconq_config(struct ath_softc *sc)
27 { 27 {
28 struct ath_hw *ah = sc->sc_ah; 28 struct ath_hw *ah = sc->sc_ah;
29 struct ath_common *common = ath9k_hw_common(ah); 29 struct ath_common *common = ath9k_hw_common(ah);
30 struct ath9k_tx_queue_info qi, qi_be; 30 struct ath9k_tx_queue_info qi, qi_be;
31 » int qnum; 31 » struct ath_txq *txq;
32 32
33 ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi); 33 ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi);
34 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) { 34 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) {
35 /* Always burst out beacon and CAB traffic. */ 35 /* Always burst out beacon and CAB traffic. */
36 qi.tqi_aifs = 1; 36 qi.tqi_aifs = 1;
37 qi.tqi_cwmin = 0; 37 qi.tqi_cwmin = 0;
38 qi.tqi_cwmax = 0; 38 qi.tqi_cwmax = 0;
39 } else { 39 } else {
40 /* Adhoc mode; important thing is to use 2x cwmin. */ 40 /* Adhoc mode; important thing is to use 2x cwmin. */
41 » » qnum = sc->tx.hwq_map[WME_AC_BE]; 41 » » txq = sc->tx.txq_map[WME_AC_BE];
42 » » ath9k_hw_get_txq_props(ah, qnum, &qi_be); 42 » » ath9k_hw_get_txq_props(ah, txq->axq_qnum, &qi_be);
43 qi.tqi_aifs = qi_be.tqi_aifs; 43 qi.tqi_aifs = qi_be.tqi_aifs;
44 qi.tqi_cwmin = 4*qi_be.tqi_cwmin; 44 qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
45 qi.tqi_cwmax = qi_be.tqi_cwmax; 45 qi.tqi_cwmax = qi_be.tqi_cwmax;
46 } 46 }
47 47
48 if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { 48 if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) {
49 ath_print(common, ATH_DBG_FATAL, 49 ath_print(common, ATH_DBG_FATAL,
50 "Unable to update h/w beacon queue parameters\n"); 50 "Unable to update h/w beacon queue parameters\n");
51 return 0; 51 return 0;
52 } else { 52 } else {
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 sc->beacon.bmisscnt++; 359 sc->beacon.bmisscnt++;
360 360
361 if (sc->beacon.bmisscnt < BSTUCK_THRESH) { 361 if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
362 ath_print(common, ATH_DBG_BEACON, 362 ath_print(common, ATH_DBG_BEACON,
363 "missed %u consecutive beacons\n", 363 "missed %u consecutive beacons\n",
364 sc->beacon.bmisscnt); 364 sc->beacon.bmisscnt);
365 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) { 365 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
366 ath_print(common, ATH_DBG_BEACON, 366 ath_print(common, ATH_DBG_BEACON,
367 "beacon is officially stuck\n"); 367 "beacon is officially stuck\n");
368 sc->sc_flags |= SC_OP_TSF_RESET; 368 sc->sc_flags |= SC_OP_TSF_RESET;
369 » » » ath_reset(sc, false); 369 » » » ath_reset(sc, true);
370 } 370 }
371 371
372 return; 372 return;
373 } 373 }
374 374
375 if (sc->beacon.bmisscnt != 0) { 375 if (sc->beacon.bmisscnt != 0) {
376 ath_print(common, ATH_DBG_BEACON, 376 ath_print(common, ATH_DBG_BEACON,
377 "resume beacon xmit after %u misses\n", 377 "resume beacon xmit after %u misses\n",
378 sc->beacon.bmisscnt); 378 sc->beacon.bmisscnt);
379 sc->beacon.bmisscnt = 0; 379 sc->beacon.bmisscnt = 0;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 ath_beacon_config_sta(sc, cur_conf); 731 ath_beacon_config_sta(sc, cur_conf);
732 break; 732 break;
733 default: 733 default:
734 ath_print(common, ATH_DBG_CONFIG, 734 ath_print(common, ATH_DBG_CONFIG,
735 "Unsupported beaconing mode\n"); 735 "Unsupported beaconing mode\n");
736 return; 736 return;
737 } 737 }
738 738
739 sc->sc_flags |= SC_OP_BEACONS; 739 sc->sc_flags |= SC_OP_BEACONS;
740 } 740 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698