mac80211: Drop MESH_PLINK category and use new ANA-approved MESH_ACTION
authorJavier Cardona <javier@cozybit.com>
Tue, 3 May 2011 23:57:09 +0000 (16:57 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 May 2011 18:37:47 +0000 (14:37 -0400)
Note: This breaks compatibility with previous mesh protocol instances.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/linux/ieee80211.h
net/mac80211/mesh.c
net/mac80211/mesh_plink.c
net/mac80211/rx.c

index 79690b7106653c6a03a5f5c10cc4d333552176fe..ee1c96a866ccd62c9edda0fae4e26ee562d28413 100644 (file)
@@ -1261,9 +1261,8 @@ enum ieee80211_category {
        WLAN_CATEGORY_MULTIHOP_ACTION = 14,
        WLAN_CATEGORY_SELF_PROTECTED = 15,
        WLAN_CATEGORY_WMM = 17,
-       /* TODO: remove MESH_PLINK and MESH_PATH_SEL after */
-       /*       mesh is updated to current 802.11s draft  */
-       WLAN_CATEGORY_MESH_PLINK = 30,
+       /* TODO: remove MESH_PATH_SEL after mesh is updated
+        * to current 802.11s draft  */
        WLAN_CATEGORY_MESH_PATH_SEL = 32,
        WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
        WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
index 2a59eb3451318429b3dce29054c232b486ee68a6..75378e852f00081fb5b818d7526dd8abfacc8eaf 100644 (file)
@@ -600,7 +600,7 @@ 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 WLAN_CATEGORY_MESH_PLINK:
+       case WLAN_CATEGORY_MESH_ACTION:
                mesh_rx_plink_frame(sdata, mgmt, len, rx_status);
                break;
        case WLAN_CATEGORY_MESH_PATH_SEL:
index 87abf8deb369a52f7d513fe738a53a786d602a69..0120e9e362862e8fcdd1512ecd56a062a2894160 100644 (file)
@@ -182,7 +182,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 = WLAN_CATEGORY_MESH_PLINK;
+       mgmt->u.action.category = WLAN_CATEGORY_MESH_ACTION;
        mgmt->u.action.u.plink_action.action_code = action;
 
        if (action == PLINK_CLOSE)
index 81241e18f3a4535da4c0b2f321df3122102edb67..634f3d97a27962f89fecb9172410ebe40132922c 100644 (file)
@@ -495,8 +495,11 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
                        return RX_DROP_MONITOR;
 
                if (ieee80211_is_action(hdr->frame_control)) {
+                       u8 category;
                        mgmt = (struct ieee80211_mgmt *)hdr;
-                       if (mgmt->u.action.category != WLAN_CATEGORY_MESH_PLINK)
+                       category = mgmt->u.action.category;
+                       if (category != WLAN_CATEGORY_MESH_ACTION &&
+                               category != WLAN_CATEGORY_SELF_PROTECTED)
                                return RX_DROP_MONITOR;
                        return RX_CONTINUE;
                }
@@ -2205,7 +2208,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
                        goto handled;
                }
                break;
-       case WLAN_CATEGORY_MESH_PLINK:
+       case WLAN_CATEGORY_MESH_ACTION:
                if (!ieee80211_vif_is_mesh(&sdata->vif))
                        break;
                goto queue;