rpms/kernel/F-7 0001-mac80211-store-channel-info-in-sta_bss_list.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.3317.2.1, 1.3317.2.2 0001-mac80211-store-freq-info-in-sta_bss_list.patch, 1.1.2.1, NONE
John W. Linville (linville)
fedora-extras-commits at redhat.com
Fri Aug 17 20:37:29 UTC 2007
- Previous message: rpms/python-kiwi/devel .cvsignore, 1.7, 1.8 python-kiwi.spec, 1.9, 1.10 sources, 1.7, 1.8
- Next message: rpms/python-pgsql/F-7 .cvsignore, 1.2, 1.3 python-pgsql.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: linville
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14723
Modified Files:
Tag: private-linville-bz250913-branch
kernel-2.6.spec
Added Files:
Tag: private-linville-bz250913-branch
0001-mac80211-store-channel-info-in-sta_bss_list.patch
Removed Files:
Tag: private-linville-bz250913-branch
0001-mac80211-store-freq-info-in-sta_bss_list.patch
Log Message:
try channel instead of freq (which is subject to some manipulation)
0001-mac80211-store-channel-info-in-sta_bss_list.patch:
--- NEW FILE 0001-mac80211-store-channel-info-in-sta_bss_list.patch ---
>From 3355f033f018d62342337d43153307dd926c3fe9 Mon Sep 17 00:00:00 2001
From: John W. Linville <linville at linville-tester.local>
Date: Fri, 17 Aug 2007 16:23:56 -0400
Subject: [PATCH] [PATCH] mac80211: store channel info in sta_bss_list
Some AP equipment "in the wild" uses the same BSSID on multiple
channels (particularly "a" vs. "b/g"). This changes the key of
the sta_bss_list to include both the BSSID and the channel so as
to prevent a BSSID on one channel from eclipsing the same BSSID on
another channel.
Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
net/mac80211/ieee80211_sta.c | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index b996332..b5edbcd 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -64,7 +64,7 @@
static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst,
u8 *ssid, size_t ssid_len);
static struct ieee80211_sta_bss *
-ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid);
+ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid, int channel);
static void ieee80211_rx_bss_put(struct net_device *dev,
struct ieee80211_sta_bss *bss);
static int ieee80211_sta_find_ibss(struct net_device *dev,
@@ -446,6 +446,7 @@ static void ieee80211_sta_send_associnfo(struct net_device *dev,
static void ieee80211_set_associated(struct net_device *dev,
struct ieee80211_if_sta *ifsta, int assoc)
{
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
union iwreq_data wrqu;
if (ifsta->associated == assoc)
@@ -460,7 +461,8 @@ static void ieee80211_set_associated(struct net_device *dev,
if (sdata->type != IEEE80211_IF_TYPE_STA)
return;
- bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
+ bss = ieee80211_rx_bss_get(dev, ifsta->bssid,
+ local->hw.conf.channel);
if (bss) {
if (bss->has_erp_value)
ieee80211_handle_erp_ie(dev, bss->erp_value);
@@ -603,7 +605,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME |
WLAN_CAPABILITY_SHORT_PREAMBLE;
}
- bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
+ bss = ieee80211_rx_bss_get(dev, ifsta->bssid, local->hw.conf.channel);
if (bss) {
if (bss->capability & WLAN_CAPABILITY_PRIVACY)
capab |= WLAN_CAPABILITY_PRIVACY;
@@ -1165,6 +1167,7 @@ void ieee80211_send_dls_teardown(struct net_device *dev,
static int ieee80211_privacy_mismatch(struct net_device *dev,
struct ieee80211_if_sta *ifsta)
{
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sta_bss *bss;
int res = 0;
@@ -1172,7 +1175,7 @@ static int ieee80211_privacy_mismatch(struct net_device *dev,
ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
return 0;
- bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
+ bss = ieee80211_rx_bss_get(dev, ifsta->bssid, local->hw.conf.channel);
if (!bss)
return 0;
@@ -1682,7 +1685,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
* update our stored copy */
if (elems.erp_info && elems.erp_info_len >= 1) {
struct ieee80211_sta_bss *bss
- = ieee80211_rx_bss_get(dev, ifsta->bssid);
+ = ieee80211_rx_bss_get(dev, ifsta->bssid,
+ local->hw.conf.channel);
if (bss) {
bss->erp_value = elems.erp_info[0];
bss->has_erp_value = 1;
@@ -1712,7 +1716,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
" AP\n", dev->name);
return;
}
- bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
+ bss = ieee80211_rx_bss_get(dev, ifsta->bssid,
+ local->hw.conf.channel);
if (bss) {
sta->last_rssi = bss->rssi;
sta->last_signal = bss->signal;
@@ -2060,7 +2065,7 @@ static void __ieee80211_rx_bss_hash_del(struct net_device *dev,
static struct ieee80211_sta_bss *
-ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid)
+ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid, int channel)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sta_bss *bss;
@@ -2071,6 +2076,7 @@ ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid)
atomic_inc(&bss->users);
atomic_inc(&bss->users);
memcpy(bss->bssid, bssid, ETH_ALEN);
+ bss->channel = channel;
spin_lock_bh(&local->sta_bss_lock);
/* TODO: order by RSSI? */
@@ -2082,7 +2088,7 @@ ieee80211_rx_bss_add(struct net_device *dev, u8 *bssid)
static struct ieee80211_sta_bss *
-ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid)
+ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid, int channel)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sta_bss *bss;
@@ -2090,7 +2096,8 @@ ieee80211_rx_bss_get(struct net_device *dev, u8 *bssid)
spin_lock_bh(&local->sta_bss_lock);
bss = local->sta_bss_hash[STA_HASH(bssid)];
while (bss) {
- if (memcmp(bss->bssid, bssid, ETH_ALEN) == 0) {
+ if (memcmp(bss->bssid, bssid, ETH_ALEN) == 0 &&
+ bss->channel == channel) {
atomic_inc(&bss->users);
break;
}
@@ -2259,9 +2266,9 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
else
channel = rx_status->channel;
- bss = ieee80211_rx_bss_get(dev, mgmt->bssid);
+ bss = ieee80211_rx_bss_get(dev, mgmt->bssid, channel);
if (!bss) {
- bss = ieee80211_rx_bss_add(dev, mgmt->bssid);
+ bss = ieee80211_rx_bss_add(dev, mgmt->bssid, channel);
if (!bss)
return;
} else {
@@ -2378,7 +2385,6 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
}
bss->hw_mode = rx_status->phymode;
- bss->channel = channel;
bss->freq = rx_status->freq;
if (channel != rx_status->channel &&
(bss->hw_mode == MODE_IEEE80211G ||
@@ -3325,7 +3331,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID " MAC_FMT "\n",
dev->name, MAC_ARG(bssid));
- bss = ieee80211_rx_bss_add(dev, bssid);
+ bss = ieee80211_rx_bss_add(dev, bssid, local->hw.conf.channel);
if (!bss)
return -ENOMEM;
@@ -3336,7 +3342,6 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
local->hw.conf.beacon_int = 100;
bss->beacon_int = local->hw.conf.beacon_int;
bss->hw_mode = local->hw.conf.phymode;
- bss->channel = local->hw.conf.channel;
bss->freq = local->hw.conf.freq;
bss->last_update = jiffies;
bss->capability = WLAN_CAPABILITY_IBSS;
@@ -3396,7 +3401,7 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
MAC_FMT "\n", MAC_ARG(bssid), MAC_ARG(ifsta->bssid));
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 &&
- (bss = ieee80211_rx_bss_get(dev, bssid))) {
+ (bss = ieee80211_rx_bss_get(dev, bssid, local->hw.conf.channel))) {
printk(KERN_DEBUG "%s: Selected IBSS BSSID " MAC_FMT
" based on configured SSID\n",
dev->name, MAC_ARG(bssid));
--
1.5.2.2
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3317.2.1
retrieving revision 1.3317.2.2
diff -u -r1.3317.2.1 -r1.3317.2.2
--- kernel-2.6.spec 16 Aug 2007 20:02:24 -0000 1.3317.2.1
+++ kernel-2.6.spec 17 Aug 2007 20:36:57 -0000 1.3317.2.2
@@ -13,7 +13,7 @@
# by setting the define to ".local" or ".bz123456"
#
#% define buildid .local
-%define buildid .bz250913
+%define buildid .bz250913.1
# fedora_build defines which build revision of this kernel version we're
# building. Rather than incrementing forever, as with the prior versioning
@@ -597,7 +597,7 @@
Patch690: git-wireless-dev.patch
Patch691: linux-2.6-mac80211-local-mcast-filter.patch
Patch692: linux-2.6-mac80211-probe-hidden-essid.patch
-Patch693: 0001-mac80211-store-freq-info-in-sta_bss_list.patch
+Patch693: 0001-mac80211-store-channel-info-in-sta_bss_list.patch
Patch700: linux-2.6-iwlwifi-fw-name-compat.patch
Patch701: linux-2.6-rt2x00-usb-1_1-timeout.patch
Patch702: linux-2.6-b43-module-alias.patch
@@ -1298,8 +1298,8 @@
ApplyPatch linux-2.6-mac80211-local-mcast-filter.patch
# mac80211: probe for hidden SSIDs when SSID not found
ApplyPatch linux-2.6-mac80211-probe-hidden-essid.patch
-# mac80211: store freq info in sta_bss_list
-ApplyPatch 0001-mac80211-store-freq-info-in-sta_bss_list.patch
+# mac80211: store channel info in sta_bss_list
+ApplyPatch 0001-mac80211-store-channel-info-in-sta_bss_list.patch
# temp compat patch for iwlwifi firmware filenames
ApplyPatch linux-2.6-iwlwifi-fw-name-compat.patch
# temp make rt2x00 play nice w/ USB 1.1
@@ -2283,7 +2283,7 @@
%changelog
* Thu Aug 16 2007 John W. Linville <linville at redhat.com>
-- mac80211: store freq info in sta_bss_list
+- mac80211: store channel info in sta_bss_list
* Tue Aug 14 2007 Chuck Ebbert <cebbert at redhat.com>
- revert "don't BUG on too-large memory allocation"
--- 0001-mac80211-store-freq-info-in-sta_bss_list.patch DELETED ---
- Previous message: rpms/python-kiwi/devel .cvsignore, 1.7, 1.8 python-kiwi.spec, 1.9, 1.10 sources, 1.7, 1.8
- Next message: rpms/python-pgsql/F-7 .cvsignore, 1.2, 1.3 python-pgsql.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list