diff mbox series

[v4,5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0

Message ID 20200909153628.2904888-6-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series wcn36xx: Tidy up BSS/STA config | expand

Commit Message

Bryan O'Donoghue Sept. 9, 2020, 3:36 p.m. UTC
This commit adds wcn36xx_smd_config_bss_v0() as a step along the road of
functionally decomposing wcn36xx_smd_config_bss().

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>

---
 drivers/net/wireless/ath/wcn36xx/smd.c | 41 ++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

-- 
2.27.0


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx

Comments

kernel test robot Sept. 9, 2020, 8:34 p.m. UTC | #1
Hi Bryan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]

url:    https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base:    160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
     150 | wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
     186 | void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
     208 | void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
     233 | void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
     249 | void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
    1253 | wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
    1387 | void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c: In function 'wcn36xx_smd_set_bss_params':
   drivers/net/wireless/ath/wcn36xx/smd.c:1395:40: warning: variable 'sta_params' set but not used [-Wunused-but-set-variable]
    1395 |  struct wcn36xx_hal_config_sta_params *sta_params;
         |                                        ^~~~~~~~~~
   drivers/net/wireless/ath/wcn36xx/smd.c: At top level:
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]

    1587 | int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~

# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c

  1586	
> 1587	int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,

  1588				      struct ieee80211_sta *sta, const u8 *bssid,
  1589				      bool update)
  1590	{
  1591		struct wcn36xx_hal_config_bss_req_msg *msg;
  1592		struct wcn36xx_hal_config_bss_params *bss;
  1593		struct wcn36xx_hal_config_sta_params *sta_params;
  1594		int ret;
  1595	
  1596		msg = kzalloc(sizeof(*msg), GFP_KERNEL);
  1597		if (!msg)
  1598			return -ENOMEM;
  1599	
  1600		INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
  1601	
  1602		bss = &msg->bss_params;
  1603		sta_params = &bss->sta;
  1604	
  1605		wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
  1606		wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
  1607	
  1608		PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
  1609	
  1610		wcn36xx_dbg(WCN36XX_DBG_HAL,
  1611			    "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
  1612			    bss->bssid, bss->self_mac_addr, bss->bss_type,
  1613			    bss->oper_mode, bss->nw_type);
  1614	
  1615		wcn36xx_dbg(WCN36XX_DBG_HAL,
  1616			    "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
  1617			    sta_params->bssid, sta_params->action,
  1618			    sta_params->sta_index, sta_params->bssid_index,
  1619			    sta_params->aid, sta_params->type,
  1620			    sta_params->mac);
  1621	
  1622		ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
  1623		kfree(msg);
  1624	
  1625		return ret;
  1626	}
  1627	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
kernel test robot Sept. 10, 2020, 8:51 a.m. UTC | #2
Hi Bryan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 160b351d75cb50a0dd2abf9b63e1891935aa9e4a]

