Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

brcm80211: smac: removed down-on-watchdog MPC functionality

Softmac would bring its interface down on a certain Minimum Power Save
related condition, without Mac80211 intervention. Because Mac80211 should
be the only party initiating interfaces going up and down, this functionality
has been removed. All notions of 'MPC' have been removed in the code as
well.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Roland Vossen and committed by
John W. Linville
28237002 44129530

+9 -45
+1 -2
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 1078 1078 1079 1079 wl->pub->ieee_hw = hw; 1080 1080 1081 - /* disable mpc */ 1082 - brcms_c_set_radio_mpc(wl->wlc); 1081 + brcms_c_set_radio_mon(wl->wlc); 1083 1082 1084 1083 /* register our interrupt handler */ 1085 1084 if (request_irq(irq, brcms_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) {
+7 -38
drivers/net/wireless/brcm80211/brcmsmac/main.c
··· 43 43 /* radio monitor timer, in unit of ms */ 44 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 46 /* beacon interval, in unit of 1024TU */ 57 47 #define BEACON_INTERVAL_DEFAULT 100 58 48 ··· 4320 4330 wlc_phy_watchdog(wlc_hw->band->pi); 4321 4331 } 4322 4332 4323 - static void brcms_c_radio_mpc_upd(struct brcms_c_info *wlc) 4333 + static void brcms_c_radio_mon_upd(struct brcms_c_info *wlc) 4324 4334 { 4325 4335 /* 4326 - * Clear the WL_RADIO_MPC_DISABLE bit when mpc feature is disabled 4327 - * in case the WL_RADIO_MPC_DISABLE bit was set. Stop the radio 4328 - * monitor also when WL_RADIO_MPC_DISABLE is the only reason that 4329 - * the radio is going down. 4336 + * Stop the radio monitor when the radio is going down. 4330 4337 */ 4331 4338 if (!wlc->pub->radio_disabled) 4332 4339 return; 4333 - mboolclr(wlc->pub->radio_disabled, WL_RADIO_MPC_DISABLE); 4334 4340 brcms_c_radio_upd(wlc); 4335 4341 if (!wlc->pub->radio_disabled) 4336 4342 brcms_c_radio_monitor_stop(wlc); ··· 4352 4366 /* increment second count */ 4353 4367 wlc->pub->now++; 4354 4368 4355 - /* delay radio disable */ 4356 - if (wlc->mpc_delay_off) { 4357 - if (--wlc->mpc_delay_off == 0) { 4358 - mboolset(wlc->pub->radio_disabled, 4359 - WL_RADIO_MPC_DISABLE); 4360 - } 4361 - } 4362 - 4363 - /* mpc sync */ 4364 - brcms_c_radio_mpc_upd(wlc); 4365 - /* radio sync: sw/hw/mpc --> radio_disable/radio_enable */ 4369 + brcms_c_radio_mon_upd(wlc); 4370 + /* radio sync: sw/hw --> radio_disable/radio_enable */ 4366 4371 brcms_c_radio_hwdisable_upd(wlc); 4367 4372 brcms_c_radio_upd(wlc); 4368 4373 /* if radio is disable, driver may be down, quit here */ ··· 4459 4482 /* WME QoS mode is Auto by default */ 4460 4483 wlc->pub->_ampdu = AMPDU_AGG_HOST; 4461 4484 wlc->pub->bcmerror = 0; 4462 - 4463 - /* initialize mpc delay */ 4464 - wlc->mpc_delay_off = BRCMS_MPC_MIN_DELAYCNT; 4465 4485 } 4466 4486 4467 4487 static uint brcms_c_attach_module(struct brcms_c_info *wlc) ··· 5429 5455 if (!wlc->pub->up) 5430 5456 return callbacks; 5431 5457 5432 - /* in between, mpc could try to bring down again.. */ 5433 5458 wlc->going_down = true; 5434 5459 5435 5460 callbacks += brcms_b_bmac_down_prep(wlc->hw); ··· 8104 8131 return (int)(qdbm / BRCMS_TXPWR_DB_FACTOR); 8105 8132 } 8106 8133 8107 - void brcms_c_set_radio_mpc(struct brcms_c_info *wlc) 8134 + void brcms_c_set_radio_mon(struct brcms_c_info *wlc) 8108 8135 { 8109 - brcms_c_radio_mpc_upd(wlc); 8136 + brcms_c_radio_mon_upd(wlc); 8110 8137 } 8111 8138 8112 8139 /* Process received frames */ ··· 8415 8442 /* enable the RF Disable Delay timer */ 8416 8443 W_REG(&wlc->regs->rfdisabledly, RFDISABLE_DEFAULT); 8417 8444 8418 - /* initialize mpc delay */ 8419 - wlc->mpc_delay_off = BRCMS_MPC_MIN_DELAYCNT; 8420 - 8421 8445 /* 8422 8446 * Initialize WME parameters; if they haven't been set by some other 8423 8447 * mechanism (IOVar, etc) then read them from the hardware. ··· 8600 8630 brcms_c_ht_update_sgi_rx(wlc, 0); 8601 8631 } 8602 8632 8603 - /* initialize radio_mpc_disable according to wlc->mpc */ 8604 - brcms_c_radio_mpc_upd(wlc); 8633 + brcms_c_radio_mon_upd(wlc); 8605 8634 brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail); 8606 8635 8607 8636 if (perr)
-3
drivers/net/wireless/brcm80211/brcmsmac/main.h
··· 427 427 * bandinit_pending: track band init in auto band. 428 428 * radio_monitor: radio timer is running. 429 429 * going_down: down path intermediate variable. 430 - * mpc_delay_off: delay radio disable by # of watchdog cnt. 431 430 * wdtimer: timer for watchdog routine. 432 431 * radio_timer: timer for hw radio button monitor routine. 433 432 * monitor: monitor (MPDU sniffing) mode. ··· 516 517 517 518 bool radio_monitor; 518 519 bool going_down; 519 - 520 - u8 mpc_delay_off; 521 520 522 521 struct brcms_timer *wdtimer; 523 522 struct brcms_timer *radio_timer;
+1 -1
drivers/net/wireless/brcm80211/brcmsmac/pub.h
··· 596 596 u8 interval); 597 597 extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); 598 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 600 extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); 601 601 602 602 #endif /* _BRCM_PUB_H_ */
-1
drivers/net/wireless/brcm80211/include/defs.h
··· 62 62 63 63 #define WL_RADIO_SW_DISABLE (1<<0) 64 64 #define WL_RADIO_HW_DISABLE (1<<1) 65 - #define WL_RADIO_MPC_DISABLE (1<<2) 66 65 /* some countries don't support any channel */ 67 66 #define WL_RADIO_COUNTRY_DISABLE (1<<3) 68 67