aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/beacon.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-02 22:12:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:48 -0500
commit226afe68fdbd1aa3680158aca0a3631cbd019626 (patch)
tree89e31323c0798493b9d0b3ec32df33fc21d82bf6 /drivers/net/wireless/ath/ath9k/beacon.c
parent3800276a40751539a920ef8e0537ef2e19126799 (diff)
ath: Convert ath_print to ath_dbg
Remove ath/debug.h and the includes of these files. Coalesce long formats. Correct a few misspellings and missing "\n"s from these logging messages. Remove unnecessary trailing space before a newline. Remove ARRAY_SIZE casts, use printf type %zu Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 70019e93e739..5e108c086904 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -120,11 +120,11 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
120 memset(&txctl, 0, sizeof(struct ath_tx_control)); 120 memset(&txctl, 0, sizeof(struct ath_tx_control));
121 txctl.txq = sc->beacon.cabq; 121 txctl.txq = sc->beacon.cabq;
122 122
123 ath_print(common, ATH_DBG_XMIT, 123 ath_dbg(common, ATH_DBG_XMIT,
124 "transmitting CABQ packet, skb: %p\n", skb); 124 "transmitting CABQ packet, skb: %p\n", skb);
125 125
126 if (ath_tx_start(hw, skb, &txctl) != 0) { 126 if (ath_tx_start(hw, skb, &txctl) != 0) {
127 ath_print(common, ATH_DBG_XMIT, "CABQ TX failed\n"); 127 ath_dbg(common, ATH_DBG_XMIT, "CABQ TX failed\n");
128 dev_kfree_skb_any(skb); 128 dev_kfree_skb_any(skb);
129 } 129 }
130} 130}
@@ -209,8 +209,8 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
209 209
210 if (skb && cabq_depth) { 210 if (skb && cabq_depth) {
211 if (sc->nvifs > 1) { 211 if (sc->nvifs > 1) {
212 ath_print(common, ATH_DBG_BEACON, 212 ath_dbg(common, ATH_DBG_BEACON,
213 "Flushing previous cabq traffic\n"); 213 "Flushing previous cabq traffic\n");
214 ath_draintxq(sc, cabq, false); 214 ath_draintxq(sc, cabq, false);
215 } 215 }
216 } 216 }
@@ -282,7 +282,7 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
282 /* NB: the beacon data buffer must be 32-bit aligned. */ 282 /* NB: the beacon data buffer must be 32-bit aligned. */
283 skb = ieee80211_beacon_get(sc->hw, vif); 283 skb = ieee80211_beacon_get(sc->hw, vif);
284 if (skb == NULL) { 284 if (skb == NULL) {
285 ath_print(common, ATH_DBG_BEACON, "cannot get skb\n"); 285 ath_dbg(common, ATH_DBG_BEACON, "cannot get skb\n");
286 return -ENOMEM; 286 return -ENOMEM;
287 } 287 }
288 288
@@ -306,10 +306,9 @@ int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif)
306 tsfadjust = intval * avp->av_bslot / ATH_BCBUF; 306 tsfadjust = intval * avp->av_bslot / ATH_BCBUF;
307 avp->tsf_adjust = cpu_to_le64(TU_TO_USEC(tsfadjust)); 307 avp->tsf_adjust = cpu_to_le64(TU_TO_USEC(tsfadjust));
308 308
309 ath_print(common, ATH_DBG_BEACON, 309 ath_dbg(common, ATH_DBG_BEACON,
310 "stagger beacons, bslot %d intval " 310 "stagger beacons, bslot %d intval %u tsfadjust %llu\n",
311 "%u tsfadjust %llu\n", 311 avp->av_bslot, intval, (unsigned long long)tsfadjust);
312 avp->av_bslot, intval, (unsigned long long)tsfadjust);
313 312
314 ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp = 313 ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp =
315 avp->tsf_adjust; 314 avp->tsf_adjust;
@@ -380,13 +379,13 @@ void ath_beacon_tasklet(unsigned long data)
380 sc->beacon.bmisscnt++; 379 sc->beacon.bmisscnt++;
381 380
382 if (sc->beacon.bmisscnt < BSTUCK_THRESH) { 381 if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
383 ath_print(common, ATH_DBG_BSTUCK, 382 ath_dbg(common, ATH_DBG_BSTUCK,
384 "missed %u consecutive beacons\n", 383 "missed %u consecutive beacons\n",
385 sc->beacon.bmisscnt); 384 sc->beacon.bmisscnt);
386 ath9k_hw_bstuck_nfcal(ah); 385 ath9k_hw_bstuck_nfcal(ah);
387 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) { 386 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
388 ath_print(common, ATH_DBG_BSTUCK, 387 ath_dbg(common, ATH_DBG_BSTUCK,
389 "beacon is officially stuck\n"); 388 "beacon is officially stuck\n");
390 sc->sc_flags |= SC_OP_TSF_RESET; 389 sc->sc_flags |= SC_OP_TSF_RESET;
391 ath_reset(sc, true); 390 ath_reset(sc, true);
392 } 391 }
@@ -395,9 +394,9 @@ void ath_beacon_tasklet(unsigned long data)
395 } 394 }
396 395
397 if (sc->beacon.bmisscnt != 0) { 396 if (sc->beacon.bmisscnt != 0) {
398 ath_print(common, ATH_DBG_BSTUCK, 397 ath_dbg(common, ATH_DBG_BSTUCK,
399 "resume beacon xmit after %u misses\n", 398 "resume beacon xmit after %u misses\n",
400 sc->beacon.bmisscnt); 399 sc->beacon.bmisscnt);
401 sc->beacon.bmisscnt = 0; 400 sc->beacon.bmisscnt = 0;
402 } 401 }
403 402
@@ -423,9 +422,9 @@ void ath_beacon_tasklet(unsigned long data)
423 vif = sc->beacon.bslot[slot]; 422 vif = sc->beacon.bslot[slot];
424 aphy = sc->beacon.bslot_aphy[slot]; 423 aphy = sc->beacon.bslot_aphy[slot];
425 424
426 ath_print(common, ATH_DBG_BEACON, 425 ath_dbg(common, ATH_DBG_BEACON,
427 "slot %d [tsf %llu tsftu %u intval %u] vif %p\n", 426 "slot %d [tsf %llu tsftu %u intval %u] vif %p\n",
428 slot, tsf, tsftu, intval, vif); 427 slot, tsf, tsftu, intval, vif);
429 428
430 bfaddr = 0; 429 bfaddr = 0;
431 if (vif) { 430 if (vif) {
@@ -554,8 +553,8 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
554 553
555 /* No need to configure beacon if we are not associated */ 554 /* No need to configure beacon if we are not associated */
556 if (!common->curaid) { 555 if (!common->curaid) {
557 ath_print(common, ATH_DBG_BEACON, 556 ath_dbg(common, ATH_DBG_BEACON,
558 "STA is not yet associated..skipping beacon config\n"); 557 "STA is not yet associated..skipping beacon config\n");
559 return; 558 return;
560 } 559 }
561 560
@@ -648,11 +647,11 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
648 /* TSF out of range threshold fixed at 1 second */ 647 /* TSF out of range threshold fixed at 1 second */
649 bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD; 648 bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD;
650 649
651 ath_print(common, ATH_DBG_BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu); 650 ath_dbg(common, ATH_DBG_BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu);
652 ath_print(common, ATH_DBG_BEACON, 651 ath_dbg(common, ATH_DBG_BEACON,
653 "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n", 652 "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n",
654 bs.bs_bmissthreshold, bs.bs_sleepduration, 653 bs.bs_bmissthreshold, bs.bs_sleepduration,
655 bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext); 654 bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext);
656 655
657 /* Set the computed STA beacon timers */ 656 /* Set the computed STA beacon timers */
658 657
@@ -688,9 +687,9 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
688 nexttbtt += intval; 687 nexttbtt += intval;
689 } while (nexttbtt < tsftu); 688 } while (nexttbtt < tsftu);
690 689
691 ath_print(common, ATH_DBG_BEACON, 690 ath_dbg(common, ATH_DBG_BEACON,
692 "IBSS nexttbtt %u intval %u (%u)\n", 691 "IBSS nexttbtt %u intval %u (%u)\n",
693 nexttbtt, intval, conf->beacon_interval); 692 nexttbtt, intval, conf->beacon_interval);
694 693
695 /* 694 /*
696 * In IBSS mode enable the beacon timers but only enable SWBA interrupts 695 * In IBSS mode enable the beacon timers but only enable SWBA interrupts
@@ -753,8 +752,8 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
753 ath_beacon_config_sta(sc, cur_conf); 752 ath_beacon_config_sta(sc, cur_conf);
754 break; 753 break;
755 default: 754 default:
756 ath_print(common, ATH_DBG_CONFIG, 755 ath_dbg(common, ATH_DBG_CONFIG,
757 "Unsupported beaconing mode\n"); 756 "Unsupported beaconing mode\n");
758 return; 757 return;
759 } 758 }
760 759