mac80211: fix WPA auth on WDS station interfaces (#9227)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 12 Apr 2011 17:17:56 +0000 (17:17 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 12 Apr 2011 17:17:56 +0000 (17:17 +0000)
SVN-Revision: 26609

package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/551-mac80211_fix_iftype_wds.patch
package/mac80211/patches/552-mac80211_enable_iftype_wds_aggregation.patch

index cf4272d92bbee7048dc3552ee0dee9b8f6885022..74acba566eed212cf6987dfa6fc7fdf3505ee491 100644 (file)
        if (ieee80211_has_a4(hdr->frame_control) &&
            sdata->vif.type == NL80211_IFTYPE_AP_VLAN && !sdata->u.vlan.sta)
                return -1;
-@@ -1611,12 +1612,16 @@ __ieee80211_data_to_8023(struct ieee8021
+@@ -1611,11 +1612,13 @@ __ieee80211_data_to_8023(struct ieee8021
                return -1;
  
        ret = ieee80211_data_to_8023(rx->skb, sdata->vif.addr, sdata->vif.type);
  
        ehdr = (struct ethhdr *) rx->skb->data;
 -      if (ehdr->h_proto != rx->sdata->control_port_protocol)
--              return -1;
-+      if (ehdr->h_proto == rx->sdata->control_port_protocol) {
++      if (ehdr->h_proto == rx->sdata->control_port_protocol)
 +              *port_control = true;
-+
-+              if (check_port_control)
-+                      return -1;
-+      }
++      else if (check_port_control)
+               return -1;
  
        return 0;
- }
-@@ -1916,6 +1921,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
+@@ -1916,6 +1919,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
        struct net_device *dev = sdata->dev;
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
        __le16 fc = hdr->frame_control;
        int err;
  
        if (unlikely(!ieee80211_is_data(hdr->frame_control)))
-@@ -1932,13 +1938,21 @@ ieee80211_rx_h_data(struct ieee80211_rx_
+@@ -1932,13 +1936,21 @@ ieee80211_rx_h_data(struct ieee80211_rx_
            sdata->vif.type == NL80211_IFTYPE_AP)
                return RX_DROP_MONITOR;
  
index 693cdd29103b815e8ccd7a94aa8fd85bce9560f7..e779ad3648809afdcdf05394263382eab97c117e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -2330,13 +2330,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
+@@ -2328,13 +2328,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
  
        if (!ieee80211_vif_is_mesh(&sdata->vif) &&
            sdata->vif.type != NL80211_IFTYPE_ADHOC &&
@@ -17,7 +17,7 @@
                break;
        case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
        case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
-@@ -2716,7 +2717,10 @@ static int prepare_for_handlers(struct i
+@@ -2714,7 +2715,10 @@ static int prepare_for_handlers(struct i
                }
                break;
        case NL80211_IFTYPE_WDS:
index 953ff59f483b6fca4f71db099cb852cb91be32bd..e17194698983970da837249fbaeee8fbbe6a52d8 100644 (file)
@@ -33,7 +33,7 @@
                                          IEEE80211_STYPE_ACTION);
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -2132,7 +2132,8 @@ ieee80211_rx_h_action(struct ieee80211_r
+@@ -2130,7 +2130,8 @@ ieee80211_rx_h_action(struct ieee80211_r
                 */
                if (sdata->vif.type != NL80211_IFTYPE_STATION &&
                    sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
@@ -43,7 +43,7 @@
                        break;
  
                /* verify action_code is present */
-@@ -2717,13 +2718,16 @@ static int prepare_for_handlers(struct i
+@@ -2715,13 +2716,16 @@ static int prepare_for_handlers(struct i
                }
                break;
        case NL80211_IFTYPE_WDS: