aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2010-03-29 14:00:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-08 15:24:07 -0400
commit97ad9139fd68b5c71f44d28d3f9788d89cfd4916 (patch)
treea4b270e9fc7c55a4c6fc4df5e13cf399463fde27 /net/mac80211
parent60ece4047e4870c7be28dcf661162d8312c161e7 (diff)
mac80211: Moved mesh action codes to a more visible location
Grouped mesh action codes together with the other action codes in ieee80211.h. Signed-off-by: Javier Cardona <javier@cozybit.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mesh.c4
-rw-r--r--net/mac80211/mesh.h2
-rw-r--r--net/mac80211/mesh_hwmp.c4
-rw-r--r--net/mac80211/mesh_plink.c2
-rw-r--r--net/mac80211/rx.c6
5 files changed, 8 insertions, 10 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 7a6bebce7f2f..2669fbf8c812 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -600,10 +600,10 @@ static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
600 struct ieee80211_rx_status *rx_status) 600 struct ieee80211_rx_status *rx_status)
601{ 601{
602 switch (mgmt->u.action.category) { 602 switch (mgmt->u.action.category) {
603 case MESH_PLINK_CATEGORY: 603 case WLAN_CATEGORY_MESH_PLINK:
604 mesh_rx_plink_frame(sdata, mgmt, len, rx_status); 604 mesh_rx_plink_frame(sdata, mgmt, len, rx_status);
605 break; 605 break;
606 case MESH_PATH_SEL_CATEGORY: 606 case WLAN_CATEGORY_MESH_PATH_SEL:
607 mesh_rx_path_sel_frame(sdata, mgmt, len); 607 mesh_rx_path_sel_frame(sdata, mgmt, len);
608 break; 608 break;
609 } 609 }
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 85562c59d7d6..c88087f1cd0f 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -209,8 +209,6 @@ struct mesh_rmc {
209#define MESH_MAX_MPATHS 1024 209#define MESH_MAX_MPATHS 1024
210 210
211/* Pending ANA approval */ 211/* Pending ANA approval */
212#define MESH_PLINK_CATEGORY 30
213#define MESH_PATH_SEL_CATEGORY 32
214#define MESH_PATH_SEL_ACTION 0 212#define MESH_PATH_SEL_ACTION 0
215 213
216/* PERR reason codes */ 214/* PERR reason codes */
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index ccff6133e19a..36141d6e701b 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -131,7 +131,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
131 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 131 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
132 /* BSSID == SA */ 132 /* BSSID == SA */
133 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); 133 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
134 mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; 134 mgmt->u.action.category = WLAN_CATEGORY_MESH_PATH_SEL;
135 mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; 135 mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION;
136 136
137 switch (action) { 137 switch (action) {
@@ -224,7 +224,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
224 memcpy(mgmt->da, ra, ETH_ALEN); 224 memcpy(mgmt->da, ra, ETH_ALEN);
225 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 225 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
226 /* BSSID is left zeroed, wildcard value */ 226 /* BSSID is left zeroed, wildcard value */
227 mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; 227 mgmt->u.action.category = WLAN_CATEGORY_MESH_PATH_SEL;
228 mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; 228 mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION;
229 ie_len = 15; 229 ie_len = 15;
230 pos = skb_put(skb, 2 + ie_len); 230 pos = skb_put(skb, 2 + ie_len);
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index bc4e20e57ff5..c384154ac895 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -171,7 +171,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
171 memcpy(mgmt->da, da, ETH_ALEN); 171 memcpy(mgmt->da, da, ETH_ALEN);
172 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); 172 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
173 /* BSSID is left zeroed, wildcard value */ 173 /* BSSID is left zeroed, wildcard value */
174 mgmt->u.action.category = MESH_PLINK_CATEGORY; 174 mgmt->u.action.category = WLAN_CATEGORY_MESH_PLINK;
175 mgmt->u.action.u.plink_action.action_code = action; 175 mgmt->u.action.u.plink_action.action_code = action;
176 176
177 if (action == PLINK_CLOSE) 177 if (action == PLINK_CLOSE)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c0ad7e879a6e..d08ede44ac7e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -490,7 +490,7 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
490 490
491 if (ieee80211_is_action(hdr->frame_control)) { 491 if (ieee80211_is_action(hdr->frame_control)) {
492 mgmt = (struct ieee80211_mgmt *)hdr; 492 mgmt = (struct ieee80211_mgmt *)hdr;
493 if (mgmt->u.action.category != MESH_PLINK_CATEGORY) 493 if (mgmt->u.action.category != WLAN_CATEGORY_MESH_PLINK)
494 return RX_DROP_MONITOR; 494 return RX_DROP_MONITOR;
495 return RX_CONTINUE; 495 return RX_CONTINUE;
496 } 496 }
@@ -1994,8 +1994,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
1994 goto handled; 1994 goto handled;
1995 } 1995 }
1996 break; 1996 break;
1997 case MESH_PLINK_CATEGORY: 1997 case WLAN_CATEGORY_MESH_PLINK:
1998 case MESH_PATH_SEL_CATEGORY: 1998 case WLAN_CATEGORY_MESH_PATH_SEL:
1999 if (ieee80211_vif_is_mesh(&sdata->vif)) 1999 if (ieee80211_vif_is_mesh(&sdata->vif))
2000 return ieee80211_mesh_rx_mgmt(sdata, rx->skb); 2000 return ieee80211_mesh_rx_mgmt(sdata, rx->skb);
2001 break; 2001 break;