[3/3] staging: rtl8723bs: fix up for cfg80211_roamed() API change
diff mbox series

Message ID 20170505215912.GD19258@kroah.com
State New, archived
Headers show
Series
  • [1/3] staging: rtl8723bs: merge fix for add/change_virtual-intf API change
Related show

Commit Message

Greg Kroah-Hartman May 5, 2017, 9:59 p.m. UTC
From: Stephen Rothwell <sfr@canb.auug.org.au>

Another fixup for the wifi changes that came from that tree for the
rtl8723bs driver.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Comments

kbuild test robot May 6, 2017, 8:33 p.m. UTC | #1
Hi Stephen,

[auto build test ERROR on staging/staging-testing]
[cannot apply to v4.11 next-20170505]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Greg-KH/staging-rtl8723bs-merge-fix-for-add-change_virtual-intf-API-change/20170507-034455
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=alpha 

All error/warnings (new ones prefixed by >>):

   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_indicate_connect':
>> drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:545:10: error: variable 'roam_info' has initializer but incomplete type
      struct cfg80211_roam_info roam_info = {};
             ^~~~~~~~~~~~~~~~~~
>> drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:545:29: error: storage size of 'roam_info' isn't known
      struct cfg80211_roam_info roam_info = {};
                                ^~~~~~~~~
   In file included from include/linux/slab.h:14:0,
                    from drivers/staging//rtl8723bs/include/osdep_service_linux.h:23,
                    from drivers/staging//rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging//rtl8723bs/include/drv_types.h:29,
                    from drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:17:
>> include/linux/gfp.h:239:20: warning: passing argument 3 of 'cfg80211_roamed' makes pointer from integer without a cast [-Wint-conversion]
    #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
                       ^
>> drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:562:50: note: in expansion of macro 'GFP_ATOMIC'
      cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
                                                     ^~~~~~~~~~
   In file included from drivers/staging//rtl8723bs/include/osdep_service_linux.h:50:0,
                    from drivers/staging//rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging//rtl8723bs/include/drv_types.h:29,
                    from drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:17:
   include/net/cfg80211.h:5233:6: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'unsigned int'
    void cfg80211_roamed(struct net_device *dev,
         ^~~~~~~~~~~~~~~
>> drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:562:3: error: too few arguments to function 'cfg80211_roamed'
      cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
      ^~~~~~~~~~~~~~~
   In file included from drivers/staging//rtl8723bs/include/osdep_service_linux.h:50:0,
                    from drivers/staging//rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging//rtl8723bs/include/drv_types.h:29,
                    from drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:17:
   include/net/cfg80211.h:5233:6: note: declared here
    void cfg80211_roamed(struct net_device *dev,
         ^~~~~~~~~~~~~~~
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:545:29: warning: unused variable 'roam_info' [-Wunused-variable]
      struct cfg80211_roam_info roam_info = {};
                                ^~~~~~~~~
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c: At top level:
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:3430:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .change_virtual_intf = cfg80211_rtw_change_iface,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:3430:25: note: (near initialization for 'rtw_cfg80211_ops.change_virtual_intf')
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:3449:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .add_virtual_intf = cfg80211_rtw_add_virtual_intf,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c:3449:22: note: (near initialization for 'rtw_cfg80211_ops.add_virtual_intf')
   cc1: some warnings being treated as errors
--
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_indicate_connect':
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:545:10: error: variable 'roam_info' has initializer but incomplete type
      struct cfg80211_roam_info roam_info = {};
             ^~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:545:29: error: storage size of 'roam_info' isn't known
      struct cfg80211_roam_info roam_info = {};
                                ^~~~~~~~~
   In file included from include/linux/slab.h:14:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:23,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:17:
>> include/linux/gfp.h:239:20: warning: passing argument 3 of 'cfg80211_roamed' makes pointer from integer without a cast [-Wint-conversion]
    #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
                       ^
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:562:50: note: in expansion of macro 'GFP_ATOMIC'
      cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
                                                     ^~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50:0,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:17:
   include/net/cfg80211.h:5233:6: note: expected 'const u8 * {aka const unsigned char *}' but argument is of type 'unsigned int'
    void cfg80211_roamed(struct net_device *dev,
         ^~~~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:562:3: error: too few arguments to function 'cfg80211_roamed'
      cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
      ^~~~~~~~~~~~~~~
   In file included from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50:0,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:17:
   include/net/cfg80211.h:5233:6: note: declared here
    void cfg80211_roamed(struct net_device *dev,
         ^~~~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:545:29: warning: unused variable 'roam_info' [-Wunused-variable]
      struct cfg80211_roam_info roam_info = {};
                                ^~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: At top level:
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3430:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .change_virtual_intf = cfg80211_rtw_change_iface,
                            ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3430:25: note: (near initialization for 'rtw_cfg80211_ops.change_virtual_intf')
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3449:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .add_virtual_intf = cfg80211_rtw_add_virtual_intf,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3449:22: note: (near initialization for 'rtw_cfg80211_ops.add_virtual_intf')
   cc1: some warnings being treated as errors

vim +/roam_info +545 drivers/staging//rtl8723bs/os_dep/ioctl_cfg80211.c

   539	
   540		if (rtw_to_roam(padapter) > 0) {
   541			struct wiphy *wiphy = pwdev->wiphy;
   542			struct ieee80211_channel *notify_channel;
   543			u32 freq;
   544			u16 channel = cur_network->network.Configuration.DSConfig;
 > 545			struct cfg80211_roam_info roam_info = {};
   546	
   547			freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
   548	
   549			notify_channel = ieee80211_get_channel(wiphy, freq);
   550	
   551			DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
   552			roam_info.channel = notify_channel;
   553			roam_info.bssid = cur_network->network.MacAddress;
   554			roam_info.req_ie =
   555				pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
   556			roam_info.req_ie_len =
   557				pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2;
   558			roam_info.resp_ie =
   559				pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6;
   560			roam_info.resp_ie_len =
   561				pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6;
 > 562			cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
   563		}
   564		else
   565		{

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Patch
diff mbox series

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index f092a72bffda..5e7a61f24f8d 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -542,20 +542,24 @@  void rtw_cfg80211_indicate_connect(struct adapter *padapter)
 		struct ieee80211_channel *notify_channel;
 		u32 freq;
 		u16 channel = cur_network->network.Configuration.DSConfig;
+		struct cfg80211_roam_info roam_info = {};
 
 		freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
 
 		notify_channel = ieee80211_get_channel(wiphy, freq);
 
 		DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
-		cfg80211_roamed(padapter->pnetdev
-			, notify_channel
-			, cur_network->network.MacAddress
-			, pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2
-			, pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2
-			, pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6
-			, pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6
-			, GFP_ATOMIC);
+		roam_info.channel = notify_channel;
+		roam_info.bssid = cur_network->network.MacAddress;
+		roam_info.req_ie =
+			pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
+		roam_info.req_ie_len =
+			pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2;
+		roam_info.resp_ie =
+			pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6;
+		roam_info.resp_ie_len =
+			pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6;
+		cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
 	}
 	else
 	{