diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/pub.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/include/defs.h | 1 |
5 files changed, 9 insertions, 45 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 1781157c0236..fe8f1ecea100 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -1078,8 +1078,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device, | |||
1078 | 1078 | ||
1079 | wl->pub->ieee_hw = hw; | 1079 | wl->pub->ieee_hw = hw; |
1080 | 1080 | ||
1081 | /* disable mpc */ | 1081 | brcms_c_set_radio_mon(wl->wlc); |
1082 | brcms_c_set_radio_mpc(wl->wlc); | ||
1083 | 1082 | ||
1084 | /* register our interrupt handler */ | 1083 | /* register our interrupt handler */ |
1085 | if (request_irq(irq, brcms_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { | 1084 | if (request_irq(irq, brcms_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index e7d14e4ddd9a..d185eed3b693 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -43,16 +43,6 @@ | |||
43 | /* radio monitor timer, in unit of ms */ | 43 | /* radio monitor timer, in unit of ms */ |
44 | #define TIMER_INTERVAL_RADIOCHK 800 | 44 | #define TIMER_INTERVAL_RADIOCHK 800 |
45 | 45 | ||
46 | /* Max MPC timeout, in unit of watchdog */ | ||
47 | #ifndef BRCMS_MPC_MAX_DELAYCNT | ||
48 | #define BRCMS_MPC_MAX_DELAYCNT 10 | ||
49 | #endif | ||
50 | |||
51 | /* Min MPC timeout, in unit of watchdog */ | ||
52 | #define BRCMS_MPC_MIN_DELAYCNT 1 | ||
53 | /* MPC count threshold level */ | ||
54 | #define BRCMS_MPC_THRESHOLD 3 | ||
55 | |||
56 | /* beacon interval, in unit of 1024TU */ | 46 | /* beacon interval, in unit of 1024TU */ |
57 | #define BEACON_INTERVAL_DEFAULT 100 | 47 | #define BEACON_INTERVAL_DEFAULT 100 |
58 | 48 | ||
@@ -4330,17 +4320,13 @@ static void brcms_b_watchdog(void *arg) | |||
4330 | wlc_phy_watchdog(wlc_hw->band->pi); | 4320 | wlc_phy_watchdog(wlc_hw->band->pi); |
4331 | } | 4321 | } |
4332 | 4322 | ||
4333 | static void brcms_c_radio_mpc_upd(struct brcms_c_info *wlc) | 4323 | static void brcms_c_radio_mon_upd(struct brcms_c_info *wlc) |
4334 | { | 4324 | { |
4335 | /* | 4325 | /* |
4336 | * Clear the WL_RADIO_MPC_DISABLE bit when mpc feature is disabled | 4326 | * Stop the radio monitor when the radio is going down. |
4337 | * in case the WL_RADIO_MPC_DISABLE bit was set. Stop the radio | ||
4338 | * monitor also when WL_RADIO_MPC_DISABLE is the only reason that | ||
4339 | * the radio is going down. | ||
4340 | */ | 4327 | */ |
4341 | if (!wlc->pub->radio_disabled) | 4328 | if (!wlc->pub->radio_disabled) |
4342 | return; | 4329 | return; |
4343 | mboolclr(wlc->pub->radio_disabled, WL_RADIO_MPC_DISABLE); | ||
4344 | brcms_c_radio_upd(wlc); | 4330 | brcms_c_radio_upd(wlc); |
4345 | if (!wlc->pub->radio_disabled) | 4331 | if (!wlc->pub->radio_disabled) |
4346 | brcms_c_radio_monitor_stop(wlc); | 4332 | brcms_c_radio_monitor_stop(wlc); |
@@ -4366,17 +4352,8 @@ static void brcms_c_watchdog(void *arg) | |||
4366 | /* increment second count */ | 4352 | /* increment second count */ |
4367 | wlc->pub->now++; | 4353 | wlc->pub->now++; |
4368 | 4354 | ||
4369 | /* delay radio disable */ | 4355 | brcms_c_radio_mon_upd(wlc); |
4370 | if (wlc->mpc_delay_off) { | 4356 | /* radio sync: sw/hw --> radio_disable/radio_enable */ |
4371 | if (--wlc->mpc_delay_off == 0) { | ||
4372 | mboolset(wlc->pub->radio_disabled, | ||
4373 | WL_RADIO_MPC_DISABLE); | ||
4374 | } | ||
4375 | } | ||
4376 | |||
4377 | /* mpc sync */ | ||
4378 | brcms_c_radio_mpc_upd(wlc); | ||
4379 | /* radio sync: sw/hw/mpc --> radio_disable/radio_enable */ | ||
4380 | brcms_c_radio_hwdisable_upd(wlc); | 4357 | brcms_c_radio_hwdisable_upd(wlc); |
4381 | brcms_c_radio_upd(wlc); | 4358 | brcms_c_radio_upd(wlc); |
4382 | /* if radio is disable, driver may be down, quit here */ | 4359 | /* if radio is disable, driver may be down, quit here */ |
@@ -4482,9 +4459,6 @@ static void brcms_c_info_init(struct brcms_c_info *wlc, int unit) | |||
4482 | /* WME QoS mode is Auto by default */ | 4459 | /* WME QoS mode is Auto by default */ |
4483 | wlc->pub->_ampdu = AMPDU_AGG_HOST; | 4460 | wlc->pub->_ampdu = AMPDU_AGG_HOST; |
4484 | wlc->pub->bcmerror = 0; | 4461 | wlc->pub->bcmerror = 0; |
4485 | |||
4486 | /* initialize mpc delay */ | ||
4487 | wlc->mpc_delay_off = BRCMS_MPC_MIN_DELAYCNT; | ||
4488 | } | 4462 | } |
4489 | 4463 | ||
4490 | static uint brcms_c_attach_module(struct brcms_c_info *wlc) | 4464 | static uint brcms_c_attach_module(struct brcms_c_info *wlc) |
@@ -5455,7 +5429,6 @@ uint brcms_c_down(struct brcms_c_info *wlc) | |||
5455 | if (!wlc->pub->up) | 5429 | if (!wlc->pub->up) |
5456 | return callbacks; | 5430 | return callbacks; |
5457 | 5431 | ||
5458 | /* in between, mpc could try to bring down again.. */ | ||
5459 | wlc->going_down = true; | 5432 | wlc->going_down = true; |
5460 | 5433 | ||
5461 | callbacks += brcms_b_bmac_down_prep(wlc->hw); | 5434 | callbacks += brcms_b_bmac_down_prep(wlc->hw); |
@@ -8131,9 +8104,9 @@ int brcms_c_get_tx_power(struct brcms_c_info *wlc) | |||
8131 | return (int)(qdbm / BRCMS_TXPWR_DB_FACTOR); | 8104 | return (int)(qdbm / BRCMS_TXPWR_DB_FACTOR); |
8132 | } | 8105 | } |
8133 | 8106 | ||
8134 | void brcms_c_set_radio_mpc(struct brcms_c_info *wlc) | 8107 | void brcms_c_set_radio_mon(struct brcms_c_info *wlc) |
8135 | { | 8108 | { |
8136 | brcms_c_radio_mpc_upd(wlc); | 8109 | brcms_c_radio_mon_upd(wlc); |
8137 | } | 8110 | } |
8138 | 8111 | ||
8139 | /* Process received frames */ | 8112 | /* Process received frames */ |
@@ -8442,9 +8415,6 @@ void brcms_c_init(struct brcms_c_info *wlc) | |||
8442 | /* enable the RF Disable Delay timer */ | 8415 | /* enable the RF Disable Delay timer */ |
8443 | W_REG(&wlc->regs->rfdisabledly, RFDISABLE_DEFAULT); | 8416 | W_REG(&wlc->regs->rfdisabledly, RFDISABLE_DEFAULT); |
8444 | 8417 | ||
8445 | /* initialize mpc delay */ | ||
8446 | wlc->mpc_delay_off = BRCMS_MPC_MIN_DELAYCNT; | ||
8447 | |||
8448 | /* | 8418 | /* |
8449 | * Initialize WME parameters; if they haven't been set by some other | 8419 | * Initialize WME parameters; if they haven't been set by some other |
8450 | * mechanism (IOVar, etc) then read them from the hardware. | 8420 | * mechanism (IOVar, etc) then read them from the hardware. |
@@ -8630,8 +8600,7 @@ brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit, | |||
8630 | brcms_c_ht_update_sgi_rx(wlc, 0); | 8600 | brcms_c_ht_update_sgi_rx(wlc, 0); |
8631 | } | 8601 | } |
8632 | 8602 | ||
8633 | /* initialize radio_mpc_disable according to wlc->mpc */ | 8603 | brcms_c_radio_mon_upd(wlc); |
8634 | brcms_c_radio_mpc_upd(wlc); | ||
8635 | brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail); | 8604 | brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail); |
8636 | 8605 | ||
8637 | if (perr) | 8606 | if (perr) |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.h b/drivers/net/wireless/brcm80211/brcmsmac/main.h index fc5852f71f36..9a7535d3838d 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.h | |||
@@ -427,7 +427,6 @@ struct brcms_txq_info { | |||
427 | * bandinit_pending: track band init in auto band. | 427 | * bandinit_pending: track band init in auto band. |
428 | * radio_monitor: radio timer is running. | 428 | * radio_monitor: radio timer is running. |
429 | * going_down: down path intermediate variable. | 429 | * going_down: down path intermediate variable. |
430 | * mpc_delay_off: delay radio disable by # of watchdog cnt. | ||
431 | * wdtimer: timer for watchdog routine. | 430 | * wdtimer: timer for watchdog routine. |
432 | * radio_timer: timer for hw radio button monitor routine. | 431 | * radio_timer: timer for hw radio button monitor routine. |
433 | * monitor: monitor (MPDU sniffing) mode. | 432 | * monitor: monitor (MPDU sniffing) mode. |
@@ -518,8 +517,6 @@ struct brcms_c_info { | |||
518 | bool radio_monitor; | 517 | bool radio_monitor; |
519 | bool going_down; | 518 | bool going_down; |
520 | 519 | ||
521 | u8 mpc_delay_off; | ||
522 | |||
523 | struct brcms_timer *wdtimer; | 520 | struct brcms_timer *wdtimer; |
524 | struct brcms_timer *radio_timer; | 521 | struct brcms_timer *radio_timer; |
525 | 522 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pub.h b/drivers/net/wireless/brcm80211/brcmsmac/pub.h index 2e092160df5c..4f8e85901997 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h | |||
@@ -596,7 +596,7 @@ extern void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, | |||
596 | u8 interval); | 596 | u8 interval); |
597 | extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); | 597 | extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); |
598 | extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); | 598 | extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); |
599 | extern void brcms_c_set_radio_mpc(struct brcms_c_info *wlc); | 599 | extern void brcms_c_set_radio_mon(struct brcms_c_info *wlc); |
600 | extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); | 600 | extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); |
601 | 601 | ||
602 | #endif /* _BRCM_PUB_H_ */ | 602 | #endif /* _BRCM_PUB_H_ */ |
diff --git a/drivers/net/wireless/brcm80211/include/defs.h b/drivers/net/wireless/brcm80211/include/defs.h index 1e5f310af1e7..f0d8c04a9c8c 100644 --- a/drivers/net/wireless/brcm80211/include/defs.h +++ b/drivers/net/wireless/brcm80211/include/defs.h | |||
@@ -62,7 +62,6 @@ | |||
62 | 62 | ||
63 | #define WL_RADIO_SW_DISABLE (1<<0) | 63 | #define WL_RADIO_SW_DISABLE (1<<0) |
64 | #define WL_RADIO_HW_DISABLE (1<<1) | 64 | #define WL_RADIO_HW_DISABLE (1<<1) |
65 | #define WL_RADIO_MPC_DISABLE (1<<2) | ||
66 | /* some countries don't support any channel */ | 65 | /* some countries don't support any channel */ |
67 | #define WL_RADIO_COUNTRY_DISABLE (1<<3) | 66 | #define WL_RADIO_COUNTRY_DISABLE (1<<3) |
68 | 67 | ||