diff options
| author | Johannes Berg <johannes@sipsolutions.net> | 2010-02-19 13:06:54 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:51 -0500 |
| commit | 17f6f054fec57b1bd5c8333bc40b1f3b2b7941aa (patch) | |
| tree | 54ffb37788892dde1552a792b8bbb696f79b051f | |
| parent | 3e60f8607e8072e8b554e9ccb8a4691c580adae4 (diff) | |
p54: convert to new station add/remove callbacks
This converts p54 to use the new station
add/remove callbacks instead of using the
old sta_notify callback.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
| -rw-r--r-- | drivers/net/wireless/p54/main.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c index 3fe6366e567c..4f752a21495f 100644 --- a/drivers/net/wireless/p54/main.c +++ b/drivers/net/wireless/p54/main.c | |||
| @@ -33,21 +33,29 @@ MODULE_DESCRIPTION("Softmac Prism54 common code"); | |||
| 33 | MODULE_LICENSE("GPL"); | 33 | MODULE_LICENSE("GPL"); |
| 34 | MODULE_ALIAS("prism54common"); | 34 | MODULE_ALIAS("prism54common"); |
| 35 | 35 | ||
| 36 | static int p54_sta_add_remove(struct ieee80211_hw *hw, | ||
| 37 | struct ieee80211_vif *vif, | ||
| 38 | struct ieee80211_sta *sta) | ||
| 39 | { | ||
| 40 | struct p54_common *priv = hw->priv; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Notify the firmware that we don't want or we don't | ||
| 44 | * need to buffer frames for this station anymore. | ||
| 45 | */ | ||
| 46 | |||
| 47 | p54_sta_unlock(priv, sta->addr); | ||
| 48 | |||
| 49 | return 0; | ||
| 50 | } | ||
| 51 | |||
| 36 | static void p54_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif, | 52 | static void p54_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif, |
| 37 | enum sta_notify_cmd notify_cmd, | 53 | enum sta_notify_cmd notify_cmd, |
| 38 | struct ieee80211_sta *sta) | 54 | struct ieee80211_sta *sta) |
| 39 | { | 55 | { |
| 40 | struct p54_common *priv = dev->priv; | 56 | struct p54_common *priv = dev->priv; |
| 41 | switch (notify_cmd) { | ||
| 42 | case STA_NOTIFY_ADD: | ||
| 43 | case STA_NOTIFY_REMOVE: | ||
| 44 | /* | ||
| 45 | * Notify the firmware that we don't want or we don't | ||
| 46 | * need to buffer frames for this station anymore. | ||
| 47 | */ | ||
| 48 | 57 | ||
| 49 | p54_sta_unlock(priv, sta->addr); | 58 | switch (notify_cmd) { |
| 50 | break; | ||
| 51 | case STA_NOTIFY_AWAKE: | 59 | case STA_NOTIFY_AWAKE: |
| 52 | /* update the firmware's filter table */ | 60 | /* update the firmware's filter table */ |
| 53 | p54_sta_unlock(priv, sta->addr); | 61 | p54_sta_unlock(priv, sta->addr); |
| @@ -506,6 +514,8 @@ static const struct ieee80211_ops p54_ops = { | |||
| 506 | .remove_interface = p54_remove_interface, | 514 | .remove_interface = p54_remove_interface, |
| 507 | .set_tim = p54_set_tim, | 515 | .set_tim = p54_set_tim, |
| 508 | .sta_notify = p54_sta_notify, | 516 | .sta_notify = p54_sta_notify, |
| 517 | .sta_add = p54_sta_add_remove, | ||
| 518 | .sta_remove = p54_sta_add_remove, | ||
| 509 | .set_key = p54_set_key, | 519 | .set_key = p54_set_key, |
| 510 | .config = p54_config, | 520 | .config = p54_config, |
| 511 | .bss_info_changed = p54_bss_info_changed, | 521 | .bss_info_changed = p54_bss_info_changed, |
