diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-27 04:43:16 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 10:18:48 -0400 |
commit | 13e0c8e355983cdd4ea7accc3b3208e80944716d (patch) | |
tree | 6bf88d8be21d9a63e76c04f77b4475ac7a14da43 /net/mac80211/mlme.c | |
parent | 1b49de26566e7175e8f2d0934db6d9119f553b56 (diff) |
mac80211: rename sta to new_sta
In ieee80211_prep_connection(), the station (if not NULL)
is the new station (representing the AP) that needs to be
added. Rename the variable to "new_sta" to clarify this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c8465478b4b0..e065ef5f7b2f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3044,7 +3044,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3044 | struct ieee80211_local *local = sdata->local; | 3044 | struct ieee80211_local *local = sdata->local; |
3045 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 3045 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
3046 | struct ieee80211_bss *bss = (void *)cbss->priv; | 3046 | struct ieee80211_bss *bss = (void *)cbss->priv; |
3047 | struct sta_info *sta = NULL; | 3047 | struct sta_info *new_sta = NULL; |
3048 | bool have_sta = false; | 3048 | bool have_sta = false; |
3049 | int err; | 3049 | int err; |
3050 | int ht_cfreq; | 3050 | int ht_cfreq; |
@@ -3063,8 +3063,8 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3063 | } | 3063 | } |
3064 | 3064 | ||
3065 | if (!have_sta) { | 3065 | if (!have_sta) { |
3066 | sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL); | 3066 | new_sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL); |
3067 | if (!sta) | 3067 | if (!new_sta) |
3068 | return -ENOMEM; | 3068 | return -ENOMEM; |
3069 | } | 3069 | } |
3070 | 3070 | ||
@@ -3135,7 +3135,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3135 | local->oper_channel = cbss->channel; | 3135 | local->oper_channel = cbss->channel; |
3136 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | 3136 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); |
3137 | 3137 | ||
3138 | if (sta) { | 3138 | if (new_sta) { |
3139 | u32 rates = 0, basic_rates = 0; | 3139 | u32 rates = 0, basic_rates = 0; |
3140 | bool have_higher_than_11mbit; | 3140 | bool have_higher_than_11mbit; |
3141 | int min_rate = INT_MAX, min_rate_index = -1; | 3141 | int min_rate = INT_MAX, min_rate_index = -1; |
@@ -3160,7 +3160,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3160 | basic_rates = BIT(min_rate_index); | 3160 | basic_rates = BIT(min_rate_index); |
3161 | } | 3161 | } |
3162 | 3162 | ||
3163 | sta->sta.supp_rates[cbss->channel->band] = rates; | 3163 | new_sta->sta.supp_rates[cbss->channel->band] = rates; |
3164 | sdata->vif.bss_conf.basic_rates = basic_rates; | 3164 | sdata->vif.bss_conf.basic_rates = basic_rates; |
3165 | 3165 | ||
3166 | /* cf. IEEE 802.11 9.2.12 */ | 3166 | /* cf. IEEE 802.11 9.2.12 */ |
@@ -3183,10 +3183,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, | |||
3183 | BSS_CHANGED_BEACON_INT); | 3183 | BSS_CHANGED_BEACON_INT); |
3184 | 3184 | ||
3185 | if (assoc) | 3185 | if (assoc) |
3186 | sta_info_pre_move_state(sta, IEEE80211_STA_AUTH); | 3186 | sta_info_pre_move_state(new_sta, IEEE80211_STA_AUTH); |
3187 | 3187 | ||
3188 | err = sta_info_insert(sta); | 3188 | err = sta_info_insert(new_sta); |
3189 | sta = NULL; | 3189 | new_sta = NULL; |
3190 | if (err) { | 3190 | if (err) { |
3191 | sdata_info(sdata, | 3191 | sdata_info(sdata, |
3192 | "failed to insert STA entry for the AP (error %d)\n", | 3192 | "failed to insert STA entry for the AP (error %d)\n", |