|
@@ -459,6 +459,38 @@ send_key_to_dongle(struct net_device *ndev, struct brcmf_wsec_key *key)
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+static s32
|
|
|
+brcmf_configure_arp_offload(struct brcmf_if *ifp, bool enable)
|
|
|
+{
|
|
|
+ s32 err;
|
|
|
+ u32 mode;
|
|
|
+
|
|
|
+ if (enable)
|
|
|
+ mode = BRCMF_ARP_OL_AGENT | BRCMF_ARP_OL_PEER_AUTO_REPLY;
|
|
|
+ else
|
|
|
+ mode = 0;
|
|
|
+
|
|
|
+ /* Try to set and enable ARP offload feature, this may fail, then it */
|
|
|
+ /* is simply not supported and err 0 will be returned */
|
|
|
+ err = brcmf_fil_iovar_int_set(ifp, "arp_ol", mode);
|
|
|
+ if (err) {
|
|
|
+ brcmf_dbg(TRACE, "failed to set ARP offload mode to 0x%x, err = %d\n",
|
|
|
+ mode, err);
|
|
|
+ err = 0;
|
|
|
+ } else {
|
|
|
+ err = brcmf_fil_iovar_int_set(ifp, "arpoe", enable);
|
|
|
+ if (err) {
|
|
|
+ brcmf_dbg(TRACE, "failed to configure (%d) ARP offload err = %d\n",
|
|
|
+ enable, err);
|
|
|
+ err = 0;
|
|
|
+ } else
|
|
|
+ brcmf_dbg(TRACE, "successfully configured (%d) ARP offload to 0x%x\n",
|
|
|
+ enable, mode);
|
|
|
+ }
|
|
|
+
|
|
|
+ return err;
|
|
|
+}
|
|
|
+
|
|
|
static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
|
|
|
const char *name,
|
|
|
enum nl80211_iftype type,
|
|
@@ -3683,6 +3715,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
|
|
|
}
|
|
|
|
|
|
brcmf_set_mpc(ifp, 0);
|
|
|
+ brcmf_configure_arp_offload(ifp, false);
|
|
|
|
|
|
/* find the RSN_IE */
|
|
|
rsn_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail,
|
|
@@ -3789,8 +3822,10 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
|
|
|
set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
|
|
|
|
|
|
exit:
|
|
|
- if (err)
|
|
|
+ if (err) {
|
|
|
brcmf_set_mpc(ifp, 1);
|
|
|
+ brcmf_configure_arp_offload(ifp, true);
|
|
|
+ }
|
|
|
return err;
|
|
|
}
|
|
|
|
|
@@ -3831,6 +3866,7 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
|
|
brcmf_err("bss_enable config failed %d\n", err);
|
|
|
}
|
|
|
brcmf_set_mpc(ifp, 1);
|
|
|
+ brcmf_configure_arp_offload(ifp, true);
|
|
|
set_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state);
|
|
|
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
|
|
|
|
|
@@ -5229,6 +5265,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
|
|
|
if (err)
|
|
|
goto default_conf_out;
|
|
|
|
|
|
+ brcmf_configure_arp_offload(ifp, true);
|
|
|
+
|
|
|
cfg->dongle_up = true;
|
|
|
default_conf_out:
|
|
|
|