Skip to content

Commit d37ca5b

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
brcmfmac: Disable ARP offloading when promiscuous
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
1 parent c1e4bc8 commit d37ca5b

File tree

2 files changed

+7
-5
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

2 files changed

+7
-5
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@ void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable)
8888
if (err) {
8989
brcmf_dbg(TRACE, "failed to set ARP offload mode to 0x%x, err = %d\n",
9090
mode, err);
91+
err = 0;
9192
} else {
9293
err = brcmf_fil_iovar_int_set(ifp, "arpoe", enable);
9394
if (err) {
9495
brcmf_dbg(TRACE, "failed to configure (%d) ARP offload err = %d\n",
9596
enable, err);
96-
} else {
97+
err = 0;
98+
} else
9799
brcmf_dbg(TRACE, "successfully configured (%d) ARP offload to 0x%x\n",
98100
enable, mode);
99-
}
100101
}
101102

102103
err = brcmf_fil_iovar_int_set(ifp, "ndoe", enable);
103-
if (err) {
104+
if (err)
104105
brcmf_dbg(TRACE, "failed to configure (%d) ND offload err = %d\n",
105106
enable, err);
106-
} else {
107+
else
107108
brcmf_dbg(TRACE, "successfully configured (%d) ND offload to 0x%x\n",
108109
enable, mode);
109-
}
110110
}
111111

112112
static void _brcmf_set_multicast_list(struct work_struct *work)
@@ -172,6 +172,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
172172
if (err < 0)
173173
brcmf_err("Setting BRCMF_C_SET_PROMISC failed, %d\n",
174174
err);
175+
175176
brcmf_configure_arp_nd_offload(ifp, !cmd_value);
176177
}
177178

drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ char *brcmf_ifname(struct brcmf_if *ifp);
210210
struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
211211
void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable);
212212
int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
213+
void brcmf_configure_arp_nd_offload(struct brcmf_if *ifp, bool enable);
213214
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
214215
bool is_p2pdev, const char *name, u8 *mac_addr);
215216
void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);

0 commit comments

Comments
 (0)