OSDN Git Service

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)
commitf568adac7d1a50a7412a902ebc831730a9b80bf9
treea46cd7b0244969632dad6944cdeb6301b9d11907
parent742fb20fd4c75bd08733b0ea232c7e0fa67a6f87
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