mac80211: Moved mesh action codes to a more visible location
authorJavier Cardona <javier@cozybit.com>
Mon, 29 Mar 2010 18:00:21 +0000 (11:00 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 8 Apr 2010 19:24:07 +0000 (15:24 -0400)
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>
include/linux/ieee80211.h
net/mac80211/mesh.c
net/mac80211/mesh.h
net/mac80211/mesh_hwmp.c
net/mac80211/mesh_plink.c
net/mac80211/rx.c

index e9e03b02cb08cc655528c0b7622ff5cf64f843fe..1252ba1fbff535151aaf41aca7a07063264e8d64 100644 (file)
@@ -1211,6 +1211,8 @@ enum ieee80211_category {
        WLAN_CATEGORY_SA_QUERY = 8,
        WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
        WLAN_CATEGORY_WMM = 17,
+       WLAN_CATEGORY_MESH_PLINK = 30,          /* Pending ANA approval */
+       WLAN_CATEGORY_MESH_PATH_SEL = 32,       /* Pending ANA approval */
        WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
        WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
 };
index 7a6bebce7f2fa5b5a11d98322bf21565d85aa657..2669fbf8c812a988929227ab0481c2e3450f79f3 100644 (file)
@@ -600,10 +600,10 @@ static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
                                          struct ieee80211_rx_status *rx_status)
 {
        switch (mgmt->u.action.category) {
-       case MESH_PLINK_CATEGORY:
+       case WLAN_CATEGORY_MESH_PLINK:
                mesh_rx_plink_frame(sdata, mgmt, len, rx_status);
                break;
-       case MESH_PATH_SEL_CATEGORY:
+       case WLAN_CATEGORY_MESH_PATH_SEL:
                mesh_rx_path_sel_frame(sdata, mgmt, len);
                break;
        }
index 85562c59d7d68bd656fdd1ca00f6129b8adefe8c..c88087f1cd0ff79a4a5f28c57f2626d5c7ce8eac 100644 (file)
@@ -209,8 +209,6 @@ struct mesh_rmc {
 #define MESH_MAX_MPATHS                1024
 
 /* Pending ANA approval */
-#define MESH_PLINK_CATEGORY    30
-#define MESH_PATH_SEL_CATEGORY 32
 #define MESH_PATH_SEL_ACTION   0
 
 /* PERR reason codes */
index ccff6133e19a917ce28e8790851cb5d72b273d29..36141d6e701ba0932ff69ed180d62172780e4651 100644 (file)
@@ -131,7 +131,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
        memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
        /* BSSID == SA */
        memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
-       mgmt->u.action.category = MESH_PATH_SEL_CATEGORY;
+       mgmt->u.action.category = WLAN_CATEGORY_MESH_PATH_SEL;
        mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION;
 
        switch (action) {
@@ -224,7 +224,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
        memcpy(mgmt->da, ra, ETH_ALEN);
        memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
        /* BSSID is left zeroed, wildcard value */
-       mgmt->u.action.category = MESH_PATH_SEL_CATEGORY;
+       mgmt->u.action.category = WLAN_CATEGORY_MESH_PATH_SEL;
        mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION;
        ie_len = 15;
        pos = skb_put(skb, 2 + ie_len);
index bc4e20e57ff566e0d67d7c3ad7f4347094ad1c55..c384154ac89506d3b153792c1440909d9abb78ca 100644 (file)
@@ -171,7 +171,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
        memcpy(mgmt->da, da, ETH_ALEN);
        memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
        /* BSSID is left zeroed, wildcard value */
-       mgmt->u.action.category = MESH_PLINK_CATEGORY;
+       mgmt->u.action.category = WLAN_CATEGORY_MESH_PLINK;
        mgmt->u.action.u.plink_action.action_code = action;
 
        if (action == PLINK_CLOSE)
index c0ad7e879a6ee4a88b5f2106d525df69c5e96fa4..d08ede44ac7e6346f004514418d6a732b7c808da 100644 (file)
@@ -490,7 +490,7 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
 
                if (ieee80211_is_action(hdr->frame_control)) {
                        mgmt = (struct ieee80211_mgmt *)hdr;
-                       if (mgmt->u.action.category != MESH_PLINK_CATEGORY)
+                       if (mgmt->u.action.category != WLAN_CATEGORY_MESH_PLINK)
                                return RX_DROP_MONITOR;
                        return RX_CONTINUE;
                }
@@ -1994,8 +1994,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
                        goto handled;
                }
                break;
-       case MESH_PLINK_CATEGORY:
-       case MESH_PATH_SEL_CATEGORY:
+       case WLAN_CATEGORY_MESH_PLINK:
+       case WLAN_CATEGORY_MESH_PATH_SEL:
                if (ieee80211_vif_is_mesh(&sdata->vif))
                        return ieee80211_mesh_rx_mgmt(sdata, rx->skb);
                break;