diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/antsel.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/channel.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 107 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 292 |
5 files changed, 221 insertions, 212 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c index 93d4ecddf0be..2916ddf2414a 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "antsel.h" | 21 | #include "antsel.h" |
22 | #include "main.h" | 22 | #include "main.h" |
23 | #include "ampdu.h" | 23 | #include "ampdu.h" |
24 | #include "debug.h" | ||
24 | 25 | ||
25 | /* max number of mpdus in an ampdu */ | 26 | /* max number of mpdus in an ampdu */ |
26 | #define AMPDU_MAX_MPDU 32 | 27 | #define AMPDU_MAX_MPDU 32 |
@@ -179,18 +180,19 @@ static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu) | |||
179 | static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on) | 180 | static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on) |
180 | { | 181 | { |
181 | struct brcms_c_info *wlc = ampdu->wlc; | 182 | struct brcms_c_info *wlc = ampdu->wlc; |
183 | struct bcma_device *core = wlc->hw->d11core; | ||
182 | 184 | ||
183 | wlc->pub->_ampdu = false; | 185 | wlc->pub->_ampdu = false; |
184 | 186 | ||
185 | if (on) { | 187 | if (on) { |
186 | if (!(wlc->pub->_n_enab & SUPPORT_11N)) { | 188 | if (!(wlc->pub->_n_enab & SUPPORT_11N)) { |
187 | wiphy_err(ampdu->wlc->wiphy, "wl%d: driver not " | 189 | brcms_err(core, "wl%d: driver not nmode enabled\n", |
188 | "nmode enabled\n", wlc->pub->unit); | 190 | wlc->pub->unit); |
189 | return -ENOTSUPP; | 191 | return -ENOTSUPP; |
190 | } | 192 | } |
191 | if (!brcms_c_ampdu_cap(ampdu)) { | 193 | if (!brcms_c_ampdu_cap(ampdu)) { |
192 | wiphy_err(ampdu->wlc->wiphy, "wl%d: device not " | 194 | brcms_err(core, "wl%d: device not ampdu capable\n", |
193 | "ampdu capable\n", wlc->pub->unit); | 195 | wlc->pub->unit); |
194 | return -ENOTSUPP; | 196 | return -ENOTSUPP; |
195 | } | 197 | } |
196 | wlc->pub->_ampdu = on; | 198 | wlc->pub->_ampdu = on; |
@@ -481,7 +483,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, | |||
481 | scb_ampdu = &scb->scb_ampdu; | 483 | scb_ampdu = &scb->scb_ampdu; |
482 | 484 | ||
483 | if (!ampdu->ini_enable[tid]) { | 485 | if (!ampdu->ini_enable[tid]) { |
484 | wiphy_err(ampdu->wlc->wiphy, "%s: Rejecting tid %d\n", | 486 | brcms_err(wlc->hw->d11core, "%s: Rejecting tid %d\n", |
485 | __func__, tid); | 487 | __func__, tid); |
486 | return; | 488 | return; |
487 | } | 489 | } |
@@ -896,13 +898,14 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
896 | if (supr_status) { | 898 | if (supr_status) { |
897 | update_rate = false; | 899 | update_rate = false; |
898 | if (supr_status == TX_STATUS_SUPR_BADCH) { | 900 | if (supr_status == TX_STATUS_SUPR_BADCH) { |
899 | wiphy_err(wiphy, | 901 | brcms_err(wlc->hw->d11core, |
900 | "%s: Pkt tx suppressed, illegal channel possibly %d\n", | 902 | "%s: Pkt tx suppressed, illegal channel possibly %d\n", |
901 | __func__, CHSPEC_CHANNEL( | 903 | __func__, CHSPEC_CHANNEL( |
902 | wlc->default_bss->chanspec)); | 904 | wlc->default_bss->chanspec)); |
903 | } else { | 905 | } else { |
904 | if (supr_status != TX_STATUS_SUPR_FRAG) | 906 | if (supr_status != TX_STATUS_SUPR_FRAG) |
905 | wiphy_err(wiphy, "%s: supr_status 0x%x\n", | 907 | brcms_err(wlc->hw->d11core, |
908 | "%s: supr_status 0x%x\n", | ||
906 | __func__, supr_status); | 909 | __func__, supr_status); |
907 | } | 910 | } |
908 | /* no need to retry for badch; will fail again */ | 911 | /* no need to retry for badch; will fail again */ |
@@ -923,7 +926,8 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | |||
923 | } | 926 | } |
924 | } else if (txs->phyerr) { | 927 | } else if (txs->phyerr) { |
925 | update_rate = false; | 928 | update_rate = false; |
926 | wiphy_err(wiphy, "%s: ampdu tx phy error (0x%x)\n", | 929 | brcms_err(wlc->hw->d11core, |
930 | "%s: ampdu tx phy error (0x%x)\n", | ||
927 | __func__, txs->phyerr); | 931 | __func__, txs->phyerr); |
928 | 932 | ||
929 | if (brcm_msg_level & BRCM_DL_INFO) { | 933 | if (brcm_msg_level & BRCM_DL_INFO) { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/antsel.c b/drivers/net/wireless/brcm80211/brcmsmac/antsel.c index 55e12c327911..54c616919590 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/antsel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/antsel.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "main.h" | 21 | #include "main.h" |
22 | #include "phy_shim.h" | 22 | #include "phy_shim.h" |
23 | #include "antsel.h" | 23 | #include "antsel.h" |
24 | #include "debug.h" | ||
24 | 25 | ||
25 | #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */ | 26 | #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */ |
26 | #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */ | 27 | #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */ |
@@ -137,7 +138,8 @@ struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc) | |||
137 | asi->antsel_avail = false; | 138 | asi->antsel_avail = false; |
138 | } else { | 139 | } else { |
139 | asi->antsel_avail = false; | 140 | asi->antsel_avail = false; |
140 | wiphy_err(wlc->wiphy, "antsel_attach: 2o3 " | 141 | brcms_err(wlc->hw->d11core, |
142 | "antsel_attach: 2o3 " | ||
141 | "board cfg invalid\n"); | 143 | "board cfg invalid\n"); |
142 | } | 144 | } |
143 | 145 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index 64a48f06d68b..a90b72202ec5 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "stf.h" | 26 | #include "stf.h" |
27 | #include "channel.h" | 27 | #include "channel.h" |
28 | #include "mac80211_if.h" | 28 | #include "mac80211_if.h" |
29 | #include "debug.h" | ||
29 | 30 | ||
30 | /* QDB() macro takes a dB value and converts to a quarter dB value */ | 31 | /* QDB() macro takes a dB value and converts to a quarter dB value */ |
31 | #define QDB(n) ((n) * BRCMS_TXPWR_DB_FACTOR) | 32 | #define QDB(n) ((n) * BRCMS_TXPWR_DB_FACTOR) |
@@ -336,8 +337,6 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc) | |||
336 | const char *ccode = sprom->alpha2; | 337 | const char *ccode = sprom->alpha2; |
337 | int ccode_len = sizeof(sprom->alpha2); | 338 | int ccode_len = sizeof(sprom->alpha2); |
338 | 339 | ||
339 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | ||
340 | |||
341 | wlc_cm = kzalloc(sizeof(struct brcms_cm_info), GFP_ATOMIC); | 340 | wlc_cm = kzalloc(sizeof(struct brcms_cm_info), GFP_ATOMIC); |
342 | if (wlc_cm == NULL) | 341 | if (wlc_cm == NULL) |
343 | return NULL; | 342 | return NULL; |
@@ -615,8 +614,8 @@ brcms_c_valid_chanspec_ext(struct brcms_cm_info *wlc_cm, u16 chspec) | |||
615 | 614 | ||
616 | /* check the chanspec */ | 615 | /* check the chanspec */ |
617 | if (brcms_c_chspec_malformed(chspec)) { | 616 | if (brcms_c_chspec_malformed(chspec)) { |
618 | wiphy_err(wlc->wiphy, "wl%d: malformed chanspec 0x%x\n", | 617 | brcms_err(wlc->hw->d11core, "wl%d: malformed chanspec 0x%x\n", |
619 | wlc->pub->unit, chspec); | 618 | wlc->pub->unit, chspec); |
620 | return false; | 619 | return false; |
621 | } | 620 | } |
622 | 621 | ||
@@ -738,7 +737,8 @@ static int brcms_reg_notifier(struct wiphy *wiphy, | |||
738 | mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); | 737 | mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); |
739 | } else { | 738 | } else { |
740 | mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); | 739 | mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); |
741 | wiphy_err(wlc->wiphy, "wl%d: %s: no valid channel for \"%s\"\n", | 740 | brcms_err(wlc->hw->d11core, |
741 | "wl%d: %s: no valid channel for \"%s\"\n", | ||
742 | wlc->pub->unit, __func__, request->alpha2); | 742 | wlc->pub->unit, __func__, request->alpha2); |
743 | } | 743 | } |
744 | 744 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 37b99662b0fc..8c835cd6b99e 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "ucode_loader.h" | 33 | #include "ucode_loader.h" |
34 | #include "mac80211_if.h" | 34 | #include "mac80211_if.h" |
35 | #include "main.h" | 35 | #include "main.h" |
36 | #include "debug.h" | ||
36 | 37 | ||
37 | #define N_TX_QUEUES 4 /* #tx queues on mac80211<->driver interface */ | 38 | #define N_TX_QUEUES 4 /* #tx queues on mac80211<->driver interface */ |
38 | 39 | ||
@@ -280,7 +281,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, | |||
280 | 281 | ||
281 | spin_lock_bh(&wl->lock); | 282 | spin_lock_bh(&wl->lock); |
282 | if (!wl->pub->up) { | 283 | if (!wl->pub->up) { |
283 | wiphy_err(wl->wiphy, "ops->tx called while down\n"); | 284 | brcms_err(wl->wlc->hw->d11core, "ops->tx called while down\n"); |
284 | kfree_skb(skb); | 285 | kfree_skb(skb); |
285 | goto done; | 286 | goto done; |
286 | } | 287 | } |
@@ -317,8 +318,8 @@ static int brcms_ops_start(struct ieee80211_hw *hw) | |||
317 | spin_unlock_bh(&wl->lock); | 318 | spin_unlock_bh(&wl->lock); |
318 | 319 | ||
319 | if (err != 0) | 320 | if (err != 0) |
320 | wiphy_err(hw->wiphy, "%s: brcms_up() returned %d\n", __func__, | 321 | brcms_err(wl->wlc->hw->d11core, "%s: brcms_up() returned %d\n", |
321 | err); | 322 | __func__, err); |
322 | return err; | 323 | return err; |
323 | } | 324 | } |
324 | 325 | ||
@@ -336,7 +337,7 @@ static void brcms_ops_stop(struct ieee80211_hw *hw) | |||
336 | status = brcms_c_chipmatch(wl->wlc->hw->d11core); | 337 | status = brcms_c_chipmatch(wl->wlc->hw->d11core); |
337 | spin_unlock_bh(&wl->lock); | 338 | spin_unlock_bh(&wl->lock); |
338 | if (!status) { | 339 | if (!status) { |
339 | wiphy_err(wl->wiphy, | 340 | brcms_err(wl->wlc->hw->d11core, |
340 | "wl: brcms_ops_stop: chipmatch failed\n"); | 341 | "wl: brcms_ops_stop: chipmatch failed\n"); |
341 | return; | 342 | return; |
342 | } | 343 | } |
@@ -354,8 +355,9 @@ brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
354 | 355 | ||
355 | /* Just STA for now */ | 356 | /* Just STA for now */ |
356 | if (vif->type != NL80211_IFTYPE_STATION) { | 357 | if (vif->type != NL80211_IFTYPE_STATION) { |
357 | wiphy_err(hw->wiphy, "%s: Attempt to add type %d, only" | 358 | brcms_err(wl->wlc->hw->d11core, |
358 | " STA for now\n", __func__, vif->type); | 359 | "%s: Attempt to add type %d, only STA for now\n", |
360 | __func__, vif->type); | ||
359 | return -EOPNOTSUPP; | 361 | return -EOPNOTSUPP; |
360 | } | 362 | } |
361 | 363 | ||
@@ -374,9 +376,9 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed) | |||
374 | { | 376 | { |
375 | struct ieee80211_conf *conf = &hw->conf; | 377 | struct ieee80211_conf *conf = &hw->conf; |
376 | struct brcms_info *wl = hw->priv; | 378 | struct brcms_info *wl = hw->priv; |
379 | struct bcma_device *core = wl->wlc->hw->d11core; | ||
377 | int err = 0; | 380 | int err = 0; |
378 | int new_int; | 381 | int new_int; |
379 | struct wiphy *wiphy = hw->wiphy; | ||
380 | 382 | ||
381 | spin_lock_bh(&wl->lock); | 383 | spin_lock_bh(&wl->lock); |
382 | if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { | 384 | if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { |
@@ -384,25 +386,26 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed) | |||
384 | conf->listen_interval); | 386 | conf->listen_interval); |
385 | } | 387 | } |
386 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) | 388 | if (changed & IEEE80211_CONF_CHANGE_MONITOR) |
387 | wiphy_dbg(wiphy, "%s: change monitor mode: %s\n", | 389 | brcms_dbg_info(core, "%s: change monitor mode: %s\n", |
388 | __func__, conf->flags & IEEE80211_CONF_MONITOR ? | 390 | __func__, conf->flags & IEEE80211_CONF_MONITOR ? |
389 | "true" : "false"); | 391 | "true" : "false"); |
390 | if (changed & IEEE80211_CONF_CHANGE_PS) | 392 | if (changed & IEEE80211_CONF_CHANGE_PS) |
391 | wiphy_err(wiphy, "%s: change power-save mode: %s (implement)\n", | 393 | brcms_err(core, "%s: change power-save mode: %s (implement)\n", |
392 | __func__, conf->flags & IEEE80211_CONF_PS ? | 394 | __func__, conf->flags & IEEE80211_CONF_PS ? |
393 | "true" : "false"); | 395 | "true" : "false"); |
394 | 396 | ||
395 | if (changed & IEEE80211_CONF_CHANGE_POWER) { | 397 | if (changed & IEEE80211_CONF_CHANGE_POWER) { |
396 | err = brcms_c_set_tx_power(wl->wlc, conf->power_level); | 398 | err = brcms_c_set_tx_power(wl->wlc, conf->power_level); |
397 | if (err < 0) { | 399 | if (err < 0) { |
398 | wiphy_err(wiphy, "%s: Error setting power_level\n", | 400 | brcms_err(core, "%s: Error setting power_level\n", |
399 | __func__); | 401 | __func__); |
400 | goto config_out; | 402 | goto config_out; |
401 | } | 403 | } |
402 | new_int = brcms_c_get_tx_power(wl->wlc); | 404 | new_int = brcms_c_get_tx_power(wl->wlc); |
403 | if (new_int != conf->power_level) | 405 | if (new_int != conf->power_level) |
404 | wiphy_err(wiphy, "%s: Power level req != actual, %d %d" | 406 | brcms_err(core, |
405 | "\n", __func__, conf->power_level, | 407 | "%s: Power level req != actual, %d %d\n", |
408 | __func__, conf->power_level, | ||
406 | new_int); | 409 | new_int); |
407 | } | 410 | } |
408 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | 411 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { |
@@ -429,13 +432,13 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw, | |||
429 | struct ieee80211_bss_conf *info, u32 changed) | 432 | struct ieee80211_bss_conf *info, u32 changed) |
430 | { | 433 | { |
431 | struct brcms_info *wl = hw->priv; | 434 | struct brcms_info *wl = hw->priv; |
432 | struct wiphy *wiphy = hw->wiphy; | 435 | struct bcma_device *core = wl->wlc->hw->d11core; |
433 | 436 | ||
434 | if (changed & BSS_CHANGED_ASSOC) { | 437 | if (changed & BSS_CHANGED_ASSOC) { |
435 | /* association status changed (associated/disassociated) | 438 | /* association status changed (associated/disassociated) |
436 | * also implies a change in the AID. | 439 | * also implies a change in the AID. |
437 | */ | 440 | */ |
438 | wiphy_err(wiphy, "%s: %s: %sassociated\n", KBUILD_MODNAME, | 441 | brcms_err(core, "%s: %s: %sassociated\n", KBUILD_MODNAME, |
439 | __func__, info->assoc ? "" : "dis"); | 442 | __func__, info->assoc ? "" : "dis"); |
440 | spin_lock_bh(&wl->lock); | 443 | spin_lock_bh(&wl->lock); |
441 | brcms_c_associate_upd(wl->wlc, info->assoc); | 444 | brcms_c_associate_upd(wl->wlc, info->assoc); |
@@ -495,7 +498,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw, | |||
495 | error = brcms_c_set_rateset(wl->wlc, &rs); | 498 | error = brcms_c_set_rateset(wl->wlc, &rs); |
496 | spin_unlock_bh(&wl->lock); | 499 | spin_unlock_bh(&wl->lock); |
497 | if (error) | 500 | if (error) |
498 | wiphy_err(wiphy, "changing basic rates failed: %d\n", | 501 | brcms_err(core, "changing basic rates failed: %d\n", |
499 | error); | 502 | error); |
500 | } | 503 | } |
501 | if (changed & BSS_CHANGED_BEACON_INT) { | 504 | if (changed & BSS_CHANGED_BEACON_INT) { |
@@ -512,30 +515,30 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw, | |||
512 | } | 515 | } |
513 | if (changed & BSS_CHANGED_BEACON) | 516 | if (changed & BSS_CHANGED_BEACON) |
514 | /* Beacon data changed, retrieve new beacon (beaconing modes) */ | 517 | /* Beacon data changed, retrieve new beacon (beaconing modes) */ |
515 | wiphy_err(wiphy, "%s: beacon changed\n", __func__); | 518 | brcms_err(core, "%s: beacon changed\n", __func__); |
516 | 519 | ||
517 | if (changed & BSS_CHANGED_BEACON_ENABLED) { | 520 | if (changed & BSS_CHANGED_BEACON_ENABLED) { |
518 | /* Beaconing should be enabled/disabled (beaconing modes) */ | 521 | /* Beaconing should be enabled/disabled (beaconing modes) */ |
519 | wiphy_err(wiphy, "%s: Beacon enabled: %s\n", __func__, | 522 | brcms_err(core, "%s: Beacon enabled: %s\n", __func__, |
520 | info->enable_beacon ? "true" : "false"); | 523 | info->enable_beacon ? "true" : "false"); |
521 | } | 524 | } |
522 | 525 | ||
523 | if (changed & BSS_CHANGED_CQM) { | 526 | if (changed & BSS_CHANGED_CQM) { |
524 | /* Connection quality monitor config changed */ | 527 | /* Connection quality monitor config changed */ |
525 | wiphy_err(wiphy, "%s: cqm change: threshold %d, hys %d " | 528 | brcms_err(core, "%s: cqm change: threshold %d, hys %d " |
526 | " (implement)\n", __func__, info->cqm_rssi_thold, | 529 | " (implement)\n", __func__, info->cqm_rssi_thold, |
527 | info->cqm_rssi_hyst); | 530 | info->cqm_rssi_hyst); |
528 | } | 531 | } |
529 | 532 | ||
530 | if (changed & BSS_CHANGED_IBSS) { | 533 | if (changed & BSS_CHANGED_IBSS) { |
531 | /* IBSS join status changed */ | 534 | /* IBSS join status changed */ |
532 | wiphy_err(wiphy, "%s: IBSS joined: %s (implement)\n", __func__, | 535 | brcms_err(core, "%s: IBSS joined: %s (implement)\n", |
533 | info->ibss_joined ? "true" : "false"); | 536 | __func__, info->ibss_joined ? "true" : "false"); |
534 | } | 537 | } |
535 | 538 | ||
536 | if (changed & BSS_CHANGED_ARP_FILTER) { | 539 | if (changed & BSS_CHANGED_ARP_FILTER) { |
537 | /* Hardware ARP filter address list or state changed */ | 540 | /* Hardware ARP filter address list or state changed */ |
538 | wiphy_err(wiphy, "%s: arp filtering: enabled %s, count %d" | 541 | brcms_err(core, "%s: arp filtering: enabled %s, count %d" |
539 | " (implement)\n", __func__, info->arp_filter_enabled ? | 542 | " (implement)\n", __func__, info->arp_filter_enabled ? |
540 | "true" : "false", info->arp_addr_cnt); | 543 | "true" : "false", info->arp_addr_cnt); |
541 | } | 544 | } |
@@ -545,8 +548,8 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw, | |||
545 | * QoS for this association was enabled/disabled. | 548 | * QoS for this association was enabled/disabled. |
546 | * Note that it is only ever disabled for station mode. | 549 | * Note that it is only ever disabled for station mode. |
547 | */ | 550 | */ |
548 | wiphy_err(wiphy, "%s: qos enabled: %s (implement)\n", __func__, | 551 | brcms_err(core, "%s: qos enabled: %s (implement)\n", |
549 | info->qos ? "true" : "false"); | 552 | __func__, info->qos ? "true" : "false"); |
550 | } | 553 | } |
551 | return; | 554 | return; |
552 | } | 555 | } |
@@ -557,25 +560,25 @@ brcms_ops_configure_filter(struct ieee80211_hw *hw, | |||
557 | unsigned int *total_flags, u64 multicast) | 560 | unsigned int *total_flags, u64 multicast) |
558 | { | 561 | { |
559 | struct brcms_info *wl = hw->priv; | 562 | struct brcms_info *wl = hw->priv; |
560 | struct wiphy *wiphy = hw->wiphy; | 563 | struct bcma_device *core = wl->wlc->hw->d11core; |
561 | 564 | ||
562 | changed_flags &= MAC_FILTERS; | 565 | changed_flags &= MAC_FILTERS; |
563 | *total_flags &= MAC_FILTERS; | 566 | *total_flags &= MAC_FILTERS; |
564 | 567 | ||
565 | if (changed_flags & FIF_PROMISC_IN_BSS) | 568 | if (changed_flags & FIF_PROMISC_IN_BSS) |
566 | wiphy_dbg(wiphy, "FIF_PROMISC_IN_BSS\n"); | 569 | brcms_dbg_info(core, "FIF_PROMISC_IN_BSS\n"); |
567 | if (changed_flags & FIF_ALLMULTI) | 570 | if (changed_flags & FIF_ALLMULTI) |
568 | wiphy_dbg(wiphy, "FIF_ALLMULTI\n"); | 571 | brcms_dbg_info(core, "FIF_ALLMULTI\n"); |
569 | if (changed_flags & FIF_FCSFAIL) | 572 | if (changed_flags & FIF_FCSFAIL) |
570 | wiphy_dbg(wiphy, "FIF_FCSFAIL\n"); | 573 | brcms_dbg_info(core, 0, "FIF_FCSFAIL\n"); |
571 | if (changed_flags & FIF_CONTROL) | 574 | if (changed_flags & FIF_CONTROL) |
572 | wiphy_dbg(wiphy, "FIF_CONTROL\n"); | 575 | brcms_dbg_info(core, "FIF_CONTROL\n"); |
573 | if (changed_flags & FIF_OTHER_BSS) | 576 | if (changed_flags & FIF_OTHER_BSS) |
574 | wiphy_dbg(wiphy, "FIF_OTHER_BSS\n"); | 577 | brcms_dbg_info(core, "FIF_OTHER_BSS\n"); |
575 | if (changed_flags & FIF_PSPOLL) | 578 | if (changed_flags & FIF_PSPOLL) |
576 | wiphy_dbg(wiphy, "FIF_PSPOLL\n"); | 579 | brcms_dbg_info(core, "FIF_PSPOLL\n"); |
577 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) | 580 | if (changed_flags & FIF_BCN_PRBRESP_PROMISC) |
578 | wiphy_dbg(wiphy, "FIF_BCN_PRBRESP_PROMISC\n"); | 581 | brcms_dbg_info(core, "FIF_BCN_PRBRESP_PROMISC\n"); |
579 | 582 | ||
580 | spin_lock_bh(&wl->lock); | 583 | spin_lock_bh(&wl->lock); |
581 | brcms_c_mac_promisc(wl->wlc, *total_flags); | 584 | brcms_c_mac_promisc(wl->wlc, *total_flags); |
@@ -657,8 +660,8 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw, | |||
657 | status = brcms_c_aggregatable(wl->wlc, tid); | 660 | status = brcms_c_aggregatable(wl->wlc, tid); |
658 | spin_unlock_bh(&wl->lock); | 661 | spin_unlock_bh(&wl->lock); |
659 | if (!status) { | 662 | if (!status) { |
660 | wiphy_err(wl->wiphy, "START: tid %d is not agg\'able\n", | 663 | brcms_err(wl->wlc->hw->d11core, |
661 | tid); | 664 | "START: tid %d is not agg\'able\n", tid); |
662 | return -EINVAL; | 665 | return -EINVAL; |
663 | } | 666 | } |
664 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); | 667 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
@@ -685,8 +688,8 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw, | |||
685 | /* Power save wakeup */ | 688 | /* Power save wakeup */ |
686 | break; | 689 | break; |
687 | default: | 690 | default: |
688 | wiphy_err(wl->wiphy, "%s: Invalid command, ignoring\n", | 691 | brcms_err(wl->wlc->hw->d11core, |
689 | __func__); | 692 | "%s: Invalid command, ignoring\n", __func__); |
690 | } | 693 | } |
691 | 694 | ||
692 | return 0; | 695 | return 0; |
@@ -1148,14 +1151,13 @@ static int brcms_suspend(struct bcma_device *pdev) | |||
1148 | wl->pub->hw_up = false; | 1151 | wl->pub->hw_up = false; |
1149 | spin_unlock_bh(&wl->lock); | 1152 | spin_unlock_bh(&wl->lock); |
1150 | 1153 | ||
1151 | pr_debug("brcms_suspend ok\n"); | 1154 | brcms_dbg_info(wl->wlc->hw->d11core, "brcms_suspend ok\n"); |
1152 | 1155 | ||
1153 | return 0; | 1156 | return 0; |
1154 | } | 1157 | } |
1155 | 1158 | ||
1156 | static int brcms_resume(struct bcma_device *pdev) | 1159 | static int brcms_resume(struct bcma_device *pdev) |
1157 | { | 1160 | { |
1158 | pr_debug("brcms_resume ok\n"); | ||
1159 | return 0; | 1161 | return 0; |
1160 | } | 1162 | } |
1161 | 1163 | ||
@@ -1216,7 +1218,7 @@ module_exit(brcms_module_exit); | |||
1216 | void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif, | 1218 | void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif, |
1217 | bool state, int prio) | 1219 | bool state, int prio) |
1218 | { | 1220 | { |
1219 | wiphy_err(wl->wiphy, "Shouldn't be here %s\n", __func__); | 1221 | brcms_err(wl->wlc->hw->d11core, "Shouldn't be here %s\n", __func__); |
1220 | } | 1222 | } |
1221 | 1223 | ||
1222 | /* | 1224 | /* |
@@ -1224,7 +1226,8 @@ void brcms_txflowcontrol(struct brcms_info *wl, struct brcms_if *wlif, | |||
1224 | */ | 1226 | */ |
1225 | void brcms_init(struct brcms_info *wl) | 1227 | void brcms_init(struct brcms_info *wl) |
1226 | { | 1228 | { |
1227 | BCMMSG(wl->pub->ieee_hw->wiphy, "wl%d\n", wl->pub->unit); | 1229 | brcms_dbg_info(wl->wlc->hw->d11core, "Initializing wl%d\n", |
1230 | wl->pub->unit); | ||
1228 | brcms_reset(wl); | 1231 | brcms_reset(wl); |
1229 | brcms_c_init(wl->wlc, wl->mute_tx); | 1232 | brcms_c_init(wl->wlc, wl->mute_tx); |
1230 | } | 1233 | } |
@@ -1234,7 +1237,7 @@ void brcms_init(struct brcms_info *wl) | |||
1234 | */ | 1237 | */ |
1235 | uint brcms_reset(struct brcms_info *wl) | 1238 | uint brcms_reset(struct brcms_info *wl) |
1236 | { | 1239 | { |
1237 | BCMMSG(wl->pub->ieee_hw->wiphy, "wl%d\n", wl->pub->unit); | 1240 | brcms_dbg_info(wl->wlc->hw->d11core, "Resetting wl%d\n", wl->pub->unit); |
1238 | brcms_c_reset(wl->wlc); | 1241 | brcms_c_reset(wl->wlc); |
1239 | 1242 | ||
1240 | /* dpc will not be rescheduled */ | 1243 | /* dpc will not be rescheduled */ |
@@ -1248,7 +1251,7 @@ uint brcms_reset(struct brcms_info *wl) | |||
1248 | 1251 | ||
1249 | void brcms_fatal_error(struct brcms_info *wl) | 1252 | void brcms_fatal_error(struct brcms_info *wl) |
1250 | { | 1253 | { |
1251 | wiphy_err(wl->wlc->wiphy, "wl%d: fatal error, reinitializing\n", | 1254 | brcms_err(wl->wlc->hw->d11core, "wl%d: fatal error, reinitializing\n", |
1252 | wl->wlc->pub->unit); | 1255 | wl->wlc->pub->unit); |
1253 | brcms_reset(wl); | 1256 | brcms_reset(wl); |
1254 | ieee80211_restart_hw(wl->pub->ieee_hw); | 1257 | ieee80211_restart_hw(wl->pub->ieee_hw); |
@@ -1396,8 +1399,9 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic) | |||
1396 | 1399 | ||
1397 | #ifdef DEBUG | 1400 | #ifdef DEBUG |
1398 | if (t->set) | 1401 | if (t->set) |
1399 | wiphy_err(hw->wiphy, "%s: Already set. Name: %s, per %d\n", | 1402 | brcms_dbg_info(t->wl->wlc->hw->d11core, |
1400 | __func__, t->name, periodic); | 1403 | "%s: Already set. Name: %s, per %d\n", |
1404 | __func__, t->name, periodic); | ||
1401 | #endif | 1405 | #endif |
1402 | t->ms = ms; | 1406 | t->ms = ms; |
1403 | t->periodic = (bool) periodic; | 1407 | t->periodic = (bool) periodic; |
@@ -1486,8 +1490,8 @@ int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, u32 idx) | |||
1486 | } | 1490 | } |
1487 | } | 1491 | } |
1488 | } | 1492 | } |
1489 | wiphy_err(wl->wiphy, "ERROR: ucode buf tag:%d can not be found!\n", | 1493 | brcms_err(wl->wlc->hw->d11core, |
1490 | idx); | 1494 | "ERROR: ucode buf tag:%d can not be found!\n", idx); |
1491 | *pbuf = NULL; | 1495 | *pbuf = NULL; |
1492 | fail: | 1496 | fail: |
1493 | return -ENODATA; | 1497 | return -ENODATA; |
@@ -1510,7 +1514,7 @@ int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes, u32 idx) | |||
1510 | pdata = wl->fw.fw_bin[i]->data + | 1514 | pdata = wl->fw.fw_bin[i]->data + |
1511 | le32_to_cpu(hdr->offset); | 1515 | le32_to_cpu(hdr->offset); |
1512 | if (le32_to_cpu(hdr->len) != 4) { | 1516 | if (le32_to_cpu(hdr->len) != 4) { |
1513 | wiphy_err(wl->wiphy, | 1517 | brcms_err(wl->wlc->hw->d11core, |
1514 | "ERROR: fw hdr len\n"); | 1518 | "ERROR: fw hdr len\n"); |
1515 | return -ENOMSG; | 1519 | return -ENOMSG; |
1516 | } | 1520 | } |
@@ -1519,7 +1523,8 @@ int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes, u32 idx) | |||
1519 | } | 1523 | } |
1520 | } | 1524 | } |
1521 | } | 1525 | } |
1522 | wiphy_err(wl->wiphy, "ERROR: ucode tag:%d can not be found!\n", idx); | 1526 | brcms_err(wl->wlc->hw->d11core, |
1527 | "ERROR: ucode tag:%d can not be found!\n", idx); | ||
1523 | return -ENOMSG; | 1528 | return -ENOMSG; |
1524 | } | 1529 | } |
1525 | 1530 | ||
@@ -1560,8 +1565,8 @@ int brcms_check_firmwares(struct brcms_info *wl) | |||
1560 | sizeof(struct firmware_hdr)); | 1565 | sizeof(struct firmware_hdr)); |
1561 | rc = -EBADF; | 1566 | rc = -EBADF; |
1562 | } else if (fw->size < MIN_FW_SIZE || fw->size > MAX_FW_SIZE) { | 1567 | } else if (fw->size < MIN_FW_SIZE || fw->size > MAX_FW_SIZE) { |
1563 | wiphy_err(wl->wiphy, "%s: out of bounds fw file size " | 1568 | wiphy_err(wl->wiphy, "%s: out of bounds fw file size %zu\n", |
1564 | "%zu\n", __func__, fw->size); | 1569 | __func__, fw->size); |
1565 | rc = -EBADF; | 1570 | rc = -EBADF; |
1566 | } else { | 1571 | } else { |
1567 | /* check if ucode section overruns firmware image */ | 1572 | /* check if ucode section overruns firmware image */ |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 1e59ce3c150a..c7e7380a2e43 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "main.h" | 35 | #include "main.h" |
36 | #include "soc.h" | 36 | #include "soc.h" |
37 | #include "dma.h" | 37 | #include "dma.h" |
38 | #include "debug.h" | ||
38 | 39 | ||
39 | /* watchdog timer, in unit of ms */ | 40 | /* watchdog timer, in unit of ms */ |
40 | #define TIMER_INTERVAL_WATCHDOG 1000 | 41 | #define TIMER_INTERVAL_WATCHDOG 1000 |
@@ -640,7 +641,7 @@ static uint brcms_c_calc_frame_time(struct brcms_c_info *wlc, u32 ratespec, | |||
640 | uint rate = rspec2rate(ratespec); | 641 | uint rate = rspec2rate(ratespec); |
641 | 642 | ||
642 | if (rate == 0) { | 643 | if (rate == 0) { |
643 | wiphy_err(wlc->wiphy, "wl%d: WAR: using rate of 1 mbps\n", | 644 | brcms_err(wlc->hw->d11core, "wl%d: WAR: using rate of 1 mbps\n", |
644 | wlc->pub->unit); | 645 | wlc->pub->unit); |
645 | rate = BRCM_RATE_1M; | 646 | rate = BRCM_RATE_1M; |
646 | } | 647 | } |
@@ -710,7 +711,7 @@ static void brcms_c_write_inits(struct brcms_hardware *wlc_hw, | |||
710 | u16 size; | 711 | u16 size; |
711 | u32 value; | 712 | u32 value; |
712 | 713 | ||
713 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 714 | brcms_dbg_info(wlc_hw->d11core, "wl%d\n", wlc_hw->unit); |
714 | 715 | ||
715 | for (i = 0; inits[i].addr != cpu_to_le16(0xffff); i++) { | 716 | for (i = 0; inits[i].addr != cpu_to_le16(0xffff); i++) { |
716 | size = le16_to_cpu(inits[i].size); | 717 | size = le16_to_cpu(inits[i].size); |
@@ -739,7 +740,6 @@ static void brcms_c_write_mhf(struct brcms_hardware *wlc_hw, u16 *mhfs) | |||
739 | 740 | ||
740 | static void brcms_c_ucode_bsinit(struct brcms_hardware *wlc_hw) | 741 | static void brcms_c_ucode_bsinit(struct brcms_hardware *wlc_hw) |
741 | { | 742 | { |
742 | struct wiphy *wiphy = wlc_hw->wlc->wiphy; | ||
743 | struct brcms_ucode *ucode = &wlc_hw->wlc->wl->ucode; | 743 | struct brcms_ucode *ucode = &wlc_hw->wlc->wl->ucode; |
744 | 744 | ||
745 | /* init microcode host flags */ | 745 | /* init microcode host flags */ |
@@ -750,8 +750,9 @@ static void brcms_c_ucode_bsinit(struct brcms_hardware *wlc_hw) | |||
750 | if (BRCMS_ISNPHY(wlc_hw->band)) | 750 | if (BRCMS_ISNPHY(wlc_hw->band)) |
751 | brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16); | 751 | brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16); |
752 | else | 752 | else |
753 | wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev" | 753 | brcms_err(wlc_hw->d11core, |
754 | " %d\n", __func__, wlc_hw->unit, | 754 | "%s: wl%d: unsupported phy in corerev %d\n", |
755 | __func__, wlc_hw->unit, | ||
755 | wlc_hw->corerev); | 756 | wlc_hw->corerev); |
756 | } else { | 757 | } else { |
757 | if (D11REV_IS(wlc_hw->corerev, 24)) { | 758 | if (D11REV_IS(wlc_hw->corerev, 24)) { |
@@ -759,12 +760,14 @@ static void brcms_c_ucode_bsinit(struct brcms_hardware *wlc_hw) | |||
759 | brcms_c_write_inits(wlc_hw, | 760 | brcms_c_write_inits(wlc_hw, |
760 | ucode->d11lcn0bsinitvals24); | 761 | ucode->d11lcn0bsinitvals24); |
761 | else | 762 | else |
762 | wiphy_err(wiphy, "%s: wl%d: unsupported phy in" | 763 | brcms_err(wlc_hw->d11core, |
763 | " core rev %d\n", __func__, | 764 | "%s: wl%d: unsupported phy in core rev %d\n", |
764 | wlc_hw->unit, wlc_hw->corerev); | 765 | __func__, wlc_hw->unit, |
766 | wlc_hw->corerev); | ||
765 | } else { | 767 | } else { |
766 | wiphy_err(wiphy, "%s: wl%d: unsupported corerev %d\n", | 768 | brcms_err(wlc_hw->d11core, |
767 | __func__, wlc_hw->unit, wlc_hw->corerev); | 769 | "%s: wl%d: unsupported corerev %d\n", |
770 | __func__, wlc_hw->unit, wlc_hw->corerev); | ||
768 | } | 771 | } |
769 | } | 772 | } |
770 | } | 773 | } |
@@ -779,7 +782,7 @@ static void brcms_b_core_ioctl(struct brcms_hardware *wlc_hw, u32 m, u32 v) | |||
779 | 782 | ||
780 | static void brcms_b_core_phy_clk(struct brcms_hardware *wlc_hw, bool clk) | 783 | static void brcms_b_core_phy_clk(struct brcms_hardware *wlc_hw, bool clk) |
781 | { | 784 | { |
782 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d: clk %d\n", wlc_hw->unit, clk); | 785 | brcms_dbg_info(wlc_hw->d11core, "wl%d: clk %d\n", wlc_hw->unit, clk); |
783 | 786 | ||
784 | wlc_hw->phyclk = clk; | 787 | wlc_hw->phyclk = clk; |
785 | 788 | ||
@@ -898,7 +901,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
898 | 901 | ||
899 | if (txs->phyerr) { | 902 | if (txs->phyerr) { |
900 | if (brcm_msg_level & BRCM_DL_INFO) { | 903 | if (brcm_msg_level & BRCM_DL_INFO) { |
901 | wiphy_err(wlc->wiphy, "phyerr 0x%x, rate 0x%x\n", | 904 | brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n", |
902 | txs->phyerr, txh->MainRates); | 905 | txs->phyerr, txh->MainRates); |
903 | brcms_c_print_txdesc(txh); | 906 | brcms_c_print_txdesc(txh); |
904 | } | 907 | } |
@@ -934,7 +937,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
934 | lastframe = !ieee80211_has_morefrags(h->frame_control); | 937 | lastframe = !ieee80211_has_morefrags(h->frame_control); |
935 | 938 | ||
936 | if (!lastframe) { | 939 | if (!lastframe) { |
937 | wiphy_err(wlc->wiphy, "Not last frame!\n"); | 940 | brcms_err(wlc->hw->d11core, "Not last frame!\n"); |
938 | } else { | 941 | } else { |
939 | /* | 942 | /* |
940 | * Set information to be consumed by Minstrel ht. | 943 | * Set information to be consumed by Minstrel ht. |
@@ -1006,8 +1009,9 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
1006 | skb_pull(p, D11_TXH_LEN); | 1009 | skb_pull(p, D11_TXH_LEN); |
1007 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, p); | 1010 | ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, p); |
1008 | } else { | 1011 | } else { |
1009 | wiphy_err(wlc->wiphy, "%s: Not last frame => not calling " | 1012 | brcms_err(wlc->hw->d11core, |
1010 | "tx_status\n", __func__); | 1013 | "%s: Not last frame => not calling tx_status\n", |
1014 | __func__); | ||
1011 | } | 1015 | } |
1012 | 1016 | ||
1013 | fatal = false; | 1017 | fatal = false; |
@@ -1055,8 +1059,8 @@ brcms_b_txstatus(struct brcms_hardware *wlc_hw, bool bound, bool *fatal) | |||
1055 | && (s1 & TXS_V)) { | 1059 | && (s1 & TXS_V)) { |
1056 | 1060 | ||
1057 | if (s1 == 0xffffffff) { | 1061 | if (s1 == 0xffffffff) { |
1058 | wiphy_err(wlc->wiphy, "wl%d: %s: dead chip\n", | 1062 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
1059 | wlc_hw->unit, __func__); | 1063 | __func__); |
1060 | return morepending; | 1064 | return morepending; |
1061 | } | 1065 | } |
1062 | s2 = bcma_read32(core, D11REGOFFS(frmtxstatus2)); | 1066 | s2 = bcma_read32(core, D11REGOFFS(frmtxstatus2)); |
@@ -1132,7 +1136,6 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme) | |||
1132 | u16 pio_mhf2 = 0; | 1136 | u16 pio_mhf2 = 0; |
1133 | struct brcms_hardware *wlc_hw = wlc->hw; | 1137 | struct brcms_hardware *wlc_hw = wlc->hw; |
1134 | uint unit = wlc_hw->unit; | 1138 | uint unit = wlc_hw->unit; |
1135 | struct wiphy *wiphy = wlc->wiphy; | ||
1136 | 1139 | ||
1137 | /* name and offsets for dma_attach */ | 1140 | /* name and offsets for dma_attach */ |
1138 | snprintf(name, sizeof(name), "wl%d", unit); | 1141 | snprintf(name, sizeof(name), "wl%d", unit); |
@@ -1188,8 +1191,9 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme) | |||
1188 | /* Cleaner to leave this as if with AP defined */ | 1191 | /* Cleaner to leave this as if with AP defined */ |
1189 | 1192 | ||
1190 | if (dma_attach_err) { | 1193 | if (dma_attach_err) { |
1191 | wiphy_err(wiphy, "wl%d: wlc_attach: dma_attach failed" | 1194 | brcms_err(wlc_hw->d11core, |
1192 | "\n", unit); | 1195 | "wl%d: wlc_attach: dma_attach failed\n", |
1196 | unit); | ||
1193 | return false; | 1197 | return false; |
1194 | } | 1198 | } |
1195 | 1199 | ||
@@ -1547,7 +1551,7 @@ brcms_b_write_template_ram(struct brcms_hardware *wlc_hw, int offset, int len, | |||
1547 | __le32 word_le; | 1551 | __le32 word_le; |
1548 | __be32 word_be; | 1552 | __be32 word_be; |
1549 | bool be_bit; | 1553 | bool be_bit; |
1550 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 1554 | brcms_dbg_info(core, "wl%d\n", wlc_hw->unit); |
1551 | 1555 | ||
1552 | bcma_write32(core, D11REGOFFS(tplatewrptr), offset); | 1556 | bcma_write32(core, D11REGOFFS(tplatewrptr), offset); |
1553 | 1557 | ||
@@ -1756,8 +1760,6 @@ static void brcms_b_bsinit(struct brcms_c_info *wlc, u16 chanspec) | |||
1756 | /* Perform a soft reset of the PHY PLL */ | 1760 | /* Perform a soft reset of the PHY PLL */ |
1757 | void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw) | 1761 | void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw) |
1758 | { | 1762 | { |
1759 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
1760 | |||
1761 | ai_cc_reg(wlc_hw->sih, offsetof(struct chipcregs, chipcontrol_addr), | 1763 | ai_cc_reg(wlc_hw->sih, offsetof(struct chipcregs, chipcontrol_addr), |
1762 | ~0, 0); | 1764 | ~0, 0); |
1763 | udelay(1); | 1765 | udelay(1); |
@@ -1802,7 +1804,7 @@ void brcms_b_phy_reset(struct brcms_hardware *wlc_hw) | |||
1802 | u32 phy_bw_clkbits; | 1804 | u32 phy_bw_clkbits; |
1803 | bool phy_in_reset = false; | 1805 | bool phy_in_reset = false; |
1804 | 1806 | ||
1805 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 1807 | brcms_dbg_info(wlc_hw->d11core, "wl%d: reset phy\n", wlc_hw->unit); |
1806 | 1808 | ||
1807 | if (pih == NULL) | 1809 | if (pih == NULL) |
1808 | return; | 1810 | return; |
@@ -1936,7 +1938,7 @@ static void brcms_c_get_macaddr(struct brcms_hardware *wlc_hw, u8 etheraddr[ETH_ | |||
1936 | /* power both the pll and external oscillator on/off */ | 1938 | /* power both the pll and external oscillator on/off */ |
1937 | static void brcms_b_xtal(struct brcms_hardware *wlc_hw, bool want) | 1939 | static void brcms_b_xtal(struct brcms_hardware *wlc_hw, bool want) |
1938 | { | 1940 | { |
1939 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d: want %d\n", wlc_hw->unit, want); | 1941 | brcms_dbg_info(wlc_hw->d11core, "wl%d: want %d\n", wlc_hw->unit, want); |
1940 | 1942 | ||
1941 | /* | 1943 | /* |
1942 | * dont power down if plldown is false or | 1944 | * dont power down if plldown is false or |
@@ -2025,7 +2027,7 @@ void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags) | |||
2025 | if (flags == BRCMS_USE_COREFLAGS) | 2027 | if (flags == BRCMS_USE_COREFLAGS) |
2026 | flags = (wlc_hw->band->pi ? wlc_hw->band->core_flags : 0); | 2028 | flags = (wlc_hw->band->pi ? wlc_hw->band->core_flags : 0); |
2027 | 2029 | ||
2028 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 2030 | brcms_dbg_info(wlc_hw->d11core, "wl%d: core reset\n", wlc_hw->unit); |
2029 | 2031 | ||
2030 | /* request FAST clock if not on */ | 2032 | /* request FAST clock if not on */ |
2031 | fastclk = wlc_hw->forcefastclk; | 2033 | fastclk = wlc_hw->forcefastclk; |
@@ -2036,13 +2038,13 @@ void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags) | |||
2036 | if (bcma_core_is_enabled(wlc_hw->d11core)) { | 2038 | if (bcma_core_is_enabled(wlc_hw->d11core)) { |
2037 | for (i = 0; i < NFIFO; i++) | 2039 | for (i = 0; i < NFIFO; i++) |
2038 | if ((wlc_hw->di[i]) && (!dma_txreset(wlc_hw->di[i]))) | 2040 | if ((wlc_hw->di[i]) && (!dma_txreset(wlc_hw->di[i]))) |
2039 | wiphy_err(wlc_hw->wlc->wiphy, "wl%d: %s: " | 2041 | brcms_err(wlc_hw->d11core, "wl%d: %s: " |
2040 | "dma_txreset[%d]: cannot stop dma\n", | 2042 | "dma_txreset[%d]: cannot stop dma\n", |
2041 | wlc_hw->unit, __func__, i); | 2043 | wlc_hw->unit, __func__, i); |
2042 | 2044 | ||
2043 | if ((wlc_hw->di[RX_FIFO]) | 2045 | if ((wlc_hw->di[RX_FIFO]) |
2044 | && (!wlc_dma_rxreset(wlc_hw, RX_FIFO))) | 2046 | && (!wlc_dma_rxreset(wlc_hw, RX_FIFO))) |
2045 | wiphy_err(wlc_hw->wlc->wiphy, "wl%d: %s: dma_rxreset" | 2047 | brcms_err(wlc_hw->d11core, "wl%d: %s: dma_rxreset" |
2046 | "[%d]: cannot stop dma\n", | 2048 | "[%d]: cannot stop dma\n", |
2047 | wlc_hw->unit, __func__, RX_FIFO); | 2049 | wlc_hw->unit, __func__, RX_FIFO); |
2048 | } | 2050 | } |
@@ -2255,7 +2257,7 @@ static void brcms_ucode_write(struct brcms_hardware *wlc_hw, | |||
2255 | uint i; | 2257 | uint i; |
2256 | uint count; | 2258 | uint count; |
2257 | 2259 | ||
2258 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 2260 | brcms_dbg_info(wlc_hw->d11core, "wl%d\n", wlc_hw->unit); |
2259 | 2261 | ||
2260 | count = (nbytes / sizeof(u32)); | 2262 | count = (nbytes / sizeof(u32)); |
2261 | 2263 | ||
@@ -2283,8 +2285,8 @@ static void brcms_ucode_download(struct brcms_hardware *wlc_hw) | |||
2283 | ucode->bcm43xx_16_mimosz); | 2285 | ucode->bcm43xx_16_mimosz); |
2284 | wlc_hw->ucode_loaded = true; | 2286 | wlc_hw->ucode_loaded = true; |
2285 | } else | 2287 | } else |
2286 | wiphy_err(wlc->wiphy, "%s: wl%d: unsupported phy in " | 2288 | brcms_err(wlc_hw->d11core, |
2287 | "corerev %d\n", | 2289 | "%s: wl%d: unsupported phy in corerev %d\n", |
2288 | __func__, wlc_hw->unit, wlc_hw->corerev); | 2290 | __func__, wlc_hw->unit, wlc_hw->corerev); |
2289 | } else if (D11REV_IS(wlc_hw->corerev, 24)) { | 2291 | } else if (D11REV_IS(wlc_hw->corerev, 24)) { |
2290 | if (BRCMS_ISLCNPHY(wlc_hw->band)) { | 2292 | if (BRCMS_ISLCNPHY(wlc_hw->band)) { |
@@ -2292,8 +2294,8 @@ static void brcms_ucode_download(struct brcms_hardware *wlc_hw) | |||
2292 | ucode->bcm43xx_24_lcnsz); | 2294 | ucode->bcm43xx_24_lcnsz); |
2293 | wlc_hw->ucode_loaded = true; | 2295 | wlc_hw->ucode_loaded = true; |
2294 | } else { | 2296 | } else { |
2295 | wiphy_err(wlc->wiphy, "%s: wl%d: unsupported phy in " | 2297 | brcms_err(wlc_hw->d11core, |
2296 | "corerev %d\n", | 2298 | "%s: wl%d: unsupported phy in corerev %d\n", |
2297 | __func__, wlc_hw->unit, wlc_hw->corerev); | 2299 | __func__, wlc_hw->unit, wlc_hw->corerev); |
2298 | } | 2300 | } |
2299 | } | 2301 | } |
@@ -2330,7 +2332,6 @@ static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw) | |||
2330 | uint unit; | 2332 | uint unit; |
2331 | uint intstatus, idx; | 2333 | uint intstatus, idx; |
2332 | struct bcma_device *core = wlc_hw->d11core; | 2334 | struct bcma_device *core = wlc_hw->d11core; |
2333 | struct wiphy *wiphy = wlc_hw->wlc->wiphy; | ||
2334 | 2335 | ||
2335 | unit = wlc_hw->unit; | 2336 | unit = wlc_hw->unit; |
2336 | 2337 | ||
@@ -2347,35 +2348,35 @@ static void brcms_b_fifoerrors(struct brcms_hardware *wlc_hw) | |||
2347 | unit, idx, intstatus); | 2348 | unit, idx, intstatus); |
2348 | 2349 | ||
2349 | if (intstatus & I_RO) { | 2350 | if (intstatus & I_RO) { |
2350 | wiphy_err(wiphy, "wl%d: fifo %d: receive fifo " | 2351 | brcms_err(core, "wl%d: fifo %d: receive fifo " |
2351 | "overflow\n", unit, idx); | 2352 | "overflow\n", unit, idx); |
2352 | fatal = true; | 2353 | fatal = true; |
2353 | } | 2354 | } |
2354 | 2355 | ||
2355 | if (intstatus & I_PC) { | 2356 | if (intstatus & I_PC) { |
2356 | wiphy_err(wiphy, "wl%d: fifo %d: descriptor error\n", | 2357 | brcms_err(core, "wl%d: fifo %d: descriptor error\n", |
2357 | unit, idx); | 2358 | unit, idx); |
2358 | fatal = true; | 2359 | fatal = true; |
2359 | } | 2360 | } |
2360 | 2361 | ||
2361 | if (intstatus & I_PD) { | 2362 | if (intstatus & I_PD) { |
2362 | wiphy_err(wiphy, "wl%d: fifo %d: data error\n", unit, | 2363 | brcms_err(core, "wl%d: fifo %d: data error\n", unit, |
2363 | idx); | 2364 | idx); |
2364 | fatal = true; | 2365 | fatal = true; |
2365 | } | 2366 | } |
2366 | 2367 | ||
2367 | if (intstatus & I_DE) { | 2368 | if (intstatus & I_DE) { |
2368 | wiphy_err(wiphy, "wl%d: fifo %d: descriptor protocol " | 2369 | brcms_err(core, "wl%d: fifo %d: descriptor protocol " |
2369 | "error\n", unit, idx); | 2370 | "error\n", unit, idx); |
2370 | fatal = true; | 2371 | fatal = true; |
2371 | } | 2372 | } |
2372 | 2373 | ||
2373 | if (intstatus & I_RU) | 2374 | if (intstatus & I_RU) |
2374 | wiphy_err(wiphy, "wl%d: fifo %d: receive descriptor " | 2375 | brcms_err(core, "wl%d: fifo %d: receive descriptor " |
2375 | "underflow\n", idx, unit); | 2376 | "underflow\n", idx, unit); |
2376 | 2377 | ||
2377 | if (intstatus & I_XU) { | 2378 | if (intstatus & I_XU) { |
2378 | wiphy_err(wiphy, "wl%d: fifo %d: transmit fifo " | 2379 | brcms_err(core, "wl%d: fifo %d: transmit fifo " |
2379 | "underflow\n", idx, unit); | 2380 | "underflow\n", idx, unit); |
2380 | fatal = true; | 2381 | fatal = true; |
2381 | } | 2382 | } |
@@ -2625,8 +2626,8 @@ bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc) | |||
2625 | macintstatus = wlc_intstatus(wlc, true); | 2626 | macintstatus = wlc_intstatus(wlc, true); |
2626 | 2627 | ||
2627 | if (macintstatus == 0xffffffff) | 2628 | if (macintstatus == 0xffffffff) |
2628 | wiphy_err(wlc->wiphy, "DEVICEREMOVED detected in the ISR code" | 2629 | brcms_err(wlc_hw->d11core, |
2629 | " path\n"); | 2630 | "DEVICEREMOVED detected in the ISR code path\n"); |
2630 | 2631 | ||
2631 | /* it is not for us */ | 2632 | /* it is not for us */ |
2632 | if (macintstatus == 0) | 2633 | if (macintstatus == 0) |
@@ -2646,7 +2647,6 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2646 | struct brcms_hardware *wlc_hw = wlc->hw; | 2647 | struct brcms_hardware *wlc_hw = wlc->hw; |
2647 | struct bcma_device *core = wlc_hw->d11core; | 2648 | struct bcma_device *core = wlc_hw->d11core; |
2648 | u32 mc, mi; | 2649 | u32 mc, mi; |
2649 | struct wiphy *wiphy = wlc->wiphy; | ||
2650 | 2650 | ||
2651 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, | 2651 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit, |
2652 | wlc_hw->band->bandunit); | 2652 | wlc_hw->band->bandunit); |
@@ -2664,7 +2664,7 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2664 | mc = bcma_read32(core, D11REGOFFS(maccontrol)); | 2664 | mc = bcma_read32(core, D11REGOFFS(maccontrol)); |
2665 | 2665 | ||
2666 | if (mc == 0xffffffff) { | 2666 | if (mc == 0xffffffff) { |
2667 | wiphy_err(wiphy, "wl%d: %s: dead chip\n", wlc_hw->unit, | 2667 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
2668 | __func__); | 2668 | __func__); |
2669 | brcms_down(wlc->wl); | 2669 | brcms_down(wlc->wl); |
2670 | return; | 2670 | return; |
@@ -2675,7 +2675,7 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2675 | 2675 | ||
2676 | mi = bcma_read32(core, D11REGOFFS(macintstatus)); | 2676 | mi = bcma_read32(core, D11REGOFFS(macintstatus)); |
2677 | if (mi == 0xffffffff) { | 2677 | if (mi == 0xffffffff) { |
2678 | wiphy_err(wiphy, "wl%d: %s: dead chip\n", wlc_hw->unit, | 2678 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
2679 | __func__); | 2679 | __func__); |
2680 | brcms_down(wlc->wl); | 2680 | brcms_down(wlc->wl); |
2681 | return; | 2681 | return; |
@@ -2688,10 +2688,10 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2688 | BRCMS_MAX_MAC_SUSPEND); | 2688 | BRCMS_MAX_MAC_SUSPEND); |
2689 | 2689 | ||
2690 | if (!(bcma_read32(core, D11REGOFFS(macintstatus)) & MI_MACSSPNDD)) { | 2690 | if (!(bcma_read32(core, D11REGOFFS(macintstatus)) & MI_MACSSPNDD)) { |
2691 | wiphy_err(wiphy, "wl%d: wlc_suspend_mac_and_wait: waited %d uS" | 2691 | brcms_err(core, "wl%d: wlc_suspend_mac_and_wait: waited %d uS" |
2692 | " and MI_MACSSPNDD is still not on.\n", | 2692 | " and MI_MACSSPNDD is still not on.\n", |
2693 | wlc_hw->unit, BRCMS_MAX_MAC_SUSPEND); | 2693 | wlc_hw->unit, BRCMS_MAX_MAC_SUSPEND); |
2694 | wiphy_err(wiphy, "wl%d: psmdebug 0x%08x, phydebug 0x%08x, " | 2694 | brcms_err(core, "wl%d: psmdebug 0x%08x, phydebug 0x%08x, " |
2695 | "psm_brc 0x%04x\n", wlc_hw->unit, | 2695 | "psm_brc 0x%04x\n", wlc_hw->unit, |
2696 | bcma_read32(core, D11REGOFFS(psmdebug)), | 2696 | bcma_read32(core, D11REGOFFS(psmdebug)), |
2697 | bcma_read32(core, D11REGOFFS(phydebug)), | 2697 | bcma_read32(core, D11REGOFFS(phydebug)), |
@@ -2700,7 +2700,7 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc) | |||
2700 | 2700 | ||
2701 | mc = bcma_read32(core, D11REGOFFS(maccontrol)); | 2701 | mc = bcma_read32(core, D11REGOFFS(maccontrol)); |
2702 | if (mc == 0xffffffff) { | 2702 | if (mc == 0xffffffff) { |
2703 | wiphy_err(wiphy, "wl%d: %s: dead chip\n", wlc_hw->unit, | 2703 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
2704 | __func__); | 2704 | __func__); |
2705 | brcms_down(wlc->wl); | 2705 | brcms_down(wlc->wl); |
2706 | return; | 2706 | return; |
@@ -2760,8 +2760,6 @@ static bool brcms_b_validate_chip_access(struct brcms_hardware *wlc_hw) | |||
2760 | u32 w, val; | 2760 | u32 w, val; |
2761 | struct wiphy *wiphy = wlc_hw->wlc->wiphy; | 2761 | struct wiphy *wiphy = wlc_hw->wlc->wiphy; |
2762 | 2762 | ||
2763 | BCMMSG(wiphy, "wl%d\n", wlc_hw->unit); | ||
2764 | |||
2765 | /* Validate dchip register access */ | 2763 | /* Validate dchip register access */ |
2766 | 2764 | ||
2767 | bcma_write32(core, D11REGOFFS(objaddr), OBJADDR_SHM_SEL | 0); | 2765 | bcma_write32(core, D11REGOFFS(objaddr), OBJADDR_SHM_SEL | 0); |
@@ -2822,7 +2820,7 @@ void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on) | |||
2822 | struct bcma_device *core = wlc_hw->d11core; | 2820 | struct bcma_device *core = wlc_hw->d11core; |
2823 | u32 tmp; | 2821 | u32 tmp; |
2824 | 2822 | ||
2825 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 2823 | brcms_dbg_info(core, "wl%d\n", wlc_hw->unit); |
2826 | 2824 | ||
2827 | tmp = 0; | 2825 | tmp = 0; |
2828 | 2826 | ||
@@ -2838,8 +2836,8 @@ void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on) | |||
2838 | 2836 | ||
2839 | tmp = bcma_read32(core, D11REGOFFS(clk_ctl_st)); | 2837 | tmp = bcma_read32(core, D11REGOFFS(clk_ctl_st)); |
2840 | if ((tmp & CCS_ERSRC_AVAIL_HT) != CCS_ERSRC_AVAIL_HT) | 2838 | if ((tmp & CCS_ERSRC_AVAIL_HT) != CCS_ERSRC_AVAIL_HT) |
2841 | wiphy_err(wlc_hw->wlc->wiphy, "%s: turn on PHY" | 2839 | brcms_err(core, "%s: turn on PHY PLL failed\n", |
2842 | " PLL failed\n", __func__); | 2840 | __func__); |
2843 | } else { | 2841 | } else { |
2844 | bcma_set32(core, D11REGOFFS(clk_ctl_st), | 2842 | bcma_set32(core, D11REGOFFS(clk_ctl_st), |
2845 | tmp | CCS_ERSRC_REQ_D11PLL | | 2843 | tmp | CCS_ERSRC_REQ_D11PLL | |
@@ -2855,8 +2853,8 @@ void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on) | |||
2855 | (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) | 2853 | (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) |
2856 | != | 2854 | != |
2857 | (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) | 2855 | (CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) |
2858 | wiphy_err(wlc_hw->wlc->wiphy, "%s: turn on " | 2856 | brcms_err(core, "%s: turn on PHY PLL failed\n", |
2859 | "PHY PLL failed\n", __func__); | 2857 | __func__); |
2860 | } | 2858 | } |
2861 | } else { | 2859 | } else { |
2862 | /* | 2860 | /* |
@@ -2874,7 +2872,7 @@ static void brcms_c_coredisable(struct brcms_hardware *wlc_hw) | |||
2874 | { | 2872 | { |
2875 | bool dev_gone; | 2873 | bool dev_gone; |
2876 | 2874 | ||
2877 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 2875 | brcms_dbg_info(wlc_hw->d11core, "wl%d: disable core\n", wlc_hw->unit); |
2878 | 2876 | ||
2879 | dev_gone = brcms_deviceremoved(wlc_hw->wlc); | 2877 | dev_gone = brcms_deviceremoved(wlc_hw->wlc); |
2880 | 2878 | ||
@@ -3131,7 +3129,7 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc) | |||
3131 | /* check for rx fifo 0 overflow */ | 3129 | /* check for rx fifo 0 overflow */ |
3132 | delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); | 3130 | delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl); |
3133 | if (delta) | 3131 | if (delta) |
3134 | wiphy_err(wlc->wiphy, "wl%d: %u rx fifo 0 overflows!\n", | 3132 | brcms_err(wlc->hw->d11core, "wl%d: %u rx fifo 0 overflows!\n", |
3135 | wlc->pub->unit, delta); | 3133 | wlc->pub->unit, delta); |
3136 | 3134 | ||
3137 | /* check for tx fifo underflows */ | 3135 | /* check for tx fifo underflows */ |
@@ -3140,8 +3138,9 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc) | |||
3140 | (u16) (wlc->core->macstat_snapshot->txfunfl[i] - | 3138 | (u16) (wlc->core->macstat_snapshot->txfunfl[i] - |
3141 | txfunfl[i]); | 3139 | txfunfl[i]); |
3142 | if (delta) | 3140 | if (delta) |
3143 | wiphy_err(wlc->wiphy, "wl%d: %u tx fifo %d underflows!" | 3141 | brcms_err(wlc->hw->d11core, |
3144 | "\n", wlc->pub->unit, delta, i); | 3142 | "wl%d: %u tx fifo %d underflows!\n", |
3143 | wlc->pub->unit, delta, i); | ||
3145 | } | 3144 | } |
3146 | #endif /* DEBUG */ | 3145 | #endif /* DEBUG */ |
3147 | 3146 | ||
@@ -3154,8 +3153,6 @@ static void brcms_c_statsupd(struct brcms_c_info *wlc) | |||
3154 | 3153 | ||
3155 | static void brcms_b_reset(struct brcms_hardware *wlc_hw) | 3154 | static void brcms_b_reset(struct brcms_hardware *wlc_hw) |
3156 | { | 3155 | { |
3157 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
3158 | |||
3159 | /* reset the core */ | 3156 | /* reset the core */ |
3160 | if (!brcms_deviceremoved(wlc_hw->wlc)) | 3157 | if (!brcms_deviceremoved(wlc_hw->wlc)) |
3161 | brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS); | 3158 | brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS); |
@@ -3166,7 +3163,7 @@ static void brcms_b_reset(struct brcms_hardware *wlc_hw) | |||
3166 | 3163 | ||
3167 | void brcms_c_reset(struct brcms_c_info *wlc) | 3164 | void brcms_c_reset(struct brcms_c_info *wlc) |
3168 | { | 3165 | { |
3169 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | 3166 | brcms_dbg_info(wlc->hw->d11core, "wl%d\n", wlc->pub->unit); |
3170 | 3167 | ||
3171 | /* slurp up hw mac counters before core reset */ | 3168 | /* slurp up hw mac counters before core reset */ |
3172 | brcms_c_statsupd(wlc); | 3169 | brcms_c_statsupd(wlc); |
@@ -3211,10 +3208,9 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc) | |||
3211 | bool fifosz_fixup = false; | 3208 | bool fifosz_fixup = false; |
3212 | int err = 0; | 3209 | int err = 0; |
3213 | u16 buf[NFIFO]; | 3210 | u16 buf[NFIFO]; |
3214 | struct wiphy *wiphy = wlc->wiphy; | ||
3215 | struct brcms_ucode *ucode = &wlc_hw->wlc->wl->ucode; | 3211 | struct brcms_ucode *ucode = &wlc_hw->wlc->wl->ucode; |
3216 | 3212 | ||
3217 | BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit); | 3213 | brcms_dbg_info(core, "wl%d: core init\n", wlc_hw->unit); |
3218 | 3214 | ||
3219 | /* reset PSM */ | 3215 | /* reset PSM */ |
3220 | brcms_b_mctrl(wlc_hw, ~0, (MCTL_IHR_EN | MCTL_PSM_JMP_0 | MCTL_WAKE)); | 3216 | brcms_b_mctrl(wlc_hw, ~0, (MCTL_IHR_EN | MCTL_PSM_JMP_0 | MCTL_WAKE)); |
@@ -3234,7 +3230,7 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc) | |||
3234 | SPINWAIT(((bcma_read32(core, D11REGOFFS(macintstatus)) & | 3230 | SPINWAIT(((bcma_read32(core, D11REGOFFS(macintstatus)) & |
3235 | MI_MACSSPNDD) == 0), 1000 * 1000); | 3231 | MI_MACSSPNDD) == 0), 1000 * 1000); |
3236 | if ((bcma_read32(core, D11REGOFFS(macintstatus)) & MI_MACSSPNDD) == 0) | 3232 | if ((bcma_read32(core, D11REGOFFS(macintstatus)) & MI_MACSSPNDD) == 0) |
3237 | wiphy_err(wiphy, "wl%d: wlc_coreinit: ucode did not self-" | 3233 | brcms_err(core, "wl%d: wlc_coreinit: ucode did not self-" |
3238 | "suspend!\n", wlc_hw->unit); | 3234 | "suspend!\n", wlc_hw->unit); |
3239 | 3235 | ||
3240 | brcms_c_gpio_init(wlc); | 3236 | brcms_c_gpio_init(wlc); |
@@ -3245,18 +3241,18 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc) | |||
3245 | if (BRCMS_ISNPHY(wlc_hw->band)) | 3241 | if (BRCMS_ISNPHY(wlc_hw->band)) |
3246 | brcms_c_write_inits(wlc_hw, ucode->d11n0initvals16); | 3242 | brcms_c_write_inits(wlc_hw, ucode->d11n0initvals16); |
3247 | else | 3243 | else |
3248 | wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev" | 3244 | brcms_err(core, "%s: wl%d: unsupported phy in corerev" |
3249 | " %d\n", __func__, wlc_hw->unit, | 3245 | " %d\n", __func__, wlc_hw->unit, |
3250 | wlc_hw->corerev); | 3246 | wlc_hw->corerev); |
3251 | } else if (D11REV_IS(wlc_hw->corerev, 24)) { | 3247 | } else if (D11REV_IS(wlc_hw->corerev, 24)) { |
3252 | if (BRCMS_ISLCNPHY(wlc_hw->band)) | 3248 | if (BRCMS_ISLCNPHY(wlc_hw->band)) |
3253 | brcms_c_write_inits(wlc_hw, ucode->d11lcn0initvals24); | 3249 | brcms_c_write_inits(wlc_hw, ucode->d11lcn0initvals24); |
3254 | else | 3250 | else |
3255 | wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev" | 3251 | brcms_err(core, "%s: wl%d: unsupported phy in corerev" |
3256 | " %d\n", __func__, wlc_hw->unit, | 3252 | " %d\n", __func__, wlc_hw->unit, |
3257 | wlc_hw->corerev); | 3253 | wlc_hw->corerev); |
3258 | } else { | 3254 | } else { |
3259 | wiphy_err(wiphy, "%s: wl%d: unsupported corerev %d\n", | 3255 | brcms_err(core, "%s: wl%d: unsupported corerev %d\n", |
3260 | __func__, wlc_hw->unit, wlc_hw->corerev); | 3256 | __func__, wlc_hw->unit, wlc_hw->corerev); |
3261 | } | 3257 | } |
3262 | 3258 | ||
@@ -3298,7 +3294,7 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc) | |||
3298 | err = -1; | 3294 | err = -1; |
3299 | } | 3295 | } |
3300 | if (err != 0) | 3296 | if (err != 0) |
3301 | wiphy_err(wiphy, "wlc_coreinit: txfifo mismatch: ucode size %d" | 3297 | brcms_err(core, "wlc_coreinit: txfifo mismatch: ucode size %d" |
3302 | " driver size %d index %d\n", buf[i], | 3298 | " driver size %d index %d\n", buf[i], |
3303 | wlc_hw->xmtfifo_sz[i], i); | 3299 | wlc_hw->xmtfifo_sz[i], i); |
3304 | 3300 | ||
@@ -3381,8 +3377,6 @@ static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec) { | |||
3381 | bool fastclk; | 3377 | bool fastclk; |
3382 | struct brcms_c_info *wlc = wlc_hw->wlc; | 3378 | struct brcms_c_info *wlc = wlc_hw->wlc; |
3383 | 3379 | ||
3384 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
3385 | |||
3386 | /* request FAST clock if not on */ | 3380 | /* request FAST clock if not on */ |
3387 | fastclk = wlc_hw->forcefastclk; | 3381 | fastclk = wlc_hw->forcefastclk; |
3388 | if (!fastclk) | 3382 | if (!fastclk) |
@@ -3475,7 +3469,7 @@ static void brcms_c_rate_lookup_init(struct brcms_c_info *wlc, | |||
3475 | rate = (rateset->rates[i] & BRCMS_RATE_MASK); | 3469 | rate = (rateset->rates[i] & BRCMS_RATE_MASK); |
3476 | 3470 | ||
3477 | if (rate > BRCM_MAXRATE) { | 3471 | if (rate > BRCM_MAXRATE) { |
3478 | wiphy_err(wlc->wiphy, "brcms_c_rate_lookup_init: " | 3472 | brcms_err(wlc->hw->d11core, "brcms_c_rate_lookup_init: " |
3479 | "invalid rate 0x%X in rate set\n", | 3473 | "invalid rate 0x%X in rate set\n", |
3480 | rateset->rates[i]); | 3474 | rateset->rates[i]); |
3481 | continue; | 3475 | continue; |
@@ -3551,7 +3545,6 @@ static void brcms_c_bandinit_ordered(struct brcms_c_info *wlc, | |||
3551 | uint parkband; | 3545 | uint parkband; |
3552 | uint i, band_order[2]; | 3546 | uint i, band_order[2]; |
3553 | 3547 | ||
3554 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | ||
3555 | /* | 3548 | /* |
3556 | * We might have been bandlocked during down and the chip | 3549 | * We might have been bandlocked during down and the chip |
3557 | * power-cycled (hibernate). Figure out the right band to park on | 3550 | * power-cycled (hibernate). Figure out the right band to park on |
@@ -3732,8 +3725,8 @@ static void brcms_c_set_ratetable(struct brcms_c_info *wlc) | |||
3732 | /* band-specific init */ | 3725 | /* band-specific init */ |
3733 | static void brcms_c_bsinit(struct brcms_c_info *wlc) | 3726 | static void brcms_c_bsinit(struct brcms_c_info *wlc) |
3734 | { | 3727 | { |
3735 | BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", | 3728 | brcms_dbg_info(wlc->hw->d11core, "wl%d: bandunit %d\n", |
3736 | wlc->pub->unit, wlc->band->bandunit); | 3729 | wlc->pub->unit, wlc->band->bandunit); |
3737 | 3730 | ||
3738 | /* write ucode ACK/CTS rate table */ | 3731 | /* write ucode ACK/CTS rate table */ |
3739 | brcms_c_set_ratetable(wlc); | 3732 | brcms_c_set_ratetable(wlc); |
@@ -3756,7 +3749,8 @@ brcms_c_duty_cycle_set(struct brcms_c_info *wlc, int duty_cycle, bool isOFDM, | |||
3756 | isOFDM ? M_TX_IDLE_BUSY_RATIO_X_16_OFDM : | 3749 | isOFDM ? M_TX_IDLE_BUSY_RATIO_X_16_OFDM : |
3757 | M_TX_IDLE_BUSY_RATIO_X_16_CCK; | 3750 | M_TX_IDLE_BUSY_RATIO_X_16_CCK; |
3758 | if (duty_cycle > 100 || duty_cycle < 0) { | 3751 | if (duty_cycle > 100 || duty_cycle < 0) { |
3759 | wiphy_err(wlc->wiphy, "wl%d: duty cycle value off limit\n", | 3752 | brcms_err(wlc->hw->d11core, |
3753 | "wl%d: duty cycle value off limit\n", | ||
3760 | wlc->pub->unit); | 3754 | wlc->pub->unit); |
3761 | return -EINVAL; | 3755 | return -EINVAL; |
3762 | } | 3756 | } |
@@ -3930,7 +3924,7 @@ static void brcms_c_set_chanspec(struct brcms_c_info *wlc, u16 chanspec) | |||
3930 | u16 old_chanspec = wlc->chanspec; | 3924 | u16 old_chanspec = wlc->chanspec; |
3931 | 3925 | ||
3932 | if (!brcms_c_valid_chanspec_db(wlc->cmi, chanspec)) { | 3926 | if (!brcms_c_valid_chanspec_db(wlc->cmi, chanspec)) { |
3933 | wiphy_err(wlc->wiphy, "wl%d: %s: Bad channel %d\n", | 3927 | brcms_err(wlc->hw->d11core, "wl%d: %s: Bad channel %d\n", |
3934 | wlc->pub->unit, __func__, CHSPEC_CHANNEL(chanspec)); | 3928 | wlc->pub->unit, __func__, CHSPEC_CHANNEL(chanspec)); |
3935 | return; | 3929 | return; |
3936 | } | 3930 | } |
@@ -3941,8 +3935,8 @@ static void brcms_c_set_chanspec(struct brcms_c_info *wlc, u16 chanspec) | |||
3941 | if (wlc->band->bandunit != bandunit || wlc->bandinit_pending) { | 3935 | if (wlc->band->bandunit != bandunit || wlc->bandinit_pending) { |
3942 | switchband = true; | 3936 | switchband = true; |
3943 | if (wlc->bandlocked) { | 3937 | if (wlc->bandlocked) { |
3944 | wiphy_err(wlc->wiphy, "wl%d: %s: chspec %d " | 3938 | brcms_err(wlc->hw->d11core, |
3945 | "band is locked!\n", | 3939 | "wl%d: %s: chspec %d band is locked!\n", |
3946 | wlc->pub->unit, __func__, | 3940 | wlc->pub->unit, __func__, |
3947 | CHSPEC_CHANNEL(chanspec)); | 3941 | CHSPEC_CHANNEL(chanspec)); |
3948 | return; | 3942 | return; |
@@ -4006,6 +4000,10 @@ void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc, | |||
4006 | */ | 4000 | */ |
4007 | void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val) | 4001 | void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx, int val) |
4008 | { | 4002 | { |
4003 | /* | ||
4004 | * Cannot use brcms_dbg_* here because this function is called | ||
4005 | * before wlc is sufficiently initialized. | ||
4006 | */ | ||
4009 | BCMMSG(wlc->wiphy, "idx %d, val %d\n", idx, val); | 4007 | BCMMSG(wlc->wiphy, "idx %d, val %d\n", idx, val); |
4010 | 4008 | ||
4011 | switch (idx) { | 4009 | switch (idx) { |
@@ -4078,8 +4076,8 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, | |||
4078 | 4076 | ||
4079 | /* Only apply params if the core is out of reset and has clocks */ | 4077 | /* Only apply params if the core is out of reset and has clocks */ |
4080 | if (!wlc->clk) { | 4078 | if (!wlc->clk) { |
4081 | wiphy_err(wlc->wiphy, "wl%d: %s : no-clock\n", wlc->pub->unit, | 4079 | brcms_err(wlc->hw->d11core, "wl%d: %s : no-clock\n", |
4082 | __func__); | 4080 | wlc->pub->unit, __func__); |
4083 | return; | 4081 | return; |
4084 | } | 4082 | } |
4085 | 4083 | ||
@@ -4097,7 +4095,7 @@ void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, | |||
4097 | 4095 | ||
4098 | if (acp_shm.aifs < EDCF_AIFSN_MIN | 4096 | if (acp_shm.aifs < EDCF_AIFSN_MIN |
4099 | || acp_shm.aifs > EDCF_AIFSN_MAX) { | 4097 | || acp_shm.aifs > EDCF_AIFSN_MAX) { |
4100 | wiphy_err(wlc->wiphy, "wl%d: edcf_setparams: bad " | 4098 | brcms_err(wlc->hw->d11core, "wl%d: edcf_setparams: bad " |
4101 | "aifs %d\n", wlc->pub->unit, acp_shm.aifs); | 4099 | "aifs %d\n", wlc->pub->unit, acp_shm.aifs); |
4102 | } else { | 4100 | } else { |
4103 | acp_shm.cwmin = params->cw_min; | 4101 | acp_shm.cwmin = params->cw_min; |
@@ -4212,8 +4210,8 @@ static void brcms_c_radio_timer(void *arg) | |||
4212 | struct brcms_c_info *wlc = (struct brcms_c_info *) arg; | 4210 | struct brcms_c_info *wlc = (struct brcms_c_info *) arg; |
4213 | 4211 | ||
4214 | if (brcms_deviceremoved(wlc)) { | 4212 | if (brcms_deviceremoved(wlc)) { |
4215 | wiphy_err(wlc->wiphy, "wl%d: %s: dead chip\n", wlc->pub->unit, | 4213 | brcms_err(wlc->hw->d11core, "wl%d: %s: dead chip\n", |
4216 | __func__); | 4214 | wlc->pub->unit, __func__); |
4217 | brcms_down(wlc->wl); | 4215 | brcms_down(wlc->wl); |
4218 | return; | 4216 | return; |
4219 | } | 4217 | } |
@@ -4226,8 +4224,6 @@ static void brcms_b_watchdog(struct brcms_c_info *wlc) | |||
4226 | { | 4224 | { |
4227 | struct brcms_hardware *wlc_hw = wlc->hw; | 4225 | struct brcms_hardware *wlc_hw = wlc->hw; |
4228 | 4226 | ||
4229 | BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
4230 | |||
4231 | if (!wlc_hw->up) | 4227 | if (!wlc_hw->up) |
4232 | return; | 4228 | return; |
4233 | 4229 | ||
@@ -4246,14 +4242,14 @@ static void brcms_b_watchdog(struct brcms_c_info *wlc) | |||
4246 | /* common watchdog code */ | 4242 | /* common watchdog code */ |
4247 | static void brcms_c_watchdog(struct brcms_c_info *wlc) | 4243 | static void brcms_c_watchdog(struct brcms_c_info *wlc) |
4248 | { | 4244 | { |
4249 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | 4245 | brcms_dbg_info(wlc->hw->d11core, "wl%d\n", wlc->pub->unit); |
4250 | 4246 | ||
4251 | if (!wlc->pub->up) | 4247 | if (!wlc->pub->up) |
4252 | return; | 4248 | return; |
4253 | 4249 | ||
4254 | if (brcms_deviceremoved(wlc)) { | 4250 | if (brcms_deviceremoved(wlc)) { |
4255 | wiphy_err(wlc->wiphy, "wl%d: %s: dead chip\n", wlc->pub->unit, | 4251 | brcms_err(wlc->hw->d11core, "wl%d: %s: dead chip\n", |
4256 | __func__); | 4252 | wlc->pub->unit, __func__); |
4257 | brcms_down(wlc->wl); | 4253 | brcms_down(wlc->wl); |
4258 | return; | 4254 | return; |
4259 | } | 4255 | } |
@@ -4425,13 +4421,13 @@ static int brcms_b_attach(struct brcms_c_info *wlc, struct bcma_device *core, | |||
4425 | struct ssb_sprom *sprom = &core->bus->sprom; | 4421 | struct ssb_sprom *sprom = &core->bus->sprom; |
4426 | 4422 | ||
4427 | if (core->bus->hosttype == BCMA_HOSTTYPE_PCI) | 4423 | if (core->bus->hosttype == BCMA_HOSTTYPE_PCI) |
4428 | BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, | 4424 | brcms_dbg_info(core, "wl%d: vendor 0x%x device 0x%x\n", unit, |
4429 | pcidev->vendor, | 4425 | pcidev->vendor, |
4430 | pcidev->device); | 4426 | pcidev->device); |
4431 | else | 4427 | else |
4432 | BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, | 4428 | brcms_dbg_info(core, "wl%d: vendor 0x%x device 0x%x\n", unit, |
4433 | core->bus->boardinfo.vendor, | 4429 | core->bus->boardinfo.vendor, |
4434 | core->bus->boardinfo.type); | 4430 | core->bus->boardinfo.type); |
4435 | 4431 | ||
4436 | wme = true; | 4432 | wme = true; |
4437 | 4433 | ||
@@ -4703,8 +4699,9 @@ static int brcms_b_attach(struct brcms_c_info *wlc, struct bcma_device *core, | |||
4703 | goto fail; | 4699 | goto fail; |
4704 | } | 4700 | } |
4705 | 4701 | ||
4706 | BCMMSG(wlc->wiphy, "deviceid 0x%x nbands %d board 0x%x\n", | 4702 | brcms_dbg_info(wlc_hw->d11core, "deviceid 0x%x nbands %d board 0x%x\n", |
4707 | wlc_hw->deviceid, wlc_hw->_nbands, ai_get_boardtype(wlc_hw->sih)); | 4703 | wlc_hw->deviceid, wlc_hw->_nbands, |
4704 | ai_get_boardtype(wlc_hw->sih)); | ||
4708 | 4705 | ||
4709 | return err; | 4706 | return err; |
4710 | 4707 | ||
@@ -4960,7 +4957,7 @@ static void brcms_b_hw_up(struct brcms_hardware *wlc_hw) | |||
4960 | if (wlc_hw->wlc->pub->hw_up) | 4957 | if (wlc_hw->wlc->pub->hw_up) |
4961 | return; | 4958 | return; |
4962 | 4959 | ||
4963 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 4960 | brcms_dbg_info(wlc_hw->d11core, "wl%d\n", wlc_hw->unit); |
4964 | 4961 | ||
4965 | /* | 4962 | /* |
4966 | * Enable pll and xtal, initialize the power control registers, | 4963 | * Enable pll and xtal, initialize the power control registers, |
@@ -4997,7 +4994,7 @@ static void brcms_b_hw_up(struct brcms_hardware *wlc_hw) | |||
4997 | 4994 | ||
4998 | static int brcms_b_up_prep(struct brcms_hardware *wlc_hw) | 4995 | static int brcms_b_up_prep(struct brcms_hardware *wlc_hw) |
4999 | { | 4996 | { |
5000 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 4997 | brcms_dbg_info(wlc_hw->d11core, "wl%d\n", wlc_hw->unit); |
5001 | 4998 | ||
5002 | /* | 4999 | /* |
5003 | * Enable pll and xtal, initialize the power control registers, | 5000 | * Enable pll and xtal, initialize the power control registers, |
@@ -5036,8 +5033,6 @@ static int brcms_b_up_prep(struct brcms_hardware *wlc_hw) | |||
5036 | 5033 | ||
5037 | static int brcms_b_up_finish(struct brcms_hardware *wlc_hw) | 5034 | static int brcms_b_up_finish(struct brcms_hardware *wlc_hw) |
5038 | { | 5035 | { |
5039 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
5040 | |||
5041 | wlc_hw->up = true; | 5036 | wlc_hw->up = true; |
5042 | wlc_phy_hw_state_upd(wlc_hw->band->pi, true); | 5037 | wlc_phy_hw_state_upd(wlc_hw->band->pi, true); |
5043 | 5038 | ||
@@ -5069,7 +5064,7 @@ int brcms_c_up(struct brcms_c_info *wlc) | |||
5069 | { | 5064 | { |
5070 | struct ieee80211_channel *ch; | 5065 | struct ieee80211_channel *ch; |
5071 | 5066 | ||
5072 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | 5067 | brcms_dbg_info(wlc->hw->d11core, "wl%d\n", wlc->pub->unit); |
5073 | 5068 | ||
5074 | /* HW is turned off so don't try to access it */ | 5069 | /* HW is turned off so don't try to access it */ |
5075 | if (wlc->pub->hw_off || brcms_deviceremoved(wlc)) | 5070 | if (wlc->pub->hw_off || brcms_deviceremoved(wlc)) |
@@ -5110,8 +5105,8 @@ int brcms_c_up(struct brcms_c_info *wlc) | |||
5110 | WL_RADIO_HW_DISABLE); | 5105 | WL_RADIO_HW_DISABLE); |
5111 | 5106 | ||
5112 | if (bsscfg->enable && bsscfg->BSS) | 5107 | if (bsscfg->enable && bsscfg->BSS) |
5113 | wiphy_err(wlc->wiphy, "wl%d: up" | 5108 | brcms_err(wlc->hw->d11core, |
5114 | ": rfdisable -> " | 5109 | "wl%d: up: rfdisable -> " |
5115 | "bsscfg_disable()\n", | 5110 | "bsscfg_disable()\n", |
5116 | wlc->pub->unit); | 5111 | wlc->pub->unit); |
5117 | } | 5112 | } |
@@ -5171,8 +5166,6 @@ static int brcms_b_bmac_down_prep(struct brcms_hardware *wlc_hw) | |||
5171 | bool dev_gone; | 5166 | bool dev_gone; |
5172 | uint callbacks = 0; | 5167 | uint callbacks = 0; |
5173 | 5168 | ||
5174 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
5175 | |||
5176 | if (!wlc_hw->up) | 5169 | if (!wlc_hw->up) |
5177 | return callbacks; | 5170 | return callbacks; |
5178 | 5171 | ||
@@ -5199,8 +5192,6 @@ static int brcms_b_down_finish(struct brcms_hardware *wlc_hw) | |||
5199 | uint callbacks = 0; | 5192 | uint callbacks = 0; |
5200 | bool dev_gone; | 5193 | bool dev_gone; |
5201 | 5194 | ||
5202 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | ||
5203 | |||
5204 | if (!wlc_hw->up) | 5195 | if (!wlc_hw->up) |
5205 | return callbacks; | 5196 | return callbacks; |
5206 | 5197 | ||
@@ -5249,12 +5240,13 @@ uint brcms_c_down(struct brcms_c_info *wlc) | |||
5249 | int i; | 5240 | int i; |
5250 | bool dev_gone = false; | 5241 | bool dev_gone = false; |
5251 | 5242 | ||
5252 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | 5243 | brcms_dbg_info(wlc->hw->d11core, "wl%d\n", wlc->pub->unit); |
5253 | 5244 | ||
5254 | /* check if we are already in the going down path */ | 5245 | /* check if we are already in the going down path */ |
5255 | if (wlc->going_down) { | 5246 | if (wlc->going_down) { |
5256 | wiphy_err(wlc->wiphy, "wl%d: %s: Driver going down so return" | 5247 | brcms_err(wlc->hw->d11core, |
5257 | "\n", wlc->pub->unit, __func__); | 5248 | "wl%d: %s: Driver going down so return\n", |
5249 | wlc->pub->unit, __func__); | ||
5258 | return 0; | 5250 | return 0; |
5259 | } | 5251 | } |
5260 | if (!wlc->pub->up) | 5252 | if (!wlc->pub->up) |
@@ -5367,7 +5359,7 @@ int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config) | |||
5367 | 5359 | ||
5368 | default: | 5360 | default: |
5369 | /* Error */ | 5361 | /* Error */ |
5370 | wiphy_err(wlc->wiphy, "wl%d: %s: invalid gmode %d\n", | 5362 | brcms_err(wlc->hw->d11core, "wl%d: %s: invalid gmode %d\n", |
5371 | wlc->pub->unit, __func__, gmode); | 5363 | wlc->pub->unit, __func__, gmode); |
5372 | return -ENOTSUPP; | 5364 | return -ENOTSUPP; |
5373 | } | 5365 | } |
@@ -6015,7 +6007,7 @@ brcms_c_calc_ba_time(struct brcms_c_info *wlc, u32 rspec, | |||
6015 | u8 preamble_type) | 6007 | u8 preamble_type) |
6016 | { | 6008 | { |
6017 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, " | 6009 | BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, " |
6018 | "preamble_type %d\n", wlc->pub->unit, rspec, preamble_type); | 6010 | "preamble_type %d\n", wlc->pub->unit, rspec, preamble_type); |
6019 | /* | 6011 | /* |
6020 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that | 6012 | * Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that |
6021 | * is less than or equal to the rate of the immediately previous | 6013 | * is less than or equal to the rate of the immediately previous |
@@ -6138,7 +6130,7 @@ static bool brcms_c_valid_rate(struct brcms_c_info *wlc, u32 rspec, int band, | |||
6138 | return true; | 6130 | return true; |
6139 | error: | 6131 | error: |
6140 | if (verbose) | 6132 | if (verbose) |
6141 | wiphy_err(wlc->wiphy, "wl%d: valid_rate: rate spec 0x%x " | 6133 | brcms_err(wlc->hw->d11core, "wl%d: valid_rate: rate spec 0x%x " |
6142 | "not in hw_rateset\n", wlc->pub->unit, rspec); | 6134 | "not in hw_rateset\n", wlc->pub->unit, rspec); |
6143 | 6135 | ||
6144 | return false; | 6136 | return false; |
@@ -6148,6 +6140,7 @@ static u32 | |||
6148 | mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | 6140 | mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, |
6149 | u32 int_val) | 6141 | u32 int_val) |
6150 | { | 6142 | { |
6143 | struct bcma_device *core = wlc->hw->d11core; | ||
6151 | u8 stf = (int_val & NRATE_STF_MASK) >> NRATE_STF_SHIFT; | 6144 | u8 stf = (int_val & NRATE_STF_MASK) >> NRATE_STF_SHIFT; |
6152 | u8 rate = int_val & NRATE_RATE_MASK; | 6145 | u8 rate = int_val & NRATE_RATE_MASK; |
6153 | u32 rspec; | 6146 | u32 rspec; |
@@ -6164,7 +6157,7 @@ mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | |||
6164 | if ((wlc->pub->_n_enab & SUPPORT_11N) && ismcs) { | 6157 | if ((wlc->pub->_n_enab & SUPPORT_11N) && ismcs) { |
6165 | /* mcs only allowed when nmode */ | 6158 | /* mcs only allowed when nmode */ |
6166 | if (stf > PHY_TXC1_MODE_SDM) { | 6159 | if (stf > PHY_TXC1_MODE_SDM) { |
6167 | wiphy_err(wlc->wiphy, "wl%d: %s: Invalid stf\n", | 6160 | brcms_err(core, "wl%d: %s: Invalid stf\n", |
6168 | wlc->pub->unit, __func__); | 6161 | wlc->pub->unit, __func__); |
6169 | bcmerror = -EINVAL; | 6162 | bcmerror = -EINVAL; |
6170 | goto done; | 6163 | goto done; |
@@ -6175,8 +6168,8 @@ mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | |||
6175 | if (!CHSPEC_IS40(wlc->home_chanspec) || | 6168 | if (!CHSPEC_IS40(wlc->home_chanspec) || |
6176 | ((stf != PHY_TXC1_MODE_SISO) | 6169 | ((stf != PHY_TXC1_MODE_SISO) |
6177 | && (stf != PHY_TXC1_MODE_CDD))) { | 6170 | && (stf != PHY_TXC1_MODE_CDD))) { |
6178 | wiphy_err(wlc->wiphy, "wl%d: %s: Invalid mcs " | 6171 | brcms_err(core, "wl%d: %s: Invalid mcs 32\n", |
6179 | "32\n", wlc->pub->unit, __func__); | 6172 | wlc->pub->unit, __func__); |
6180 | bcmerror = -EINVAL; | 6173 | bcmerror = -EINVAL; |
6181 | goto done; | 6174 | goto done; |
6182 | } | 6175 | } |
@@ -6197,15 +6190,15 @@ mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | |||
6197 | if ((stf > PHY_TXC1_MODE_STBC) || | 6190 | if ((stf > PHY_TXC1_MODE_STBC) || |
6198 | (!BRCMS_STBC_CAP_PHY(wlc) | 6191 | (!BRCMS_STBC_CAP_PHY(wlc) |
6199 | && (stf == PHY_TXC1_MODE_STBC))) { | 6192 | && (stf == PHY_TXC1_MODE_STBC))) { |
6200 | wiphy_err(wlc->wiphy, "wl%d: %s: Invalid STBC" | 6193 | brcms_err(core, "wl%d: %s: Invalid STBC\n", |
6201 | "\n", wlc->pub->unit, __func__); | 6194 | wlc->pub->unit, __func__); |
6202 | bcmerror = -EINVAL; | 6195 | bcmerror = -EINVAL; |
6203 | goto done; | 6196 | goto done; |
6204 | } | 6197 | } |
6205 | } | 6198 | } |
6206 | } else if (is_ofdm_rate(rate)) { | 6199 | } else if (is_ofdm_rate(rate)) { |
6207 | if ((stf != PHY_TXC1_MODE_CDD) && (stf != PHY_TXC1_MODE_SISO)) { | 6200 | if ((stf != PHY_TXC1_MODE_CDD) && (stf != PHY_TXC1_MODE_SISO)) { |
6208 | wiphy_err(wlc->wiphy, "wl%d: %s: Invalid OFDM\n", | 6201 | brcms_err(core, "wl%d: %s: Invalid OFDM\n", |
6209 | wlc->pub->unit, __func__); | 6202 | wlc->pub->unit, __func__); |
6210 | bcmerror = -EINVAL; | 6203 | bcmerror = -EINVAL; |
6211 | goto done; | 6204 | goto done; |
@@ -6213,20 +6206,20 @@ mac80211_wlc_set_nrate(struct brcms_c_info *wlc, struct brcms_band *cur_band, | |||
6213 | } else if (is_cck_rate(rate)) { | 6206 | } else if (is_cck_rate(rate)) { |
6214 | if ((cur_band->bandtype != BRCM_BAND_2G) | 6207 | if ((cur_band->bandtype != BRCM_BAND_2G) |
6215 | || (stf != PHY_TXC1_MODE_SISO)) { | 6208 | || (stf != PHY_TXC1_MODE_SISO)) { |
6216 | wiphy_err(wlc->wiphy, "wl%d: %s: Invalid CCK\n", | 6209 | brcms_err(core, "wl%d: %s: Invalid CCK\n", |
6217 | wlc->pub->unit, __func__); | 6210 | wlc->pub->unit, __func__); |
6218 | bcmerror = -EINVAL; | 6211 | bcmerror = -EINVAL; |
6219 | goto done; | 6212 | goto done; |
6220 | } | 6213 | } |
6221 | } else { | 6214 | } else { |
6222 | wiphy_err(wlc->wiphy, "wl%d: %s: Unknown rate type\n", | 6215 | brcms_err(core, "wl%d: %s: Unknown rate type\n", |
6223 | wlc->pub->unit, __func__); | 6216 | wlc->pub->unit, __func__); |
6224 | bcmerror = -EINVAL; | 6217 | bcmerror = -EINVAL; |
6225 | goto done; | 6218 | goto done; |
6226 | } | 6219 | } |
6227 | /* make sure multiple antennae are available for non-siso rates */ | 6220 | /* make sure multiple antennae are available for non-siso rates */ |
6228 | if ((stf != PHY_TXC1_MODE_SISO) && (wlc->stf->txstreams == 1)) { | 6221 | if ((stf != PHY_TXC1_MODE_SISO) && (wlc->stf->txstreams == 1)) { |
6229 | wiphy_err(wlc->wiphy, "wl%d: %s: SISO antenna but !SISO " | 6222 | brcms_err(core, "wl%d: %s: SISO antenna but !SISO " |
6230 | "request\n", wlc->pub->unit, __func__); | 6223 | "request\n", wlc->pub->unit, __func__); |
6231 | bcmerror = -EINVAL; | 6224 | bcmerror = -EINVAL; |
6232 | goto done; | 6225 | goto done; |
@@ -6295,7 +6288,7 @@ static void brcms_c_cck_plcp_set(struct brcms_c_info *wlc, int rate_500, | |||
6295 | break; | 6288 | break; |
6296 | 6289 | ||
6297 | default: | 6290 | default: |
6298 | wiphy_err(wlc->wiphy, | 6291 | brcms_err(wlc->hw->d11core, |
6299 | "brcms_c_cck_plcp_set: unsupported rate %d\n", | 6292 | "brcms_c_cck_plcp_set: unsupported rate %d\n", |
6300 | rate_500); | 6293 | rate_500); |
6301 | rate_500 = BRCM_RATE_1M; | 6294 | rate_500 = BRCM_RATE_1M; |
@@ -6428,7 +6421,7 @@ static u16 brcms_c_phytxctl1_calc(struct brcms_c_info *wlc, u32 rspec) | |||
6428 | bw = rspec_get_bw(rspec); | 6421 | bw = rspec_get_bw(rspec); |
6429 | /* 10Mhz is not supported yet */ | 6422 | /* 10Mhz is not supported yet */ |
6430 | if (bw < PHY_TXC1_BW_20MHZ) { | 6423 | if (bw < PHY_TXC1_BW_20MHZ) { |
6431 | wiphy_err(wlc->wiphy, "phytxctl1_calc: bw %d is " | 6424 | brcms_err(wlc->hw->d11core, "phytxctl1_calc: bw %d is " |
6432 | "not supported yet, set to 20L\n", bw); | 6425 | "not supported yet, set to 20L\n", bw); |
6433 | bw = PHY_TXC1_BW_20MHZ; | 6426 | bw = PHY_TXC1_BW_20MHZ; |
6434 | } | 6427 | } |
@@ -6455,7 +6448,7 @@ static u16 brcms_c_phytxctl1_calc(struct brcms_c_info *wlc, u32 rspec) | |||
6455 | /* get the phyctl byte from rate phycfg table */ | 6448 | /* get the phyctl byte from rate phycfg table */ |
6456 | phycfg = brcms_c_rate_legacy_phyctl(rspec2rate(rspec)); | 6449 | phycfg = brcms_c_rate_legacy_phyctl(rspec2rate(rspec)); |
6457 | if (phycfg == -1) { | 6450 | if (phycfg == -1) { |
6458 | wiphy_err(wlc->wiphy, "phytxctl1_calc: wrong " | 6451 | brcms_err(wlc->hw->d11core, "phytxctl1_calc: wrong " |
6459 | "legacy OFDM/CCK rate\n"); | 6452 | "legacy OFDM/CCK rate\n"); |
6460 | phycfg = 0; | 6453 | phycfg = 0; |
6461 | } | 6454 | } |
@@ -6535,8 +6528,9 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6535 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | 6528 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { |
6536 | /* non-AP STA should never use BCMC queue */ | 6529 | /* non-AP STA should never use BCMC queue */ |
6537 | if (queue == TX_BCMC_FIFO) { | 6530 | if (queue == TX_BCMC_FIFO) { |
6538 | wiphy_err(wlc->wiphy, "wl%d: %s: ASSERT queue == " | 6531 | brcms_err(wlc->hw->d11core, |
6539 | "TX_BCMC!\n", wlc->pub->unit, __func__); | 6532 | "wl%d: %s: ASSERT queue == TX_BCMC!\n", |
6533 | wlc->pub->unit, __func__); | ||
6540 | frameid = bcmc_fid_generate(wlc, NULL, txh); | 6534 | frameid = bcmc_fid_generate(wlc, NULL, txh); |
6541 | } else { | 6535 | } else { |
6542 | /* Increment the counter for first fragment */ | 6536 | /* Increment the counter for first fragment */ |
@@ -6706,7 +6700,8 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6706 | 6700 | ||
6707 | if ((txrate[k]->flags & IEEE80211_TX_RC_MCS) | 6701 | if ((txrate[k]->flags & IEEE80211_TX_RC_MCS) |
6708 | && (!is_mcs_rate(rspec[k]))) { | 6702 | && (!is_mcs_rate(rspec[k]))) { |
6709 | wiphy_err(wlc->wiphy, "wl%d: %s: IEEE80211_TX_" | 6703 | brcms_err(wlc->hw->d11core, |
6704 | "wl%d: %s: IEEE80211_TX_" | ||
6710 | "RC_MCS != is_mcs_rate(rspec)\n", | 6705 | "RC_MCS != is_mcs_rate(rspec)\n", |
6711 | wlc->pub->unit, __func__); | 6706 | wlc->pub->unit, __func__); |
6712 | } | 6707 | } |
@@ -7100,14 +7095,16 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
7100 | wlc->fragthresh[queue] = | 7095 | wlc->fragthresh[queue] = |
7101 | (u16) newfragthresh; | 7096 | (u16) newfragthresh; |
7102 | } else { | 7097 | } else { |
7103 | wiphy_err(wlc->wiphy, "wl%d: %s txop invalid " | 7098 | brcms_err(wlc->hw->d11core, |
7099 | "wl%d: %s txop invalid " | ||
7104 | "for rate %d\n", | 7100 | "for rate %d\n", |
7105 | wlc->pub->unit, fifo_names[queue], | 7101 | wlc->pub->unit, fifo_names[queue], |
7106 | rspec2rate(rspec[0])); | 7102 | rspec2rate(rspec[0])); |
7107 | } | 7103 | } |
7108 | 7104 | ||
7109 | if (dur > wlc->edcf_txop[ac]) | 7105 | if (dur > wlc->edcf_txop[ac]) |
7110 | wiphy_err(wlc->wiphy, "wl%d: %s: %s txop " | 7106 | brcms_err(wlc->hw->d11core, |
7107 | "wl%d: %s: %s txop " | ||
7111 | "exceeded phylen %d/%d dur %d/%d\n", | 7108 | "exceeded phylen %d/%d dur %d/%d\n", |
7112 | wlc->pub->unit, __func__, | 7109 | wlc->pub->unit, __func__, |
7113 | fifo_names[queue], | 7110 | fifo_names[queue], |
@@ -7140,7 +7137,7 @@ static int brcms_c_tx(struct brcms_c_info *wlc, struct sk_buff *skb) | |||
7140 | * in the tx ring and the tx queue isn't stopped then | 7137 | * in the tx ring and the tx queue isn't stopped then |
7141 | * we've really got a bug; warn loudly if that happens. | 7138 | * we've really got a bug; warn loudly if that happens. |
7142 | */ | 7139 | */ |
7143 | wiphy_warn(wlc->wiphy, | 7140 | brcms_warn(wlc->hw->d11core, |
7144 | "Received frame for tx with no space in DMA ring\n"); | 7141 | "Received frame for tx with no space in DMA ring\n"); |
7145 | WARN_ON(!ieee80211_queue_stopped(wlc->pub->ieee_hw, | 7142 | WARN_ON(!ieee80211_queue_stopped(wlc->pub->ieee_hw, |
7146 | skb_get_queue_mapping(skb))); | 7143 | skb_get_queue_mapping(skb))); |
@@ -7392,7 +7389,8 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, | |||
7392 | rx_status->rate_idx = 11; | 7389 | rx_status->rate_idx = 11; |
7393 | break; | 7390 | break; |
7394 | default: | 7391 | default: |
7395 | wiphy_err(wlc->wiphy, "%s: Unknown rate\n", __func__); | 7392 | brcms_err(wlc->hw->d11core, |
7393 | "%s: Unknown rate\n", __func__); | ||
7396 | } | 7394 | } |
7397 | 7395 | ||
7398 | /* | 7396 | /* |
@@ -7411,7 +7409,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, | |||
7411 | } else if (is_ofdm_rate(rspec)) { | 7409 | } else if (is_ofdm_rate(rspec)) { |
7412 | rx_status->flag |= RX_FLAG_SHORTPRE; | 7410 | rx_status->flag |= RX_FLAG_SHORTPRE; |
7413 | } else { | 7411 | } else { |
7414 | wiphy_err(wlc->wiphy, "%s: Unknown modulation\n", | 7412 | brcms_err(wlc->hw->d11core, "%s: Unknown modulation\n", |
7415 | __func__); | 7413 | __func__); |
7416 | } | 7414 | } |
7417 | } | 7415 | } |
@@ -7421,12 +7419,12 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, | |||
7421 | 7419 | ||
7422 | if (rxh->RxStatus1 & RXS_DECERR) { | 7420 | if (rxh->RxStatus1 & RXS_DECERR) { |
7423 | rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC; | 7421 | rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC; |
7424 | wiphy_err(wlc->wiphy, "%s: RX_FLAG_FAILED_PLCP_CRC\n", | 7422 | brcms_err(wlc->hw->d11core, "%s: RX_FLAG_FAILED_PLCP_CRC\n", |
7425 | __func__); | 7423 | __func__); |
7426 | } | 7424 | } |
7427 | if (rxh->RxStatus1 & RXS_FCSERR) { | 7425 | if (rxh->RxStatus1 & RXS_FCSERR) { |
7428 | rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; | 7426 | rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; |
7429 | wiphy_err(wlc->wiphy, "%s: RX_FLAG_FAILED_FCS_CRC\n", | 7427 | brcms_err(wlc->hw->d11core, "%s: RX_FLAG_FAILED_FCS_CRC\n", |
7430 | __func__); | 7428 | __func__); |
7431 | } | 7429 | } |
7432 | } | 7430 | } |
@@ -7837,8 +7835,9 @@ static void brcms_c_recv(struct brcms_c_info *wlc, struct sk_buff *p) | |||
7837 | /* MAC inserts 2 pad bytes for a4 headers or QoS or A-MSDU subframes */ | 7835 | /* MAC inserts 2 pad bytes for a4 headers or QoS or A-MSDU subframes */ |
7838 | if (rxh->RxStatus1 & RXS_PBPRES) { | 7836 | if (rxh->RxStatus1 & RXS_PBPRES) { |
7839 | if (p->len < 2) { | 7837 | if (p->len < 2) { |
7840 | wiphy_err(wlc->wiphy, "wl%d: recv: rcvd runt of " | 7838 | brcms_err(wlc->hw->d11core, |
7841 | "len %d\n", wlc->pub->unit, p->len); | 7839 | "wl%d: recv: rcvd runt of len %d\n", |
7840 | wlc->pub->unit, p->len); | ||
7842 | goto toss; | 7841 | goto toss; |
7843 | } | 7842 | } |
7844 | skb_pull(p, 2); | 7843 | skb_pull(p, 2); |
@@ -7934,10 +7933,9 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
7934 | u32 macintstatus; | 7933 | u32 macintstatus; |
7935 | struct brcms_hardware *wlc_hw = wlc->hw; | 7934 | struct brcms_hardware *wlc_hw = wlc->hw; |
7936 | struct bcma_device *core = wlc_hw->d11core; | 7935 | struct bcma_device *core = wlc_hw->d11core; |
7937 | struct wiphy *wiphy = wlc->wiphy; | ||
7938 | 7936 | ||
7939 | if (brcms_deviceremoved(wlc)) { | 7937 | if (brcms_deviceremoved(wlc)) { |
7940 | wiphy_err(wiphy, "wl%d: %s: dead chip\n", wlc_hw->unit, | 7938 | brcms_err(core, "wl%d: %s: dead chip\n", wlc_hw->unit, |
7941 | __func__); | 7939 | __func__); |
7942 | brcms_down(wlc->wl); | 7940 | brcms_down(wlc->wl); |
7943 | return false; | 7941 | return false; |
@@ -7958,7 +7956,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
7958 | if (brcms_b_txstatus(wlc->hw, bounded, &fatal)) | 7956 | if (brcms_b_txstatus(wlc->hw, bounded, &fatal)) |
7959 | wlc->macintstatus |= MI_TFS; | 7957 | wlc->macintstatus |= MI_TFS; |
7960 | if (fatal) { | 7958 | if (fatal) { |
7961 | wiphy_err(wiphy, "MI_TFS: fatal\n"); | 7959 | brcms_err(core, "MI_TFS: fatal\n"); |
7962 | goto fatal; | 7960 | goto fatal; |
7963 | } | 7961 | } |
7964 | } | 7962 | } |
@@ -7968,7 +7966,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
7968 | 7966 | ||
7969 | /* ATIM window end */ | 7967 | /* ATIM window end */ |
7970 | if (macintstatus & MI_ATIMWINEND) { | 7968 | if (macintstatus & MI_ATIMWINEND) { |
7971 | BCMMSG(wlc->wiphy, "end of ATIM window\n"); | 7969 | brcms_dbg_info(core, "end of ATIM window\n"); |
7972 | bcma_set32(core, D11REGOFFS(maccommand), wlc->qvalid); | 7970 | bcma_set32(core, D11REGOFFS(maccommand), wlc->qvalid); |
7973 | wlc->qvalid = 0; | 7971 | wlc->qvalid = 0; |
7974 | } | 7972 | } |
@@ -7986,7 +7984,7 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
7986 | wlc_phy_noise_sample_intr(wlc_hw->band->pi); | 7984 | wlc_phy_noise_sample_intr(wlc_hw->band->pi); |
7987 | 7985 | ||
7988 | if (macintstatus & MI_GP0) { | 7986 | if (macintstatus & MI_GP0) { |
7989 | wiphy_err(wiphy, "wl%d: PSM microcode watchdog fired at %d " | 7987 | brcms_err(core, "wl%d: PSM microcode watchdog fired at %d " |
7990 | "(seconds). Resetting.\n", wlc_hw->unit, wlc_hw->now); | 7988 | "(seconds). Resetting.\n", wlc_hw->unit, wlc_hw->now); |
7991 | 7989 | ||
7992 | printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n", | 7990 | printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n", |
@@ -8000,8 +7998,8 @@ bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded) | |||
8000 | bcma_write32(core, D11REGOFFS(gptimer), 0); | 7998 | bcma_write32(core, D11REGOFFS(gptimer), 0); |
8001 | 7999 | ||
8002 | if (macintstatus & MI_RFDISABLE) { | 8000 | if (macintstatus & MI_RFDISABLE) { |
8003 | BCMMSG(wlc->wiphy, "wl%d: BMAC Detected a change on the" | 8001 | brcms_dbg_info(core, "wl%d: BMAC Detected a change on the" |
8004 | " RF Disable Input\n", wlc_hw->unit); | 8002 | " RF Disable Input\n", wlc_hw->unit); |
8005 | brcms_rfkill_set_hw_state(wlc->wl); | 8003 | brcms_rfkill_set_hw_state(wlc->wl); |
8006 | } | 8004 | } |
8007 | 8005 | ||
@@ -8019,7 +8017,7 @@ void brcms_c_init(struct brcms_c_info *wlc, bool mute_tx) | |||
8019 | struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.channel; | 8017 | struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.channel; |
8020 | u16 chanspec; | 8018 | u16 chanspec; |
8021 | 8019 | ||
8022 | BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); | 8020 | brcms_dbg_info(core, "wl%d\n", wlc->pub->unit); |
8023 | 8021 | ||
8024 | chanspec = ch20mhz_chspec(ch->hw_value); | 8022 | chanspec = ch20mhz_chspec(ch->hw_value); |
8025 | 8023 | ||