Search Linux Wireless

Re: [PATCH] ath11k: dont enable bss color collision detection on non-transmitting BSS

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

 



Hi John,

I love your patch! Yet something to improve:

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v5.9-rc1 next-20200821]
[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/0day-ci/linux/commits/John-Crispin/ath11k-dont-enable-bss-color-collision-detection-on-non-transmitting-BSS/20200822-224145
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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=m68k 

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/asm-generic/bug.h:5,
                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/net/mac80211.h:16,
                    from drivers/net/wireless/ath/ath11k/mac.c:6:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_op_bss_info_changed':
>> drivers/net/wireless/ath/ath11k/mac.c:2083:16: error: 'struct ieee80211_vif' has no member named 'multiple_bssid'
    2083 |     !arvif->vif->multiple_bssid.non_transmitted ?
         |                ^~

# https://github.com/0day-ci/linux/commit/d4e470ff25713316c36087602c3ba595eae84ae2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review John-Crispin/ath11k-dont-enable-bss-color-collision-detection-on-non-transmitting-BSS/20200822-224145
git checkout d4e470ff25713316c36087602c3ba595eae84ae2
vim +2083 drivers/net/wireless/ath/ath11k/mac.c

  1841	
  1842	static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
  1843						   struct ieee80211_vif *vif,
  1844						   struct ieee80211_bss_conf *info,
  1845						   u32 changed)
  1846	{
  1847		struct ath11k *ar = hw->priv;
  1848		struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
  1849		struct cfg80211_chan_def def;
  1850		u32 param_id, param_value;
  1851		enum nl80211_band band;
  1852		u32 vdev_param;
  1853		int mcast_rate;
  1854		u32 preamble;
  1855		u16 hw_value;
  1856		u16 bitrate;
  1857		int ret = 0;
  1858		u8 rateidx;
  1859		u32 rate;
  1860	
  1861		mutex_lock(&ar->conf_mutex);
  1862	
  1863		if (changed & BSS_CHANGED_BEACON_INT) {
  1864			arvif->beacon_interval = info->beacon_int;
  1865	
  1866			param_id = WMI_VDEV_PARAM_BEACON_INTERVAL;
  1867			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1868							    param_id,
  1869							    arvif->beacon_interval);
  1870			if (ret)
  1871				ath11k_warn(ar->ab, "Failed to set beacon interval for VDEV: %d\n",
  1872					    arvif->vdev_id);
  1873			else
  1874				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  1875					   "Beacon interval: %d set for VDEV: %d\n",
  1876					   arvif->beacon_interval, arvif->vdev_id);
  1877		}
  1878	
  1879		if (changed & BSS_CHANGED_BEACON) {
  1880			param_id = WMI_PDEV_PARAM_BEACON_TX_MODE;
  1881			param_value = WMI_BEACON_STAGGERED_MODE;
  1882			ret = ath11k_wmi_pdev_set_param(ar, param_id,
  1883							param_value, ar->pdev->pdev_id);
  1884			if (ret)
  1885				ath11k_warn(ar->ab, "Failed to set beacon mode for VDEV: %d\n",
  1886					    arvif->vdev_id);
  1887			else
  1888				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  1889					   "Set staggered beacon mode for VDEV: %d\n",
  1890					   arvif->vdev_id);
  1891	
  1892			ret = ath11k_mac_setup_bcn_tmpl(arvif);
  1893			if (ret)
  1894				ath11k_warn(ar->ab, "failed to update bcn template: %d\n",
  1895					    ret);
  1896	
  1897			if (vif->bss_conf.he_support) {
  1898				ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1899								    WMI_VDEV_PARAM_BA_MODE,
  1900								    WMI_BA_MODE_BUFFER_SIZE_256);
  1901				if (ret)
  1902					ath11k_warn(ar->ab,
  1903						    "failed to set BA BUFFER SIZE 256 for vdev: %d\n",
  1904						    arvif->vdev_id);
  1905				else
  1906					ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  1907						   "Set BA BUFFER SIZE 256 for VDEV: %d\n",
  1908						   arvif->vdev_id);
  1909			}
  1910		}
  1911	
  1912		if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) {
  1913			arvif->dtim_period = info->dtim_period;
  1914	
  1915			param_id = WMI_VDEV_PARAM_DTIM_PERIOD;
  1916			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1917							    param_id,
  1918							    arvif->dtim_period);
  1919	
  1920			if (ret)
  1921				ath11k_warn(ar->ab, "Failed to set dtim period for VDEV %d: %i\n",
  1922					    arvif->vdev_id, ret);
  1923			else
  1924				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  1925					   "DTIM period: %d set for VDEV: %d\n",
  1926					   arvif->dtim_period, arvif->vdev_id);
  1927		}
  1928	
  1929		if (changed & BSS_CHANGED_SSID &&
  1930		    vif->type == NL80211_IFTYPE_AP) {
  1931			arvif->u.ap.ssid_len = info->ssid_len;
  1932			if (info->ssid_len)
  1933				memcpy(arvif->u.ap.ssid, info->ssid, info->ssid_len);
  1934			arvif->u.ap.hidden_ssid = info->hidden_ssid;
  1935		}
  1936	
  1937		if (changed & BSS_CHANGED_BSSID && !is_zero_ether_addr(info->bssid))
  1938			ether_addr_copy(arvif->bssid, info->bssid);
  1939	
  1940		if (changed & BSS_CHANGED_BEACON_ENABLED)
  1941			ath11k_control_beaconing(arvif, info);
  1942	
  1943		if (changed & BSS_CHANGED_ERP_CTS_PROT) {
  1944			u32 cts_prot;
  1945	
  1946			cts_prot = !!(info->use_cts_prot);
  1947			param_id = WMI_VDEV_PARAM_PROTECTION_MODE;
  1948	
  1949			if (arvif->is_started) {
  1950				ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1951								    param_id, cts_prot);
  1952				if (ret)
  1953					ath11k_warn(ar->ab, "Failed to set CTS prot for VDEV: %d\n",
  1954						    arvif->vdev_id);
  1955				else
  1956					ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "Set CTS prot: %d for VDEV: %d\n",
  1957						   cts_prot, arvif->vdev_id);
  1958			} else {
  1959				ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "defer protection mode setup, vdev is not ready yet\n");
  1960			}
  1961		}
  1962	
  1963		if (changed & BSS_CHANGED_ERP_SLOT) {
  1964			u32 slottime;
  1965	
  1966			if (info->use_short_slot)
  1967				slottime = WMI_VDEV_SLOT_TIME_SHORT; /* 9us */
  1968	
  1969			else
  1970				slottime = WMI_VDEV_SLOT_TIME_LONG; /* 20us */
  1971	
  1972			param_id = WMI_VDEV_PARAM_SLOT_TIME;
  1973			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1974							    param_id, slottime);
  1975			if (ret)
  1976				ath11k_warn(ar->ab, "Failed to set erp slot for VDEV: %d\n",
  1977					    arvif->vdev_id);
  1978			else
  1979				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  1980					   "Set slottime: %d for VDEV: %d\n",
  1981					   slottime, arvif->vdev_id);
  1982		}
  1983	
  1984		if (changed & BSS_CHANGED_ERP_PREAMBLE) {
  1985			u32 preamble;
  1986	
  1987			if (info->use_short_preamble)
  1988				preamble = WMI_VDEV_PREAMBLE_SHORT;
  1989			else
  1990				preamble = WMI_VDEV_PREAMBLE_LONG;
  1991	
  1992			param_id = WMI_VDEV_PARAM_PREAMBLE;
  1993			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  1994							    param_id, preamble);
  1995			if (ret)
  1996				ath11k_warn(ar->ab, "Failed to set preamble for VDEV: %d\n",
  1997					    arvif->vdev_id);
  1998			else
  1999				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  2000					   "Set preamble: %d for VDEV: %d\n",
  2001					   preamble, arvif->vdev_id);
  2002		}
  2003	
  2004		if (changed & BSS_CHANGED_ASSOC) {
  2005			if (info->assoc)
  2006				ath11k_bss_assoc(hw, vif, info);
  2007			else
  2008				ath11k_bss_disassoc(hw, vif);
  2009		}
  2010	
  2011		if (changed & BSS_CHANGED_TXPOWER) {
  2012			ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev_id %i txpower %d\n",
  2013				   arvif->vdev_id, info->txpower);
  2014	
  2015			arvif->txpower = info->txpower;
  2016			ath11k_mac_txpower_recalc(ar);
  2017		}
  2018	
  2019		if (changed & BSS_CHANGED_MCAST_RATE &&
  2020		    !ath11k_mac_vif_chan(arvif->vif, &def)) {
  2021			band = def.chan->band;
  2022			mcast_rate = vif->bss_conf.mcast_rate[band];
  2023	
  2024			if (mcast_rate > 0)
  2025				rateidx = mcast_rate - 1;
  2026			else
  2027				rateidx = ffs(vif->bss_conf.basic_rates) - 1;
  2028	
  2029			if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP)
  2030				rateidx += ATH11K_MAC_FIRST_OFDM_RATE_IDX;
  2031	
  2032			bitrate = ath11k_legacy_rates[rateidx].bitrate;
  2033			hw_value = ath11k_legacy_rates[rateidx].hw_value;
  2034	
  2035			if (ath11k_mac_bitrate_is_cck(bitrate))
  2036				preamble = WMI_RATE_PREAMBLE_CCK;
  2037			else
  2038				preamble = WMI_RATE_PREAMBLE_OFDM;
  2039	
  2040			rate = ATH11K_HW_RATE_CODE(hw_value, 0, preamble);
  2041	
  2042			ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
  2043				   "mac vdev %d mcast_rate %x\n",
  2044				   arvif->vdev_id, rate);
  2045	
  2046			vdev_param = WMI_VDEV_PARAM_MCAST_DATA_RATE;
  2047			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  2048							    vdev_param, rate);
  2049			if (ret)
  2050				ath11k_warn(ar->ab,
  2051					    "failed to set mcast rate on vdev %i: %d\n",
  2052					    arvif->vdev_id,  ret);
  2053	
  2054			vdev_param = WMI_VDEV_PARAM_BCAST_DATA_RATE;
  2055			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
  2056							    vdev_param, rate);
  2057			if (ret)
  2058				ath11k_warn(ar->ab,
  2059					    "failed to set bcast rate on vdev %i: %d\n",
  2060					    arvif->vdev_id,  ret);
  2061		}
  2062	
  2063		if (changed & BSS_CHANGED_BASIC_RATES &&
  2064		    !ath11k_mac_vif_chan(arvif->vif, &def))
  2065			ath11k_recalculate_mgmt_rate(ar, vif, &def);
  2066	
  2067		if (changed & BSS_CHANGED_TWT) {
  2068			if (info->twt_requester || info->twt_responder)
  2069				ath11k_wmi_send_twt_enable_cmd(ar, ar->pdev->pdev_id);
  2070			else
  2071				ath11k_wmi_send_twt_disable_cmd(ar, ar->pdev->pdev_id);
  2072		}
  2073	
  2074		if (changed & BSS_CHANGED_HE_OBSS_PD)
  2075			ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id,
  2076						     &info->he_obss_pd);
  2077	
  2078		if (changed & BSS_CHANGED_HE_BSS_COLOR) {
  2079			if (vif->type == NL80211_IFTYPE_AP) {
  2080				ret = ath11k_wmi_send_obss_color_collision_cfg_cmd(
  2081					ar, arvif->vdev_id, info->he_bss_color.color,
  2082					ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS,
> 2083					!arvif->vif->multiple_bssid.non_transmitted ?
  2084						info->he_bss_color.enabled : 0);
  2085				if (ret)
  2086					ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n",
  2087						    arvif->vdev_id,  ret);
  2088			} else if (vif->type == NL80211_IFTYPE_STATION) {
  2089				ret = ath11k_wmi_send_bss_color_change_enable_cmd(ar,
  2090										  arvif->vdev_id,
  2091										  1);
  2092				if (ret)
  2093					ath11k_warn(ar->ab, "failed to enable bss color change on vdev %i: %d\n",
  2094						    arvif->vdev_id,  ret);
  2095				ret = ath11k_wmi_send_obss_color_collision_cfg_cmd(
  2096					ar, arvif->vdev_id, 0,
  2097					ATH11K_BSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS, 1);
  2098				if (ret)
  2099					ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n",
  2100						    arvif->vdev_id,  ret);
  2101			}
  2102		}
  2103	
  2104		mutex_unlock(&ar->conf_mutex);
  2105	}
  2106	

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

Attachment: .config.gz
Description: application/gzip


[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