Search Linux Wireless

Re: [PATCH] cfg80211: Add support for sending more than two AKMs in crypto settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Veerendranath,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main v5.18-rc3 next-20220414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Veerendranath-Jakkam/cfg80211-Add-support-for-sending-more-than-two-AKMs-in-crypto-settings/20220418-203101
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220419/202204191244.ExffeoFU-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 11.2.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
        # https://github.com/intel-lab-lkp/linux/commit/a90fd9fa52075529ae10224239a5b2c1ce156e34
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Veerendranath-Jakkam/cfg80211-Add-support-for-sending-more-than-two-AKMs-in-crypto-settings/20220418-203101
        git checkout a90fd9fa52075529ae10224239a5b2c1ce156e34
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:26,
                    from include/linux/skbuff.h:13,
                    from drivers/net/wireless/quantenna/qtnfmac/commands.c:5:
   drivers/net/wireless/quantenna/qtnfmac/commands.c: In function 'qtnf_cmd_send_connect':
>> drivers/net/wireless/quantenna/qtnfmac/commands.c:2138:54: error: 's' undeclared (first use in this function)
    2138 |         for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
         |                                                      ^
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   drivers/net/wireless/quantenna/qtnfmac/commands.c:2138:25: note: in expansion of macro 'min'
    2138 |         for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
         |                         ^~~
   drivers/net/wireless/quantenna/qtnfmac/commands.c:2138:54: note: each undeclared identifier is reported only once for each function it appears in
    2138 |         for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
         |                                                      ^
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   drivers/net/wireless/quantenna/qtnfmac/commands.c:2138:25: note: in expansion of macro 'min'
    2138 |         for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
         |                         ^~~
>> include/linux/minmax.h:36:9: error: first argument to '__builtin_choose_expr' not a constant
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   drivers/net/wireless/quantenna/qtnfmac/commands.c:2138:25: note: in expansion of macro 'min'
    2138 |         for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
         |                         ^~~


vim +/s +2138 drivers/net/wireless/quantenna/qtnfmac/commands.c

  2071	
  2072	int qtnf_cmd_send_connect(struct qtnf_vif *vif,
  2073				  struct cfg80211_connect_params *sme)
  2074	{
  2075		struct sk_buff *cmd_skb;
  2076		struct qlink_cmd_connect *cmd;
  2077		struct qlink_auth_encr *aen;
  2078		int ret;
  2079		int i;
  2080		u32 connect_flags = 0;
  2081	
  2082		cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
  2083						    QLINK_CMD_CONNECT,
  2084						    sizeof(*cmd));
  2085		if (!cmd_skb)
  2086			return -ENOMEM;
  2087	
  2088		cmd = (struct qlink_cmd_connect *)cmd_skb->data;
  2089	
  2090		ether_addr_copy(cmd->bssid, vif->bssid);
  2091	
  2092		if (sme->bssid_hint)
  2093			ether_addr_copy(cmd->bssid_hint, sme->bssid_hint);
  2094		else
  2095			eth_zero_addr(cmd->bssid_hint);
  2096	
  2097		if (sme->prev_bssid)
  2098			ether_addr_copy(cmd->prev_bssid, sme->prev_bssid);
  2099		else
  2100			eth_zero_addr(cmd->prev_bssid);
  2101	
  2102		if ((sme->bg_scan_period >= 0) &&
  2103		    (sme->bg_scan_period <= SHRT_MAX))
  2104			cmd->bg_scan_period = cpu_to_le16(sme->bg_scan_period);
  2105		else
  2106			cmd->bg_scan_period = cpu_to_le16(-1); /* use default value */
  2107	
  2108		if (sme->flags & ASSOC_REQ_DISABLE_HT)
  2109			connect_flags |= QLINK_STA_CONNECT_DISABLE_HT;
  2110		if (sme->flags & ASSOC_REQ_DISABLE_VHT)
  2111			connect_flags |= QLINK_STA_CONNECT_DISABLE_VHT;
  2112		if (sme->flags & ASSOC_REQ_USE_RRM)
  2113			connect_flags |= QLINK_STA_CONNECT_USE_RRM;
  2114	
  2115		cmd->flags = cpu_to_le32(connect_flags);
  2116		memcpy(&cmd->ht_capa, &sme->ht_capa, sizeof(cmd->ht_capa));
  2117		memcpy(&cmd->ht_capa_mask, &sme->ht_capa_mask,
  2118		       sizeof(cmd->ht_capa_mask));
  2119		memcpy(&cmd->vht_capa, &sme->vht_capa, sizeof(cmd->vht_capa));
  2120		memcpy(&cmd->vht_capa_mask, &sme->vht_capa_mask,
  2121		       sizeof(cmd->vht_capa_mask));
  2122		cmd->pbss = sme->pbss;
  2123	
  2124		aen = &cmd->aen;
  2125		aen->auth_type = sme->auth_type;
  2126		aen->privacy = !!sme->privacy;
  2127		cmd->mfp = sme->mfp;
  2128		aen->wpa_versions = cpu_to_le32(sme->crypto.wpa_versions);
  2129		aen->cipher_group = cpu_to_le32(sme->crypto.cipher_group);
  2130		aen->n_ciphers_pairwise = cpu_to_le32(sme->crypto.n_ciphers_pairwise);
  2131	
  2132		for (i = 0; i < QLINK_MAX_NR_CIPHER_SUITES; i++)
  2133			aen->ciphers_pairwise[i] =
  2134				cpu_to_le32(sme->crypto.ciphers_pairwise[i]);
  2135	
  2136		aen->n_akm_suites = cpu_to_le32(sme->crypto.n_akm_suites);
  2137	
> 2138		for (i = 0; i < min(QLINK_MAX_NR_AKM_SUITES, s->crypto.n_akm_suites);
  2139		     i++)
  2140			aen->akm_suites[i] = cpu_to_le32(sme->crypto.akm_suites[i]);
  2141	
  2142		aen->control_port = sme->crypto.control_port;
  2143		aen->control_port_no_encrypt =
  2144			sme->crypto.control_port_no_encrypt;
  2145		aen->control_port_ethertype =
  2146			cpu_to_le16(be16_to_cpu(sme->crypto.control_port_ethertype));
  2147	
  2148		qtnf_cmd_skb_put_tlv_arr(cmd_skb, WLAN_EID_SSID, sme->ssid,
  2149					 sme->ssid_len);
  2150	
  2151		if (sme->ie_len != 0)
  2152			qtnf_cmd_tlv_ie_set_add(cmd_skb, QLINK_IE_SET_ASSOC_REQ,
  2153						sme->ie, sme->ie_len);
  2154	
  2155		if (sme->channel)
  2156			qtnf_cmd_channel_tlv_add(cmd_skb, sme->channel);
  2157	
  2158		qtnf_bus_lock(vif->mac->bus);
  2159		ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
  2160		qtnf_bus_unlock(vif->mac->bus);
  2161	
  2162		return ret;
  2163	}
  2164	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux