Search Linux Wireless

Re: [PATCH] mac80211: enable IBSS merging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adding Johill and Michael as they are maintainers of mac80211 and they
need to review this. Please add them on further mac80211 patches.

Note to driver authors: zd1211rw, rt2x00 drivers and adm8211 will need
to set mactime if they want IBSS merge to work as this functionality
would be added with this. I believe all other drivers set it, but
didn't do a thorough grep.

On Jan 18, 2008 7:52 AM, Bruno Randolf <bruno@xxxxxxxxxxxxx> wrote:

> +
> +       /* check if we need to merge IBSS */
> +       if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && beacon &&
> +           !local->sta_sw_scanning && !local->sta_hw_scanning &&
> +           mgmt->u.beacon.capab_info & WLAN_CAPABILITY_IBSS &&
> +           memcmp(elems.ssid, sdata->u.sta.ssid, sdata->u.sta.ssid_len) == 0) {
> +#ifdef CONFIG_MAC80211_IBSS_DEBUG
> +               static unsigned long last_tsf_debug;
> +#endif
> +               if (rx_status->flag & RX_FLAG_TSFT)
> +                       mactime = rx_status->mactime;
> +               else {
> +                       mactime = -1LLU;
> +                       printk(KERN_WARNING "%s: IBSS mode needs mactime for "
> +                               "beacons\n", dev->name);

Does this merit a WARN_ON() ? This essentially will prevent IBSS
merges for drivers that haven't set mactime yet.

> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 6cc1e7e..5617e17 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1609,7 +1609,10 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata,
>         case IEEE80211_IF_TYPE_IBSS:
>                 if (!bssid)
>                         return 0;
> -               if (!ieee80211_bssid_match(bssid, sdata->u.sta.bssid)) {
> +               if ((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT &&
> +                   (rx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON)

Since we are letting all beacons through how about adding a check for
ssid on ieee80211_rx_bss_info()?

(memcmp(elems.ssid, sdata->u.sta.ssid, sdata->u.sta.ssid_len) == 0)

Just not sure exactly we'd check for it yet.

> +                       return 1;
> +               else if (!ieee80211_bssid_match(bssid, sdata->u.sta.bssid)) {
>                         if (!(rx->flags & IEEE80211_TXRXD_RXIN_SCAN))
>                                 return 0;
>                         rx->flags &= ~IEEE80211_TXRXD_RXRA_MATCH;
>
>

  Luis
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux