[9610] wlbt: Fix/Mask out compilation errors in rx.c (Android P)
authorTarun Karela <t.karela@samsung.com>
Wed, 30 May 2018 16:36:43 +0000 (17:36 +0100)
committerYoungsoo Kim <youngss.kim@samsung.com>
Fri, 15 Jun 2018 22:48:48 +0000 (07:48 +0900)
drivers/net/wireless/scsc/rx.c: In function 'slsi_scan_complete':
drivers/net/wireless/scsc/rx.c:524:3: error: too few arguments to function 'cfg80211_sched_scan_results'
   cfg80211_sched_scan_results(sdev->wiphy);
   ^
In file included from drivers/net/wireless/scsc/dev.h:33:0,
                 from drivers/net/wireless/scsc/debug.h:11,
                 from drivers/net/wireless/scsc/rx.c:9:
./include/net/cfg80211.h:4611:6: note: declared here
 void cfg80211_sched_scan_results(struct wiphy *wiphy, u64 reqid);
      ^
drivers/net/wireless/scsc/rx.c: In function 'slsi_rx_roamed_ind':
drivers/net/wireless/scsc/rx.c:925:5: warning: passing argument 2 of 'cfg80211_roamed' from incompatible pointer type
     ndev_vif->sta.sta_bss->channel,
     ^
In file included from drivers/net/wireless/scsc/dev.h:33:0,
                 from drivers/net/wireless/scsc/debug.h:11,
                 from drivers/net/wireless/scsc/rx.c:9:
./include/net/cfg80211.h:5479:6: note: expected 'struct cfg80211_roam_info *' but argument is of type 'struct ieee80211_channel *'
 void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
      ^
drivers/net/wireless/scsc/rx.c:926:5: warning: passing argument 3 of 'cfg80211_roamed' makes integer from pointer without a cast
     peer->address,
     ^
In file included from drivers/net/wireless/scsc/dev.h:33:0,
                 from drivers/net/wireless/scsc/debug.h:11,
                 from drivers/net/wireless/scsc/rx.c:9:
./include/net/cfg80211.h:5479:6: note: expected 'gfp_t' but argument is of type 'u8 *'
 void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
      ^
drivers/net/wireless/scsc/rx.c:924:3: error: too many arguments to function 'cfg80211_roamed'
   cfg80211_roamed(dev,
   ^
In file included from drivers/net/wireless/scsc/dev.h:33:0,
                 from drivers/net/wireless/scsc/debug.h:11,
                 from drivers/net/wireless/scsc/rx.c:9:
./include/net/cfg80211.h:5479:6: note: declared here
 void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
      ^
drivers/net/wireless/scsc/rx.c: In function 'slsi_rx_received_frame_ind':
drivers/net/wireless/scsc/rx.c:1923:6: error: 'struct net_device' has no member named 'last_rx'
   dev->last_rx = jiffies;
      ^
scripts/Makefile.build:328: recipe for target 'drivers/net/wireless/scsc/rx.o' failed
make[4]: *** [drivers/net/wireless/scsc/rx.o] Error 1

Change-Id: I0e02d1fdad4beb2085fadc6aa783c439718ad332
SCSC-Bug-Id: SSB-40175
Signed-off-by: Tarun Karela <t.karela@samsung.com>
drivers/net/wireless/scsc/rx.c

index 97ce0d4bc72a8a4318fb8ba12ce180381e8c7bd8..1996d91c79a6bdc37ff76ae353c6ba3eff2a1b78 100755 (executable)
@@ -521,7 +521,7 @@ void slsi_scan_complete(struct slsi_dev *sdev, struct net_device *dev, u16 scan_
        }
 
        if (scan_id == SLSI_SCAN_SCHED_ID)
-               cfg80211_sched_scan_results(sdev->wiphy);
+               cfg80211_sched_scan_results(sdev->wiphy, 0);
        SLSI_MUTEX_UNLOCK(ndev_vif->scan_result_mutex);
 }
 
@@ -822,7 +822,7 @@ void slsi_rx_roamed_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
        enum ieee80211_privacy bss_privacy;
 #endif
-
+       struct cfg80211_roam_info roam_info = {};
        SLSI_MUTEX_LOCK(ndev_vif->vif_mutex);
 
        SLSI_NET_DBG1(dev, SLSI_MLME, "mlme_roamed_ind(vif:%d) Roaming to %pM\n",
@@ -921,6 +921,16 @@ void slsi_rx_roamed_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk
                WARN_ON(assoc_rsp_ie_len && !assoc_rsp_ie);
 
                SLSI_NET_DBG3(dev, SLSI_MLME, "cfg80211_roamed()\n");
+
+               /* TODO: add proper parameters */
+               /*roam_info.channel     = */
+               /*roam_info.bssid               = */
+               roam_info.req_ie        = assoc_ie;
+               roam_info.req_ie_len    = assoc_ie_len;
+               roam_info.resp_ie       = assoc_rsp_ie;
+               roam_info.resp_ie_len   = assoc_rsp_ie_len;
+               cfg80211_roamed(dev, &roam_info, GFP_KERNEL);
+#if 0
                cfg80211_roamed(dev,
                                ndev_vif->sta.sta_bss->channel,
                                peer->address,
@@ -929,6 +939,7 @@ void slsi_rx_roamed_ind(struct slsi_dev *sdev, struct net_device *dev, struct sk
                                assoc_rsp_ie,
                                assoc_rsp_ie_len,
                                GFP_KERNEL);
+#endif
 #ifdef CONFIG_SCSC_WLAN_KEY_MGMT_OFFLOAD
                if (slsi_send_roam_vendor_event(sdev, peer->address, assoc_ie, assoc_ie_len,
                                                assoc_rsp_ie, assoc_rsp_ie_len, !temporal_keys_required) != 0) {
@@ -1920,7 +1931,7 @@ void slsi_rx_received_frame_ind(struct slsi_dev *sdev, struct net_device *dev, s
 
                ndev_vif->stats.rx_packets++;
                ndev_vif->stats.rx_bytes += skb->len;
-               dev->last_rx = jiffies;
+               /* dev->last_rx = jiffies; */
 
                skb->protocol = eth_type_trans(skb, dev);
                slsi_dbg_untrack_skb(skb);