From: Kalle Valo <kvalo@codeaurora.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
"Brett Rudley" <brudley@broadcom.com>,
"Arend van Spriel" <arend@broadcom.com>,
"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
"Hante Meuleman" <meuleman@broadcom.com>,
"Pieter-Paul Giesberts" <pieterpg@broadcom.com>,
"Franky Lin" <franky.lin@broadcom.com>,
linux-wireless@vger.kernel.org (open list:BROADCOM BRCM80211
IEEE802.11n WIRELESS DRIVER),
brcm80211-dev-list@broadcom.com (open list:BROADCOM BRCM80211
IEEE802.11n WIRELESS DRIVER),
netdev@vger.kernel.org (open list:NETWORKING DRIVERS),
linux-kernel@vger.kernel.org (open list)
Subject: Re: brcmfmac: rework function picking free BSS index
Date: Thu, 9 Jun 2016 16:17:32 +0000 (UTC) [thread overview]
Message-ID: <20160609161732.90E20613F6@smtp.codeaurora.org> (raw)
In-Reply-To: <1464219876-13776-1-git-send-email-zajec5@gmail.com>
Rafał Miłecki wrote:
> The old implementation was overcomplicated and slightly bugged in some
> corner cases.
>
> Consider following state of BSS-es (limited to 6 for simplification):
> drvr->iflist[0]: { bsscfgidx:0, ndev->name:wlan1, }
> drvr->iflist[1]: (null)
> drvr->iflist[2]: { bsscfgidx:2, ndev->name:wlan1-1, }
> drvr->iflist[3]: { bsscfgidx:3, ndev->name:wlan1-2, }
> drvr->iflist[4]: (null)
> drvr->iflist[5]: (null)
> In such case the next AP interface should bsscfgidx 4 (we don't use 1 as
> it's reserved for P2P).
>
> With old code the loop iterations were following:
> [ifidx = 0] [bsscfgidx = 2] [highest = 2]
> [ifidx = 1] [bsscfgidx = 2] [highest = 2] available = true
> [ifidx = 2] [bsscfgidx = 2] [highest = 2] bsscfgidx = highest + 1
> [ifidx = 3] [bsscfgidx = 3] [highest = 2] bsscfgidx = highest + 1
> [ifidx = 4] [bsscfgidx = 3] [highest = 2] available = true
> [ifidx = 5] [bsscfgidx = 3] [highest = 2] available = true
> There were 2 obvious problems:
> 1) Having empty BSS at index 1 was resulting in available being always
> set to true, even if we would run out of BSS-es.
> 2) Calculated bsscfgidx was invalid (3 instead of 4) resulting in driver
> not being able to create the 4th AP interface.
>
> New code is simpler, placed in file where it's really used, handles
> running out of free BSS-es and allows using 4 interfaces at the same
> time. It also looks for the first free BSS instead of one after the last
> in use. It works well with current driver (which doesn't allow deleting
> interfaces) and should be future proof (if we ever allow deleting).
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Thanks, 1 patch applied to wireless-drivers-next.git:
d02fb8f14b2d brcmfmac: rework function picking free BSS index
--
Sent by pwcli
https://patchwork.kernel.org/patch/9136421/
next prev parent reply other threads:[~2016-06-09 16:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 23:44 [PATCH] brcmfmac: rework function picking free BSS index Rafał Miłecki
2016-06-09 16:17 ` Kalle Valo [this message]
[not found] ` <20160609161732.90E20613F6-4h6buKAYkuurB/BPivuO70B+6BGkLq7r@public.gmane.org>
2016-06-09 16:30 ` Kalle Valo
[not found] ` <87eg86l3zo.fsf-5ukZ45wKbUHoml4zekdYB16hYfS7NtTn@public.gmane.org>
2016-06-09 16:48 ` Rafał Miłecki
[not found] ` <1464219876-13776-1-git-send-email-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-09 19:16 ` [PATCH] " Arend van Spriel
[not found] ` <5759C09F.7020704-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-06-13 19:30 ` Arend van Spriel
2016-06-13 20:25 ` Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160609161732.90E20613F6@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=arend@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brudley@broadcom.com \
--cc=franky.lin@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pieterpg@broadcom.com \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).