b43/legacy: port to cfg80211 rfkill
This ports the b43/legacy rfkill code to the new API offered by cfg80211 and thus removes a lot of useless stuff. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
e6a3b61681
commit
f41f3f373d
@@ -3431,11 +3431,6 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
|
||||
struct b43legacy_wldev *dev = wl->current_dev;
|
||||
int did_init = 0;
|
||||
int err = 0;
|
||||
bool do_rfkill_exit = 0;
|
||||
|
||||
/* First register RFkill.
|
||||
* LEDs that are registered later depend on it. */
|
||||
b43legacy_rfkill_init(dev);
|
||||
|
||||
/* Kill all old instance specific information to make sure
|
||||
* the card won't use it in the short timeframe between start
|
||||
@@ -3451,10 +3446,8 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
|
||||
|
||||
if (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) {
|
||||
err = b43legacy_wireless_core_init(dev);
|
||||
if (err) {
|
||||
do_rfkill_exit = 1;
|
||||
if (err)
|
||||
goto out_mutex_unlock;
|
||||
}
|
||||
did_init = 1;
|
||||
}
|
||||
|
||||
@@ -3463,17 +3456,15 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
|
||||
if (err) {
|
||||
if (did_init)
|
||||
b43legacy_wireless_core_exit(dev);
|
||||
do_rfkill_exit = 1;
|
||||
goto out_mutex_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
wiphy_rfkill_start_polling(hw->wiphy);
|
||||
|
||||
out_mutex_unlock:
|
||||
mutex_unlock(&wl->mutex);
|
||||
|
||||
if (do_rfkill_exit)
|
||||
b43legacy_rfkill_exit(dev);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -3482,7 +3473,6 @@ static void b43legacy_op_stop(struct ieee80211_hw *hw)
|
||||
struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
|
||||
struct b43legacy_wldev *dev = wl->current_dev;
|
||||
|
||||
b43legacy_rfkill_exit(dev);
|
||||
cancel_work_sync(&(wl->beacon_update_trigger));
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -3518,6 +3508,7 @@ static const struct ieee80211_ops b43legacy_hw_ops = {
|
||||
.start = b43legacy_op_start,
|
||||
.stop = b43legacy_op_stop,
|
||||
.set_tim = b43legacy_op_beacon_set_tim,
|
||||
.rfkill_poll = b43legacy_rfkill_poll,
|
||||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
|
Reference in New Issue
Block a user