]> git.baikalelectronics.ru Git - kernel.git/commit
brcmfmac: slightly simplify building interface combinations
authorRafał Miłecki <zajec5@gmail.com>
Tue, 7 Jun 2016 19:10:18 +0000 (21:10 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 29 Jun 2016 15:41:34 +0000 (18:41 +0300)
commit3f438fa35122c8e87ceaca210747b563fe3ca548
treea46cd7b0244969632dad6944cdeb6301b9d11907
parent6f4c731b5a189b480c95b233e8474f1249ebc065
brcmfmac: slightly simplify building interface combinations

This change reorders some operations in brcmf_setup_ifmodes in hope to
make it simpler:
1) It allocates arrays right before filling them. This way it's easier
   to follow requested array length as it's immediately followed by
   code filling it. It's easier to check e.g. why we need 4 entries for
   P2P. Other than that it deduplicates some checks (e.g. for P2P).
2) It reorders code to first prepare limits and then define a new combo.
   Previously this was mixed (e.g. we were setting num of channels
   before preparing limits).
3) It modifies mbss code to use i variable just like other combos do.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c