BSSID shouldn't be common for all interfaces. Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>
Index: dscape/net/d80211/ieee80211.c =================================================================== --- dscape.orig/net/d80211/ieee80211.c 2006-03-06 14:10:07.000000000 +0100 +++ dscape/net/d80211/ieee80211.c 2006-03-06 14:10:15.000000000 +0100 @@ -2063,7 +2063,7 @@ ieee80211_rx_h_data(struct ieee80211_txr memcpy(src, hdr->addr2, ETH_ALEN); if (sdata->type != IEEE80211_SUB_IF_TYPE_IBSS || - memcmp(hdr->addr3, local->bssid, ETH_ALEN) != 0) { + memcmp(hdr->addr3, sdata->u.sta.bssid, ETH_ALEN) != 0) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: dropped IBSS frame (DA=" MACSTR " SA=" MACSTR " BSSID=" MACSTR @@ -2803,7 +2803,7 @@ ieee80211_rx_h_sta_process(struct ieee80 * other STAs are using different BSSID. */ if (rx->sdata->type == IEEE80211_SUB_IF_TYPE_IBSS) { u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len); - if (memcmp(bssid, rx->local->bssid, ETH_ALEN) == 0) + if (memcmp(bssid, rx->sdata->u.sta.bssid, ETH_ALEN) == 0) sta->last_rx = jiffies; } else if (!MULTICAST_ADDR(hdr->addr1) || Index: dscape/net/d80211/ieee80211_i.h =================================================================== --- dscape.orig/net/d80211/ieee80211_i.h 2006-03-06 14:10:01.000000000 +0100 +++ dscape/net/d80211/ieee80211_i.h 2006-03-06 14:10:15.000000000 +0100 @@ -433,7 +433,6 @@ struct ieee80211_local { u32 stat_time; struct timer_list stat_timer; - u8 bssid[ETH_ALEN]; /* BSSID for STA modes (Adhoc/Managed) */ struct timer_list rate_limit_timer; u32 rate_limit; u32 rate_limit_burst; Index: dscape/net/d80211/ieee80211_sta.c =================================================================== --- dscape.orig/net/d80211/ieee80211_sta.c 2006-03-06 14:10:07.000000000 +0100 +++ dscape/net/d80211/ieee80211_sta.c 2006-03-06 14:10:15.000000000 +0100 @@ -1365,7 +1365,7 @@ static void ieee80211_rx_bss_info(struct ((u64) pos[1] << 8) | ((u64) pos[0]); if (sdata->type == IEEE80211_SUB_IF_TYPE_IBSS && beacon && - memcmp(mgmt->bssid, local->bssid, ETH_ALEN) == 0) { + memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0) { #ifdef IEEE80211_IBSS_DEBUG static unsigned long last_tsf_debug = 0; u64 tsf; @@ -1389,7 +1389,7 @@ static void ieee80211_rx_bss_info(struct invalid = 1; if (sdata->type == IEEE80211_SUB_IF_TYPE_IBSS && elems.supp_rates && - memcmp(mgmt->bssid, local->bssid, ETH_ALEN) == 0 && + memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0 && (sta = sta_info_get(local, mgmt->sa))) { struct ieee80211_rate *rates; size_t num_rates; @@ -1990,7 +1990,6 @@ static int ieee80211_sta_join_ibss(struc local->hw->reset_tsf(local->mdev); } memcpy(ifsta->bssid, bss->bssid, ETH_ALEN); - memcpy(local->bssid, bss->bssid, ETH_ALEN); memcpy(local->conf.client_bssid, bss->bssid, ETH_ALEN); local->conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10; @@ -2344,7 +2343,6 @@ int ieee80211_sta_get_ssid(struct net_de int ieee80211_sta_set_bssid(struct net_device *dev, u8 *bssid) { - struct ieee80211_local *local = dev->priv; struct ieee80211_sub_if_data *sdata; struct ieee80211_if_sta *ifsta; @@ -2352,8 +2350,6 @@ int ieee80211_sta_set_bssid(struct net_d ifsta = &sdata->u.sta; memcpy(ifsta->bssid, bssid, ETH_ALEN); - if (sdata->type == IEEE80211_SUB_IF_TYPE_IBSS) - memcpy(local->bssid, bssid, ETH_ALEN); if (memcmp(bssid, "\x00\x00\x00\x00\x00\x00", ETH_ALEN) == 0) ifsta->bssid_set = 0; - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html