| 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 |
|
| 16 |
static 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 |
|
| 22 |
static int brcmf_bca_alloc_fweh_info(struct brcmf_pub *drvr) |
| 23 |
{ |
| 24 |
struct brcmf_fweh_info *fweh; |
| 25 |
|
| 26 |
fweh = kzalloc_flex(*fweh, evt_handler, BRCMF_BCA_E_LAST); |
| 27 |
if (!fweh) |
| 28 |
return -ENOMEM; |
| 29 |
|
| 30 |
fweh->num_event_codes = BRCMF_BCA_E_LAST; |
| 31 |
drvr->fweh = fweh; |
| 32 |
return 0; |
| 33 |
} |
| 34 |
|
| 35 |
const struct brcmf_fwvid_ops brcmf_bca_ops = { |
| 36 |
.feat_attach = brcmf_bca_feat_attach, |
| 37 |
.alloc_fweh_info = brcmf_bca_alloc_fweh_info, |
| 38 |
}; |