url:    https://github.com/0day-ci/linux/commits/Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
base:    160b351d75cb50a0dd2abf9b63e1891935aa9e4a
config: powerpc-randconfig-r011-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0a5dc7effb191eff740e0e7ae7bd8e1f6bdb3ad9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/wcn36xx/smd.c:150:1: warning: no previous prototype for function 'wcn36xx_smd_set_bss_vht_params' [-Wmissing-prototypes]
   wcn36xx_smd_set_bss_vht_params(struct ieee80211_vif *vif,
   ^
   drivers/net/wireless/ath/wcn36xx/smd.c:149:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:186:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_vht_params' [-Wmissing-prototypes]
   void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
        ^
   drivers/net/wireless/ath/wcn36xx/smd.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn,
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:208:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_ht_ldpc_params' [-Wmissing-prototypes]
   void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
        ^
   drivers/net/wireless/ath/wcn36xx/smd.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void wcn36xx_smd_set_sta_ht_ldpc_params(struct ieee80211_sta *sta,
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:233:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_vht_params' [-Wmissing-prototypes]
   void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
        ^
   drivers/net/wireless/ath/wcn36xx/smd.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn,
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:249:6: warning: no previous prototype for function 'wcn36xx_smd_set_sta_default_ht_ldpc_params' [-Wmissing-prototypes]
   void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
        ^
   drivers/net/wireless/ath/wcn36xx/smd.c:249:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn,
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:1253:1: warning: no previous prototype for function 'wcn36xx_smd_set_sta_params_v1' [-Wmissing-prototypes]
   wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn,
   ^
   drivers/net/wireless/ath/wcn36xx/smd.c:1252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void
   ^
   static 
   drivers/net/wireless/ath/wcn36xx/smd.c:1387:6: warning: no previous prototype for function 'wcn36xx_smd_set_bss_params' [-Wmissing-prototypes]
   void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
        ^
   drivers/net/wireless/ath/wcn36xx/smd.c:1387:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn,
   ^
   static 
>> drivers/net/wireless/ath/wcn36xx/smd.c:1587:5: warning: no previous prototype for function 'wcn36xx_smd_config_bss_v0' [-Wmissing-prototypes]

   int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
       ^
   drivers/net/wireless/ath/wcn36xx/smd.c:1587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
   ^
   static 
   8 warnings generated.

# https://github.com/0day-ci/linux/commit/3c3f8bcaf7d541aab14db1b75513565dad07aa26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Tidy-up-BSS-STA-config/20200910-011120
git checkout 3c3f8bcaf7d541aab14db1b75513565dad07aa26
vim +/wcn36xx_smd_config_bss_v0 +1587 drivers/net/wireless/ath/wcn36xx/smd.c

  1586	
> 1587	int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,

  1588				      struct ieee80211_sta *sta, const u8 *bssid,
  1589				      bool update)
  1590	{
  1591		struct wcn36xx_hal_config_bss_req_msg *msg;
  1592		struct wcn36xx_hal_config_bss_params *bss;
  1593		struct wcn36xx_hal_config_sta_params *sta_params;
  1594		int ret;
  1595	
  1596		msg = kzalloc(sizeof(*msg), GFP_KERNEL);
  1597		if (!msg)
  1598			return -ENOMEM;
  1599	
  1600		INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
  1601	
  1602		bss = &msg->bss_params;
  1603		sta_params = &bss->sta;
  1604	
  1605		wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
  1606		wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
  1607	
  1608		PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
  1609	
  1610		wcn36xx_dbg(WCN36XX_DBG_HAL,
  1611			    "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
  1612			    bss->bssid, bss->self_mac_addr, bss->bss_type,
  1613			    bss->oper_mode, bss->nw_type);
  1614	
  1615		wcn36xx_dbg(WCN36XX_DBG_HAL,
  1616			    "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
  1617			    sta_params->bssid, sta_params->action,
  1618			    sta_params->sta_index, sta_params->bssid_index,
  1619			    sta_params->aid, sta_params->type,
  1620			    sta_params->mac);
  1621	
  1622		ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
  1623		kfree(msg);
  1624	
  1625		return ret;
  1626	}
  1627	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 7e3302ba97fa..e603e2d3be16 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1584,6 +1584,47 @@  static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn,
 	return ret;
 }
 
+int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif,
+			      struct ieee80211_sta *sta, const u8 *bssid,
+			      bool update)
+{
+	struct wcn36xx_hal_config_bss_req_msg *msg;
+	struct wcn36xx_hal_config_bss_params *bss;
+	struct wcn36xx_hal_config_sta_params *sta_params;
+	int ret;
+
+	msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+	if (!msg)
+		return -ENOMEM;
+
+	INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ);
+
+	bss = &msg->bss_params;
+	sta_params = &bss->sta;
+
+	wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss);
+	wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params);
+
+	PREPARE_HAL_BUF(wcn->hal_buf, (*msg));
+
+	wcn36xx_dbg(WCN36XX_DBG_HAL,
+		    "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n",
+		    bss->bssid, bss->self_mac_addr, bss->bss_type,
+		    bss->oper_mode, bss->nw_type);
+
+	wcn36xx_dbg(WCN36XX_DBG_HAL,
+		    "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n",
+		    sta_params->bssid, sta_params->action,
+		    sta_params->sta_index, sta_params->bssid_index,
+		    sta_params->aid, sta_params->type,
+		    sta_params->mac);
+
+	ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len);
+	kfree(msg);
+
+	return ret;
+}
+
 static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn,
 				      struct ieee80211_vif *vif,
 				      struct ieee80211_sta *sta,