mac80211: Modify mesh_set_ht_prot_mode() to have less identation

Determining types of peers is modified to have less indentation. This change is
suggested by Johannes. This patch also corrects the reference in comment to
IEEE 802.11-2012 version.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Ashok Nagarajan 2012-05-07 21:00:31 -07:00 committed by John W. Linville
parent 0e482db8d3
commit cbf9322eb1

View file

@ -105,15 +105,15 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
return sta; return sta;
} }
/** mesh_set_ht_prot_mode - set correct HT protection mode /*
* mesh_set_ht_prot_mode - set correct HT protection mode
* *
* Section 9.23.3.5 of IEEE 80211s standard describes the protection rules for * Section 9.23.3.5 of IEEE 80211-2012 describes the protection rules for HT
* HT mesh STA in a MBSS. Three HT protection modes are supported for now, * mesh STA in a MBSS. Three HT protection modes are supported for now, non-HT
* non-HT mixed mode, 20MHz-protection and no-protection mode. non-HT mixed * mixed mode, 20MHz-protection and no-protection mode. non-HT mixed mode is
* mode is selected if any non-HT peers are present in our MBSS. * selected if any non-HT peers are present in our MBSS. 20MHz-protection mode
* 20MHz-protection mode is selected if all peers in our 20/40MHz MBSS support * is selected if all peers in our 20/40MHz MBSS support HT and atleast one
* HT and atleast one HT20 peer is present. Otherwise no-protection mode is * HT20 peer is present. Otherwise no-protection mode is selected.
* selected.
*/ */
static u32 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata) static u32 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata)
{ {
@ -128,8 +128,10 @@ static u32 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata)
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(sta, &local->sta_list, list) { list_for_each_entry_rcu(sta, &local->sta_list, list) {
if (sdata == sta->sdata && if (sdata != sta->sdata ||
sta->plink_state == NL80211_PLINK_ESTAB) { sta->plink_state != NL80211_PLINK_ESTAB)
continue;
switch (sta->ch_type) { switch (sta->ch_type) {
case NL80211_CHAN_NO_HT: case NL80211_CHAN_NO_HT:
mpl_dbg("mesh_plink %pM: nonHT sta (%pM) is present", mpl_dbg("mesh_plink %pM: nonHT sta (%pM) is present",
@ -144,7 +146,6 @@ static u32 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata)
break; break;
} }
} }
}
out: out:
rcu_read_unlock(); rcu_read_unlock();