mac80211: fix for WDS interfaces
authorBill Jordan <bjordan@rajant.com>
Fri, 1 Oct 2010 15:20:41 +0000 (11:20 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Oct 2010 17:35:25 +0000 (13:35 -0400)
Initialize the rate table for WDS interfaces, and
add cases to allow WDS packets to pass the xmit and receive
tests.

Signed-off-by: Bill Jordan <bjordan@rajant.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/iface.c
net/mac80211/main.c
net/mac80211/rx.c
net/mac80211/tx.c

index 1300e8859ea73c7b960911db15a71b0bd91f490d..438a2f51420e65a2cd58a18d3cec1b5090ce91ae 100644 (file)
@@ -24,6 +24,7 @@
 #include "led.h"
 #include "driver-ops.h"
 #include "wme.h"
+#include "rate.h"
 
 /**
  * DOC: Interface list locking
@@ -311,6 +312,8 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
                        /* STA has been freed */
                        goto err_del_interface;
                }
+
+               rate_control_rate_init(sta);
        }
 
        /*
index 494dba1b46a546c6029e595a6b4b4526523fa435..e127fbb8424ec5d6fa2c9971fe1e1bcf288fcba5 100644 (file)
@@ -201,6 +201,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
                sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
        else if (sdata->vif.type == NL80211_IFTYPE_AP)
                sdata->vif.bss_conf.bssid = sdata->vif.addr;
+       else if (sdata->vif.type == NL80211_IFTYPE_WDS)
+               sdata->vif.bss_conf.bssid = NULL;
        else if (ieee80211_vif_is_mesh(&sdata->vif)) {
                sdata->vif.bss_conf.bssid = zero;
        } else {
@@ -211,6 +213,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
        switch (sdata->vif.type) {
        case NL80211_IFTYPE_AP:
        case NL80211_IFTYPE_ADHOC:
+       case NL80211_IFTYPE_WDS:
        case NL80211_IFTYPE_MESH_POINT:
                break;
        default:
index 0b0e83ebe3d5b9dd589500b1e5e84693f12e4cdb..b3e161ffa4b344eecb8386d8c8c5dd60699a6a54 100644 (file)
@@ -819,6 +819,7 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
        if (unlikely((ieee80211_is_data(hdr->frame_control) ||
                      ieee80211_is_pspoll(hdr->frame_control)) &&
                     rx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
+                    rx->sdata->vif.type != NL80211_IFTYPE_WDS &&
                     (!rx->sta || !test_sta_flags(rx->sta, WLAN_STA_ASSOC)))) {
                if ((!ieee80211_has_fromds(hdr->frame_control) &&
                     !ieee80211_has_tods(hdr->frame_control) &&
index e1733dcb58a73025ba609b2a9919524ec2dd51c0..258fbdbedbdf38290e6fad224b92dfc5eafb1009 100644 (file)
@@ -273,6 +273,9 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
                 */
                return TX_DROP;
 
+       if (tx->sdata->vif.type == NL80211_IFTYPE_WDS)
+               return TX_CONTINUE;
+
        if (tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
                return TX_CONTINUE;