diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 93ee1fd5c08d..14e1f4015a72 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -150,7 +150,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, | |||
150 | rcu_read_lock(); | 150 | rcu_read_lock(); |
151 | 151 | ||
152 | if (mac_addr) { | 152 | if (mac_addr) { |
153 | sta = sta_info_get(sdata->local, mac_addr); | 153 | sta = sta_info_get(sdata, mac_addr); |
154 | if (!sta) { | 154 | if (!sta) { |
155 | ieee80211_key_free(key); | 155 | ieee80211_key_free(key); |
156 | err = -ENOENT; | 156 | err = -ENOENT; |
@@ -181,7 +181,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, | |||
181 | if (mac_addr) { | 181 | if (mac_addr) { |
182 | ret = -ENOENT; | 182 | ret = -ENOENT; |
183 | 183 | ||
184 | sta = sta_info_get(sdata->local, mac_addr); | 184 | sta = sta_info_get(sdata, mac_addr); |
185 | if (!sta) | 185 | if (!sta) |
186 | goto out_unlock; | 186 | goto out_unlock; |
187 | 187 | ||
@@ -228,7 +228,7 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, | |||
228 | rcu_read_lock(); | 228 | rcu_read_lock(); |
229 | 229 | ||
230 | if (mac_addr) { | 230 | if (mac_addr) { |
231 | sta = sta_info_get(sdata->local, mac_addr); | 231 | sta = sta_info_get(sdata, mac_addr); |
232 | if (!sta) | 232 | if (!sta) |
233 | goto out; | 233 | goto out; |
234 | 234 | ||
@@ -414,15 +414,13 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, | |||
414 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, | 414 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, |
415 | u8 *mac, struct station_info *sinfo) | 415 | u8 *mac, struct station_info *sinfo) |
416 | { | 416 | { |
417 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 417 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
418 | struct sta_info *sta; | 418 | struct sta_info *sta; |
419 | int ret = -ENOENT; | 419 | int ret = -ENOENT; |
420 | 420 | ||
421 | rcu_read_lock(); | 421 | rcu_read_lock(); |
422 | 422 | ||
423 | /* XXX: verify sta->dev == dev */ | 423 | sta = sta_info_get(sdata, mac); |
424 | |||
425 | sta = sta_info_get(local, mac); | ||
426 | if (sta) { | 424 | if (sta) { |
427 | ret = 0; | 425 | ret = 0; |
428 | sta_set_sinfo(sta, sinfo); | 426 | sta_set_sinfo(sta, sinfo); |
@@ -778,8 +776,7 @@ static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev, | |||
778 | if (mac) { | 776 | if (mac) { |
779 | rcu_read_lock(); | 777 | rcu_read_lock(); |
780 | 778 | ||
781 | /* XXX: get sta belonging to dev */ | 779 | sta = sta_info_get(sdata, mac); |
782 | sta = sta_info_get(local, mac); | ||
783 | if (!sta) { | 780 | if (!sta) { |
784 | rcu_read_unlock(); | 781 | rcu_read_unlock(); |
785 | return -ENOENT; | 782 | return -ENOENT; |
@@ -800,14 +797,14 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
800 | u8 *mac, | 797 | u8 *mac, |
801 | struct station_parameters *params) | 798 | struct station_parameters *params) |
802 | { | 799 | { |
800 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
803 | struct ieee80211_local *local = wiphy_priv(wiphy); | 801 | struct ieee80211_local *local = wiphy_priv(wiphy); |
804 | struct sta_info *sta; | 802 | struct sta_info *sta; |
805 | struct ieee80211_sub_if_data *vlansdata; | 803 | struct ieee80211_sub_if_data *vlansdata; |
806 | 804 | ||
807 | rcu_read_lock(); | 805 | rcu_read_lock(); |
808 | 806 | ||
809 | /* XXX: get sta belonging to dev */ | 807 | sta = sta_info_get(sdata, mac); |
810 | sta = sta_info_get(local, mac); | ||
811 | if (!sta) { | 808 | if (!sta) { |
812 | rcu_read_unlock(); | 809 | rcu_read_unlock(); |
813 | return -ENOENT; | 810 | return -ENOENT; |
@@ -846,7 +843,6 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
846 | static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev, | 843 | static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev, |
847 | u8 *dst, u8 *next_hop) | 844 | u8 *dst, u8 *next_hop) |
848 | { | 845 | { |
849 | struct ieee80211_local *local = wiphy_priv(wiphy); | ||
850 | struct ieee80211_sub_if_data *sdata; | 846 | struct ieee80211_sub_if_data *sdata; |
851 | struct mesh_path *mpath; | 847 | struct mesh_path *mpath; |
852 | struct sta_info *sta; | 848 | struct sta_info *sta; |
@@ -855,7 +851,7 @@ static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev, | |||
855 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 851 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
856 | 852 | ||
857 | rcu_read_lock(); | 853 | rcu_read_lock(); |
858 | sta = sta_info_get(local, next_hop); | 854 | sta = sta_info_get(sdata, next_hop); |
859 | if (!sta) { | 855 | if (!sta) { |
860 | rcu_read_unlock(); | 856 | rcu_read_unlock(); |
861 | return -ENOENT; | 857 | return -ENOENT; |
@@ -894,7 +890,6 @@ static int ieee80211_change_mpath(struct wiphy *wiphy, | |||
894 | struct net_device *dev, | 890 | struct net_device *dev, |
895 | u8 *dst, u8 *next_hop) | 891 | u8 *dst, u8 *next_hop) |
896 | { | 892 | { |
897 | struct ieee80211_local *local = wiphy_priv(wiphy); | ||
898 | struct ieee80211_sub_if_data *sdata; | 893 | struct ieee80211_sub_if_data *sdata; |
899 | struct mesh_path *mpath; | 894 | struct mesh_path *mpath; |
900 | struct sta_info *sta; | 895 | struct sta_info *sta; |
@@ -903,7 +898,7 @@ static int ieee80211_change_mpath(struct wiphy *wiphy, | |||
903 | 898 | ||
904 | rcu_read_lock(); | 899 | rcu_read_lock(); |
905 | 900 | ||
906 | sta = sta_info_get(local, next_hop); | 901 | sta = sta_info_get(sdata, next_hop); |
907 | if (!sta) { | 902 | if (!sta) { |
908 | rcu_read_unlock(); | 903 | rcu_read_unlock(); |
909 | return -ENOENT; | 904 | return -ENOENT; |