aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-10-21 10:16:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-08 15:54:17 -0500
commit43ac09722f8e8f69cb528877c4b853cf9b96d9d7 (patch)
tree0c435045138cbc4f251587f9c51dd88237535bcc /drivers/net/wireless/brcm80211/brcmsmac
parent28237002e726bfaeb3ab682ec5574d697a15e00d (diff)
brcm80211: smac: removed down-on-rf-kill functionality
Softmac would bring its interface down on an RF kill switch condition, without Mac80211 intervention. Because Mac80211 should be the only party initiating interfaces going up and down, this functionality has been removed. 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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c67
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/pub.h1
3 files changed, 0 insertions, 70 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index fe8f1ecea100..915b74199911 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1078,8 +1078,6 @@ 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 brcms_c_set_radio_mon(wl->wlc);
1082
1083 /* register our interrupt handler */ 1081 /* register our interrupt handler */
1084 if (request_irq(irq, brcms_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { 1082 if (request_irq(irq, brcms_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) {
1085 wiphy_err(wl->wiphy, "wl%d: request_irq() failed\n", unit); 1083 wiphy_err(wl->wiphy, "wl%d: request_irq() failed\n", unit);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index d185eed3b693..2fecf06b078a 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -4194,17 +4194,6 @@ static void brcms_c_edcf_setparams(struct brcms_c_info *wlc, bool suspend)
4194 } 4194 }
4195} 4195}
4196 4196
4197/* maintain LED behavior in down state */
4198static void brcms_c_down_led_upd(struct brcms_c_info *wlc)
4199{
4200 /*
4201 * maintain LEDs while in down state, turn on sbclk if
4202 * not available yet. Turn on sbclk if necessary
4203 */
4204 brcms_b_pllreq(wlc->hw, true, BRCMS_PLLREQ_FLIP);
4205 brcms_b_pllreq(wlc->hw, false, BRCMS_PLLREQ_FLIP);
4206}
4207
4208static void brcms_c_radio_monitor_start(struct brcms_c_info *wlc) 4197static void brcms_c_radio_monitor_start(struct brcms_c_info *wlc)
4209{ 4198{
4210 /* Don't start the timer if HWRADIO feature is disabled */ 4199 /* Don't start the timer if HWRADIO feature is disabled */
@@ -4216,28 +4205,6 @@ static void brcms_c_radio_monitor_start(struct brcms_c_info *wlc)
4216 brcms_add_timer(wlc->radio_timer, TIMER_INTERVAL_RADIOCHK, true); 4205 brcms_add_timer(wlc->radio_timer, TIMER_INTERVAL_RADIOCHK, true);
4217} 4206}
4218 4207
4219static void brcms_c_radio_disable(struct brcms_c_info *wlc)
4220{
4221 if (!wlc->pub->up) {
4222 brcms_c_down_led_upd(wlc);
4223 return;
4224 }
4225
4226 brcms_c_radio_monitor_start(wlc);
4227 brcms_down(wlc->wl);
4228}
4229
4230static void brcms_c_radio_enable(struct brcms_c_info *wlc)
4231{
4232 if (wlc->pub->up)
4233 return;
4234
4235 if (brcms_deviceremoved(wlc))
4236 return;
4237
4238 brcms_up(wlc->wl);
4239}
4240
4241static bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc) 4208static bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc)
4242{ 4209{
4243 if (!wlc->radio_monitor) 4210 if (!wlc->radio_monitor)
@@ -4260,18 +4227,6 @@ static void brcms_c_radio_hwdisable_upd(struct brcms_c_info *wlc)
4260 mboolclr(wlc->pub->radio_disabled, WL_RADIO_HW_DISABLE); 4227 mboolclr(wlc->pub->radio_disabled, WL_RADIO_HW_DISABLE);
4261} 4228}
4262 4229
4263/*
4264 * centralized radio disable/enable function,
4265 * invoke radio enable/disable after updating hwradio status
4266 */
4267static void brcms_c_radio_upd(struct brcms_c_info *wlc)
4268{
4269 if (wlc->pub->radio_disabled)
4270 brcms_c_radio_disable(wlc);
4271 else
4272 brcms_c_radio_enable(wlc);
4273}
4274
4275/* update hwradio status and return it */ 4230/* update hwradio status and return it */
4276bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc) 4231bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc)
4277{ 4232{
@@ -4294,7 +4249,6 @@ static void brcms_c_radio_timer(void *arg)
4294 } 4249 }
4295 4250
4296 brcms_c_radio_hwdisable_upd(wlc); 4251 brcms_c_radio_hwdisable_upd(wlc);
4297 brcms_c_radio_upd(wlc);
4298} 4252}
4299 4253
4300/* common low-level watchdog code */ 4254/* common low-level watchdog code */
@@ -4320,18 +4274,6 @@ static void brcms_b_watchdog(void *arg)
4320 wlc_phy_watchdog(wlc_hw->band->pi); 4274 wlc_phy_watchdog(wlc_hw->band->pi);
4321} 4275}
4322 4276
4323static void brcms_c_radio_mon_upd(struct brcms_c_info *wlc)
4324{
4325 /*
4326 * Stop the radio monitor when the radio is going down.
4327 */
4328 if (!wlc->pub->radio_disabled)
4329 return;
4330 brcms_c_radio_upd(wlc);
4331 if (!wlc->pub->radio_disabled)
4332 brcms_c_radio_monitor_stop(wlc);
4333}
4334
4335/* common watchdog code */ 4277/* common watchdog code */
4336static void brcms_c_watchdog(void *arg) 4278static void brcms_c_watchdog(void *arg)
4337{ 4279{
@@ -4352,10 +4294,7 @@ static void brcms_c_watchdog(void *arg)
4352 /* increment second count */ 4294 /* increment second count */
4353 wlc->pub->now++; 4295 wlc->pub->now++;
4354 4296
4355 brcms_c_radio_mon_upd(wlc);
4356 /* radio sync: sw/hw --> radio_disable/radio_enable */
4357 brcms_c_radio_hwdisable_upd(wlc); 4297 brcms_c_radio_hwdisable_upd(wlc);
4358 brcms_c_radio_upd(wlc);
4359 /* if radio is disable, driver may be down, quit here */ 4298 /* if radio is disable, driver may be down, quit here */
4360 if (wlc->pub->radio_disabled) 4299 if (wlc->pub->radio_disabled)
4361 return; 4300 return;
@@ -8104,11 +8043,6 @@ int brcms_c_get_tx_power(struct brcms_c_info *wlc)
8104 return (int)(qdbm / BRCMS_TXPWR_DB_FACTOR); 8043 return (int)(qdbm / BRCMS_TXPWR_DB_FACTOR);
8105} 8044}
8106 8045
8107void brcms_c_set_radio_mon(struct brcms_c_info *wlc)
8108{
8109 brcms_c_radio_mon_upd(wlc);
8110}
8111
8112/* Process received frames */ 8046/* Process received frames */
8113/* 8047/*
8114 * Return true if more frames need to be processed. false otherwise. 8048 * Return true if more frames need to be processed. false otherwise.
@@ -8600,7 +8534,6 @@ brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
8600 brcms_c_ht_update_sgi_rx(wlc, 0); 8534 brcms_c_ht_update_sgi_rx(wlc, 0);
8601 } 8535 }
8602 8536
8603 brcms_c_radio_mon_upd(wlc);
8604 brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail); 8537 brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail);
8605 8538
8606 if (perr) 8539 if (perr)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/pub.h b/drivers/net/wireless/brcm80211/brcmsmac/pub.h
index 4f8e85901997..97b9cce63081 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h
@@ -596,7 +596,6 @@ extern void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc,
596 u8 interval); 596 u8 interval);
597extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr); 597extern int brcms_c_set_tx_power(struct brcms_c_info *wlc, int txpwr);
598extern int brcms_c_get_tx_power(struct brcms_c_info *wlc); 598extern int brcms_c_get_tx_power(struct brcms_c_info *wlc);
599extern void brcms_c_set_radio_mon(struct brcms_c_info *wlc);
600extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc); 599extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
601 600
602#endif /* _BRCM_PUB_H_ */ 601#endif /* _BRCM_PUB_H_ */