aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-02-20 09:39:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:51 -0500
commit25d3ef59a2112d50e145500e1bc764f9e8fd4896 (patch)
tree2aad0f5d67ef796600dd04ac7f2cc52bf75b57f7 /drivers/net/wireless/b43/main.c
parent80e775bf08f1915870fbb0c1c7a45a3fdc291721 (diff)
b43: Implement sw scan callbacks
This implements the new sw scan callbacks in b43. They are currently used to turn CFP update in the microcode off while scanning. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index ef514827a8d5..6d52bae4932e 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4182,6 +4182,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
4182 if ((bus->bustype == SSB_BUSTYPE_PCI) && 4182 if ((bus->bustype == SSB_BUSTYPE_PCI) &&
4183 (bus->pcicore.dev->id.revision <= 10)) 4183 (bus->pcicore.dev->id.revision <= 10))
4184 hf |= B43_HF_PCISCW; /* PCI slow clock workaround. */ 4184 hf |= B43_HF_PCISCW; /* PCI slow clock workaround. */
4185 hf &= ~B43_HF_SKCFPUP;
4185 b43_hf_write(dev, hf); 4186 b43_hf_write(dev, hf);
4186 4187
4187 b43_set_retry_limits(dev, B43_DEFAULT_SHORT_RETRY_LIMIT, 4188 b43_set_retry_limits(dev, B43_DEFAULT_SHORT_RETRY_LIMIT,
@@ -4404,6 +4405,34 @@ static void b43_op_sta_notify(struct ieee80211_hw *hw,
4404 B43_WARN_ON(!vif || wl->vif != vif); 4405 B43_WARN_ON(!vif || wl->vif != vif);
4405} 4406}
4406 4407
4408static void b43_op_sw_scan_start_notifier(struct ieee80211_hw *hw)
4409{
4410 struct b43_wl *wl = hw_to_b43_wl(hw);
4411 struct b43_wldev *dev;
4412
4413 mutex_lock(&wl->mutex);
4414 dev = wl->current_dev;
4415 if (dev && (b43_status(dev) >= B43_STAT_INITIALIZED)) {
4416 /* Disable CFP update during scan on other channels. */
4417 b43_hf_write(dev, b43_hf_read(dev) | B43_HF_SKCFPUP);
4418 }
4419 mutex_unlock(&wl->mutex);
4420}
4421
4422static void b43_op_sw_scan_complete_notifier(struct ieee80211_hw *hw)
4423{
4424 struct b43_wl *wl = hw_to_b43_wl(hw);
4425 struct b43_wldev *dev;
4426
4427 mutex_lock(&wl->mutex);
4428 dev = wl->current_dev;
4429 if (dev && (b43_status(dev) >= B43_STAT_INITIALIZED)) {
4430 /* Re-enable CFP update. */
4431 b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_SKCFPUP);
4432 }
4433 mutex_unlock(&wl->mutex);
4434}
4435
4407static const struct ieee80211_ops b43_hw_ops = { 4436static const struct ieee80211_ops b43_hw_ops = {
4408 .tx = b43_op_tx, 4437 .tx = b43_op_tx,
4409 .conf_tx = b43_op_conf_tx, 4438 .conf_tx = b43_op_conf_tx,
@@ -4422,6 +4451,8 @@ static const struct ieee80211_ops b43_hw_ops = {
4422 .stop = b43_op_stop, 4451 .stop = b43_op_stop,
4423 .set_tim = b43_op_beacon_set_tim, 4452 .set_tim = b43_op_beacon_set_tim,
4424 .sta_notify = b43_op_sta_notify, 4453 .sta_notify = b43_op_sta_notify,
4454 .sw_scan_start = b43_op_sw_scan_start_notifier,
4455 .sw_scan_complete = b43_op_sw_scan_complete_notifier,
4425}; 4456};
4426 4457
4427/* Hard-reset the chip. Do not call this directly. 4458/* Hard-reset the chip. Do not call this directly.