Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c697be5a authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville
Browse files

brcmfmac: fix pkt_filter sizeof calculation.



sizeof calculation in setting pkt_filter was incorrect. This
patch fixes that and removes related defines which have become
obsolete.

Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21fff75d
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -42,10 +42,6 @@


#define MSGTRACE_VERSION	1
#define MSGTRACE_VERSION	1


#define BRCMF_PKT_FILTER_FIXED_LEN	offsetof(struct brcmf_pkt_filter_le, u)
#define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN	\
	offsetof(struct brcmf_pkt_filter_pattern_le, mask_and_pattern)

#ifdef DEBUG
#ifdef DEBUG
static const char brcmf_version[] =
static const char brcmf_version[] =
	"Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on "
	"Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on "
@@ -686,8 +682,8 @@ static void brcmf_c_pktfilter_offload_set(struct brcmf_if *ifp, char *arg)
	}
	}


	pkt_filter->u.pattern.size_bytes = cpu_to_le32(mask_size);
	pkt_filter->u.pattern.size_bytes = cpu_to_le32(mask_size);
	buf_len = sizeof(*pkt_filter);
	buf_len = offsetof(struct brcmf_pkt_filter_le,
	buf_len -= sizeof(pkt_filter->u.pattern.mask_and_pattern);
			   u.pattern.mask_and_pattern);
	buf_len += mask_size + pattern_size;
	buf_len += mask_size + pattern_size;


	err = brcmf_fil_iovar_data_set(ifp, "pkt_filter_add", pkt_filter,
	err = brcmf_fil_iovar_data_set(ifp, "pkt_filter_add", pkt_filter,