brcmfmac: Move common BCDC code in single function.