1 // SPDX-License-Identifier: ISC 2 /* 3 * Copyright (c) 2022 Broadcom Corporation 4 */ 5 #include <linux/errno.h> 6 #include <linux/types.h> 7 #include <core.h> 8 #include <bus.h> 9 #include <fwvid.h> 10 #include <feature.h> 11 12 #include "vops.h" 13 14 #define BRCMF_BCA_E_LAST 212 15 brcmf_bca_feat_attach(struct brcmf_if * ifp)16static void brcmf_bca_feat_attach(struct brcmf_if *ifp) 17 { 18 /* SAE support not confirmed so disabling for now */ 19 ifp->drvr->feat_flags &= ~BIT(BRCMF_FEAT_SAE); 20 } 21 brcmf_bca_alloc_fweh_info(struct brcmf_pub * drvr)22static int brcmf_bca_alloc_fweh_info(struct brcmf_pub *drvr) 23 { 24 struct brcmf_fweh_info *fweh; 25 26 fweh = kzalloc(struct_size(fweh, evt_handler, BRCMF_BCA_E_LAST), 27 GFP_KERNEL); 28 if (!fweh) 29 return -ENOMEM; 30 31 fweh->num_event_codes = BRCMF_BCA_E_LAST; 32 drvr->fweh = fweh; 33 return 0; 34 } 35 36 const struct brcmf_fwvid_ops brcmf_bca_ops = { 37 .feat_attach = brcmf_bca_feat_attach, 38 .alloc_fweh_info = brcmf_bca_alloc_fweh_info, 39 }; 40