@@ -5447,7 +5447,7 @@ brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev,
{
struct brcmf_if *ifp;
int ret = 0;
- u32 ap_isolate;
+ u32 ap_isolate, val;
brcmf_dbg(TRACE, "Enter\n");
ifp = netdev_priv(dev);
@@ -5458,6 +5458,17 @@ 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 supports packet forwarding. */
+ if (brcmf_fil_iovar_int_get(ifp, "ap_isolate", &val) == 0) {
+ ifp->fmac_pkt_fwd_en =
+ ((params->ap_isolate == 0) && (val == 1)) ?
+ true : false;
+ } else {
+ brcmf_err("get ap_isolate iovar failed: ret=%d\n", ret);
+ ifp->fmac_pkt_fwd_en = false;
+ }
+
return ret;
}
@@ -196,6 +196,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 {
@@ -1190,8 +1190,8 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf)
return;
}
- eh = (struct ethhdr *)(skb->data);
- if (ifp->isap) {
+ if (ifp->isap && ifp->fmac_pkt_fwd_en) {
+ eh = (struct ethhdr *)(skb->data);
skb_set_network_header(skb, sizeof(struct ethhdr));
skb->protocol = eh->h_proto;
skb->priority = cfg80211_classify8021d(skb, NULL);