@@ -5484,8 +5484,8 @@ brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev,
struct bss_parameters *params)
{
struct brcmf_if *ifp;
- int ret = 0;
- u32 ap_isolate;
+ int ret = 0, result = 0;
+ u32 ap_isolate, val;
brcmf_dbg(TRACE, "Enter\n");
ifp = netdev_priv(dev);
@@ -5496,6 +5496,19 @@ brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev,
brcmf_err("ap_isolate iovar failed: ret=%d\n", ret);
}
+ /* Get ap_isolate value from firmware to detemine whether fmac */
+ /* driver enables packet forwarding. */
+ result = brcmf_fil_iovar_int_get(ifp, "ap_isolate", &val);
+ if (result == 0 &&
+ params->ap_isolate == 0 &&
+ val == 1) {
+ ifp->fmac_pkt_fwd_en = true;
+ } else {
+ if (result < 0)
+ brcmf_err("get ap_isolate iovar failed: result=%d\n", result);
+ ifp->fmac_pkt_fwd_en = false;
+ }
+
return ret;
}
@@ -195,6 +195,7 @@ struct brcmf_if {
bool fwil_fwerr;
struct list_head sta_list; /* sll of associated stations */
spinlock_t sta_list_lock;
+ bool fmac_pkt_fwd_en;
};
struct ether_addr {
@@ -1192,7 +1192,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf)
}
eh = (struct ethhdr *)(skb->data);
- if (brcmf_is_apmode(ifp->vif)) {
+ if (brcmf_is_apmode(ifp->vif) && ifp->fmac_pkt_fwd_en) {
skb_set_network_header(skb, sizeof(struct ethhdr));
skb->protocol = eh->h_proto;
skb->priority = cfg80211_classify8021d(skb, NULL);