Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3864

kernel-2.6.18-194.11.1.el5.src.rpm

From: John W. Linville <linville@redhat.com>
Date: Tue, 5 May 2009 14:32:36 -0400
Subject: [wireless] mac80211: scanning related fixes
Message-id: 20090505183236.GC16010@redhat.com
O-Subject: [RHEL5.4 PATCH] mac80211: scanning related fixes
Bugzilla: 498719

Dan Williams has been working with IBM on some stability issues
relating to RHEL and Fedora on IBM's wireless networks.  As part of
this work, Dan has identified and back-ported a couple of upstream
patches for RHEL5.  Dan is requesting these be included in 5.4,
and I have no objection to that.

BZ498719

author    Johannes Berg <johannes@sipsolutions.net>  Fri, 19 Sep 2008 03:10:34 +0000 (05:10 +0200)
committer John W. Linville <linville@tuxdriver.com>  Wed, 24 Sep 2008 20:18:03 +0000 (16:18 -0400)
commit	4dfe51e10047a60e82734860cec0d9f660b102fc

mac80211: probe with correct SSID

While associated, we should probe with the SSID we're associated to,
not the scan SSID.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b34148c..630e384 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1003,8 +1003,8 @@ static void ieee80211_associated(struct net_device *dev,
 				sta_info_unlink(&sta);
 			} else
 				ieee80211_send_probe_req(dev, ifsta->bssid,
-							 local->scan_ssid,
-							 local->scan_ssid_len);
+							 ifsta->ssid,
+							 ifsta->ssid_len);
 			ifsta->flags ^= IEEE80211_STA_PROBEREQ_POLL;
 		} else {
 			ifsta->flags &= ~IEEE80211_STA_PROBEREQ_POLL;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 636fdd1..d8b9ced 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -238,18 +238,16 @@ static int inline is_ieee80211_device(struct net_device *dev,
 static ieee80211_tx_result
 ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
 {
-#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
 	struct sk_buff *skb = tx->skb;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
 	u32 sta_flags;
 
 	if (unlikely(tx->flags & IEEE80211_TX_INJECTED))
 		return TX_CONTINUE;
 
 	if (unlikely(tx->local->sta_sw_scanning) &&
-	    ((tx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT ||
-	     (tx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_PROBE_REQ))
+	    !ieee80211_is_probe_req(hdr->frame_control) &&
+	    !ieee80211_is_nullfunc(hdr->frame_control))
 		return TX_DROP;
 
 	if (tx->sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT)