diff options
author | Javier Cardona <javier@cozybit.com> | 2011-05-03 19:57:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-11 14:44:46 -0400 |
commit | 9c3990aaec0ad9f686ef6480f6861f2df89b2a7a (patch) | |
tree | 5e073ffce0ce0aed45e9dfeb9f41efc140c770f7 /net/mac80211 | |
parent | 0a35d36d6f019bde6c98812456798275b02e5aee (diff) |
nl80211: Let userspace drive the peer link management states.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 30 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 23 |
2 files changed, 21 insertions, 32 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 18c2555e04e6..51f775772d9e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -734,15 +734,27 @@ static void sta_apply_parameters(struct ieee80211_local *local, | |||
734 | params->ht_capa, | 734 | params->ht_capa, |
735 | &sta->sta.ht_cap); | 735 | &sta->sta.ht_cap); |
736 | 736 | ||
737 | if (ieee80211_vif_is_mesh(&sdata->vif) && params->plink_action) { | 737 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
738 | switch (params->plink_action) { | 738 | if (sdata->u.mesh.security & IEEE80211_MESH_SEC_SECURED) |
739 | case PLINK_ACTION_OPEN: | 739 | switch (params->plink_state) { |
740 | mesh_plink_open(sta); | 740 | case PLINK_LISTEN: |
741 | break; | 741 | case PLINK_ESTAB: |
742 | case PLINK_ACTION_BLOCK: | 742 | case PLINK_BLOCKED: |
743 | mesh_plink_block(sta); | 743 | sta->plink_state = params->plink_state; |
744 | break; | 744 | break; |
745 | } | 745 | default: |
746 | /* nothing */ | ||
747 | break; | ||
748 | } | ||
749 | else | ||
750 | switch (params->plink_action) { | ||
751 | case PLINK_ACTION_OPEN: | ||
752 | mesh_plink_open(sta); | ||
753 | break; | ||
754 | case PLINK_ACTION_BLOCK: | ||
755 | mesh_plink_block(sta); | ||
756 | break; | ||
757 | } | ||
746 | } | 758 | } |
747 | } | 759 | } |
748 | 760 | ||
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index af1a7f8c8675..f00b4dcb49d7 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -174,29 +174,6 @@ struct sta_ampdu_mlme { | |||
174 | 174 | ||
175 | 175 | ||
176 | /** | 176 | /** |
177 | * enum plink_state - state of a mesh peer link finite state machine | ||
178 | * | ||
179 | * @PLINK_LISTEN: initial state, considered the implicit state of non existant | ||
180 | * mesh peer links | ||
181 | * @PLINK_OPN_SNT: mesh plink open frame has been sent to this mesh peer | ||
182 | * @PLINK_OPN_RCVD: mesh plink open frame has been received from this mesh peer | ||
183 | * @PLINK_CNF_RCVD: mesh plink confirm frame has been received from this mesh | ||
184 | * peer | ||
185 | * @PLINK_ESTAB: mesh peer link is established | ||
186 | * @PLINK_HOLDING: mesh peer link is being closed or cancelled | ||
187 | * @PLINK_BLOCKED: all frames transmitted from this mesh plink are discarded | ||
188 | */ | ||
189 | enum plink_state { | ||
190 | PLINK_LISTEN, | ||
191 | PLINK_OPN_SNT, | ||
192 | PLINK_OPN_RCVD, | ||
193 | PLINK_CNF_RCVD, | ||
194 | PLINK_ESTAB, | ||
195 | PLINK_HOLDING, | ||
196 | PLINK_BLOCKED | ||
197 | }; | ||
198 | |||
199 | /** | ||
200 | * struct sta_info - STA information | 177 | * struct sta_info - STA information |
201 | * | 178 | * |
202 | * This structure collects information about a station that | 179 | * This structure collects information about a station that |