From: Debabrata Purohit Date: Fri, 12 Apr 2019 10:46:14 +0000 (+0100) Subject: [NEUS7920-218] [9610] wlbt: Sniffer: support S-mapper Mbulks X-Git-Tag: MMI-QSAS30.62-33-3~929 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ea581aa8a10301b5c7069089e85d5445ab8fb9f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [NEUS7920-218] [9610] wlbt: Sniffer: support S-mapper Mbulks Support for S-mapper Mbulks in Sniffer mode. Change-Id: I2835167295de021effb5ec526095c5ac8a759850 SCSC-Bug-Id: SSB-51711 Signed-off-by: Debabrata Purohit --- diff --git a/drivers/net/wireless/scsc/sap_ma.c b/drivers/net/wireless/scsc/sap_ma.c index 9f89e5c5944c..35b7936b04e8 100755 --- a/drivers/net/wireless/scsc/sap_ma.c +++ b/drivers/net/wireless/scsc/sap_ma.c @@ -358,14 +358,28 @@ static void slsi_rx_data_ind(struct slsi_dev *sdev, struct net_device *dev, stru #ifdef CONFIG_SCSC_WLAN_DEBUG /* pass the data up "As is" if the VIF type is Monitor */ if (ndev_vif->vif_type == FAPI_VIFTYPE_MONITOR) { - /* strip signal */ +#ifdef CONFIG_SCSC_SMAPPER + /* Check if the payload is in the SMAPPER entry */ + if (fapi_get_u16(skb, u.ma_unitdata_ind.bulk_data_descriptor) == FAPI_BULKDATADESCRIPTOR_SMAPPER) { + /* Retrieve the associated smapper skb */ + skb = slsi_hip_get_skb_from_smapper(sdev, skb); + if (!skb) { + SLSI_NET_DBG2(dev, SLSI_RX, "SKB from SMAPPER is NULL\n"); + return; + } + } else { + /* strip signal and any signal/bulk roundings/offsets */ + skb_pull(skb, fapi_get_siglen(skb)); + } +#else skb_pull(skb, fapi_get_siglen(skb)); - +#endif skb_reset_mac_header(skb); skb->dev = dev; skb->ip_summed = CHECKSUM_UNNECESSARY; skb->pkt_type = PACKET_OTHERHOST; netif_rx_ni(skb); + return; } #endif