Message ID | 1536560670-4292-1-git-send-email-bpothuno@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] ath10k: management tx ack rssi capability check | expand |
Hi Balaji, Thank you for the patch! Yet something to improve: [auto build test ERROR on ath6kl/ath-next] [cannot apply to v4.19-rc3 next-20180910] [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/Balaji-Pothunoori/ath10k-management-tx-ack-rssi-capability-check/20180911-105502 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 8.1.0 reproduce: 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 GCC_VERSION=8.1.0 make.cross ARCH=xtensa All errors (new ones prefixed by >>): drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register': >> drivers/net/wireless/ath/ath10k/mac.c:8485:11: error: 'NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT' undeclared (first use in this function); did you mean 'NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT'? NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT drivers/net/wireless/ath/ath10k/mac.c:8485:11: note: each undeclared identifier is reported only once for each function it appears in vim +8485 drivers/net/wireless/ath/ath10k/mac.c 8299 8300 int ath10k_mac_register(struct ath10k *ar) 8301 { 8302 static const u32 cipher_suites[] = { 8303 WLAN_CIPHER_SUITE_WEP40, 8304 WLAN_CIPHER_SUITE_WEP104, 8305 WLAN_CIPHER_SUITE_TKIP, 8306 WLAN_CIPHER_SUITE_CCMP, 8307 8308 /* Do not add hardware supported ciphers before this line. 8309 * Allow software encryption for all chips. Don't forget to 8310 * update n_cipher_suites below. 8311 */ 8312 WLAN_CIPHER_SUITE_AES_CMAC, 8313 WLAN_CIPHER_SUITE_BIP_CMAC_256, 8314 WLAN_CIPHER_SUITE_BIP_GMAC_128, 8315 WLAN_CIPHER_SUITE_BIP_GMAC_256, 8316 8317 /* Only QCA99x0 and QCA4019 varients support GCMP-128, GCMP-256 8318 * and CCMP-256 in hardware. 8319 */ 8320 WLAN_CIPHER_SUITE_GCMP, 8321 WLAN_CIPHER_SUITE_GCMP_256, 8322 WLAN_CIPHER_SUITE_CCMP_256, 8323 }; 8324 struct ieee80211_supported_band *band; 8325 void *channels; 8326 int ret; 8327 8328 SET_IEEE80211_PERM_ADDR(ar->hw, ar->mac_addr); 8329 8330 SET_IEEE80211_DEV(ar->hw, ar->dev); 8331 8332 BUILD_BUG_ON((ARRAY_SIZE(ath10k_2ghz_channels) + 8333 ARRAY_SIZE(ath10k_5ghz_channels)) != 8334 ATH10K_NUM_CHANS); 8335 8336 if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { 8337 channels = kmemdup(ath10k_2ghz_channels, 8338 sizeof(ath10k_2ghz_channels), 8339 GFP_KERNEL); 8340 if (!channels) { 8341 ret = -ENOMEM; 8342 goto err_free; 8343 } 8344 8345 band = &ar->mac.sbands[NL80211_BAND_2GHZ]; 8346 band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); 8347 band->channels = channels; 8348 8349 if (ar->hw_params.cck_rate_map_rev2) { 8350 band->n_bitrates = ath10k_g_rates_rev2_size; 8351 band->bitrates = ath10k_g_rates_rev2; 8352 } else { 8353 band->n_bitrates = ath10k_g_rates_size; 8354 band->bitrates = ath10k_g_rates; 8355 } 8356 8357 ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = band; 8358 } 8359 8360 if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { 8361 channels = kmemdup(ath10k_5ghz_channels, 8362 sizeof(ath10k_5ghz_channels), 8363 GFP_KERNEL); 8364 if (!channels) { 8365 ret = -ENOMEM; 8366 goto err_free; 8367 } 8368 8369 band = &ar->mac.sbands[NL80211_BAND_5GHZ]; 8370 band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); 8371 band->channels = channels; 8372 band->n_bitrates = ath10k_a_rates_size; 8373 band->bitrates = ath10k_a_rates; 8374 ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; 8375 } 8376 8377 wiphy_read_of_freq_limits(ar->hw->wiphy); 8378 ath10k_mac_setup_ht_vht_cap(ar); 8379 8380 ar->hw->wiphy->interface_modes = 8381 BIT(NL80211_IFTYPE_STATION) | 8382 BIT(NL80211_IFTYPE_AP) | 8383 BIT(NL80211_IFTYPE_MESH_POINT); 8384 8385 ar->hw->wiphy->available_antennas_rx = ar->cfg_rx_chainmask; 8386 ar->hw->wiphy->available_antennas_tx = ar->cfg_tx_chainmask; 8387 8388 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->normal_mode_fw.fw_file.fw_features)) 8389 ar->hw->wiphy->interface_modes |= 8390 BIT(NL80211_IFTYPE_P2P_DEVICE) | 8391 BIT(NL80211_IFTYPE_P2P_CLIENT) | 8392 BIT(NL80211_IFTYPE_P2P_GO); 8393 8394 ieee80211_hw_set(ar->hw, SIGNAL_DBM); 8395 8396 if (!test_bit(ATH10K_FW_FEATURE_NO_PS, 8397 ar->running_fw->fw_file.fw_features)) { 8398 ieee80211_hw_set(ar->hw, SUPPORTS_PS); 8399 ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS); 8400 } 8401 8402 ieee80211_hw_set(ar->hw, MFP_CAPABLE); 8403 ieee80211_hw_set(ar->hw, REPORTS_TX_ACK_STATUS); 8404 ieee80211_hw_set(ar->hw, HAS_RATE_CONTROL); 8405 ieee80211_hw_set(ar->hw, AP_LINK_PS); 8406 ieee80211_hw_set(ar->hw, SPECTRUM_MGMT); 8407 ieee80211_hw_set(ar->hw, SUPPORT_FAST_XMIT); 8408 ieee80211_hw_set(ar->hw, CONNECTION_MONITOR); 8409 ieee80211_hw_set(ar->hw, SUPPORTS_PER_STA_GTK); 8410 ieee80211_hw_set(ar->hw, WANT_MONITOR_VIF); 8411 ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); 8412 ieee80211_hw_set(ar->hw, QUEUE_CONTROL); 8413 ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); 8414 ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK); 8415 8416 if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) 8417 ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL); 8418 8419 ar->hw->wiphy->features |= NL80211_FEATURE_STATIC_SMPS; 8420 ar->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 8421 8422 if (ar->ht_cap_info & WMI_HT_CAP_DYNAMIC_SMPS) 8423 ar->hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS; 8424 8425 if (ar->ht_cap_info & WMI_HT_CAP_ENABLED) { 8426 ieee80211_hw_set(ar->hw, AMPDU_AGGREGATION); 8427 ieee80211_hw_set(ar->hw, TX_AMPDU_SETUP_IN_HW); 8428 } 8429 8430 ar->hw->wiphy->max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID; 8431 ar->hw->wiphy->max_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN; 8432 8433 ar->hw->vif_data_size = sizeof(struct ath10k_vif); 8434 ar->hw->sta_data_size = sizeof(struct ath10k_sta); 8435 ar->hw->txq_data_size = sizeof(struct ath10k_txq); 8436 8437 ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL; 8438 8439 if (test_bit(WMI_SERVICE_BEACON_OFFLOAD, ar->wmi.svc_map)) { 8440 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; 8441 8442 /* Firmware delivers WPS/P2P Probe Requests frames to driver so 8443 * that userspace (e.g. wpa_supplicant/hostapd) can generate 8444 * correct Probe Responses. This is more of a hack advert.. 8445 */ 8446 ar->hw->wiphy->probe_resp_offload |= 8447 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | 8448 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | 8449 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; 8450 } 8451 8452 if (test_bit(WMI_SERVICE_TDLS, ar->wmi.svc_map) || 8453 test_bit(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, ar->wmi.svc_map)) { 8454 ar->hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; 8455 if (test_bit(WMI_SERVICE_TDLS_WIDER_BANDWIDTH, ar->wmi.svc_map)) 8456 ieee80211_hw_set(ar->hw, TDLS_WIDER_BW); 8457 } 8458 8459 if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map)) 8460 ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA); 8461 8462 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; 8463 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; 8464 ar->hw->wiphy->max_remain_on_channel_duration = 5000; 8465 8466 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; 8467 ar->hw->wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE | 8468 NL80211_FEATURE_AP_SCAN; 8469 8470 ar->hw->wiphy->max_ap_assoc_sta = ar->max_num_stations; 8471 8472 ret = ath10k_wow_init(ar); 8473 if (ret) { 8474 ath10k_warn(ar, "failed to init wow: %d\n", ret); 8475 goto err_free; 8476 } 8477 8478 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS); 8479 wiphy_ext_feature_set(ar->hw->wiphy, 8480 NL80211_EXT_FEATURE_SET_SCAN_DWELL); 8481 8482 if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) || 8483 test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map)) 8484 wiphy_ext_feature_set(ar->hw->wiphy, > 8485 NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); 8486 8487 /* 8488 * on LL hardware queues are managed entirely by the FW 8489 * so we only advertise to mac we can do the queues thing 8490 */ 8491 ar->hw->queues = IEEE80211_MAX_QUEUES; 8492 8493 /* vdev_ids are used as hw queue numbers. Make sure offchan tx queue is 8494 * something that vdev_ids can't reach so that we don't stop the queue 8495 * accidentally. 8496 */ 8497 ar->hw->offchannel_tx_hw_queue = IEEE80211_MAX_QUEUES - 1; 8498 8499 switch (ar->running_fw->fw_file.wmi_op_version) { 8500 case ATH10K_FW_WMI_OP_VERSION_MAIN: 8501 ar->hw->wiphy->iface_combinations = ath10k_if_comb; 8502 ar->hw->wiphy->n_iface_combinations = 8503 ARRAY_SIZE(ath10k_if_comb); 8504 ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); 8505 break; 8506 case ATH10K_FW_WMI_OP_VERSION_TLV: 8507 if (test_bit(WMI_SERVICE_ADAPTIVE_OCS, ar->wmi.svc_map)) { 8508 ar->hw->wiphy->iface_combinations = 8509 ath10k_tlv_qcs_if_comb; 8510 ar->hw->wiphy->n_iface_combinations = 8511 ARRAY_SIZE(ath10k_tlv_qcs_if_comb); 8512 } else { 8513 ar->hw->wiphy->iface_combinations = ath10k_tlv_if_comb; 8514 ar->hw->wiphy->n_iface_combinations = 8515 ARRAY_SIZE(ath10k_tlv_if_comb); 8516 } 8517 ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); 8518 break; 8519 case ATH10K_FW_WMI_OP_VERSION_10_1: 8520 case ATH10K_FW_WMI_OP_VERSION_10_2: 8521 case ATH10K_FW_WMI_OP_VERSION_10_2_4: 8522 ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; 8523 ar->hw->wiphy->n_iface_combinations = 8524 ARRAY_SIZE(ath10k_10x_if_comb); 8525 break; 8526 case ATH10K_FW_WMI_OP_VERSION_10_4: 8527 ar->hw->wiphy->iface_combinations = ath10k_10_4_if_comb; 8528 ar->hw->wiphy->n_iface_combinations = 8529 ARRAY_SIZE(ath10k_10_4_if_comb); 8530 break; 8531 case ATH10K_FW_WMI_OP_VERSION_UNSET: 8532 case ATH10K_FW_WMI_OP_VERSION_MAX: 8533 WARN_ON(1); 8534 ret = -EINVAL; 8535 goto err_free; 8536 } 8537 8538 if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) 8539 ar->hw->netdev_features = NETIF_F_HW_CSUM; 8540 8541 if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) { 8542 /* Init ath dfs pattern detector */ 8543 ar->ath_common.debug_mask = ATH_DBG_DFS; 8544 ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common, 8545 NL80211_DFS_UNSET); 8546 8547 if (!ar->dfs_detector) 8548 ath10k_warn(ar, "failed to initialise DFS pattern detector\n"); 8549 } 8550 8551 ret = ath10k_mac_init_rd(ar); 8552 if (ret) { 8553 ath10k_err(ar, "failed to derive regdom: %d\n", ret); 8554 goto err_dfs_detector_exit; 8555 } 8556 8557 /* Disable set_coverage_class for chipsets that do not support it. */ 8558 if (!ar->hw_params.hw_ops->set_coverage_class) 8559 ar->ops->set_coverage_class = NULL; 8560 8561 ret = ath_regd_init(&ar->ath_common.regulatory, ar->hw->wiphy, 8562 ath10k_reg_notifier); 8563 if (ret) { 8564 ath10k_err(ar, "failed to initialise regulatory: %i\n", ret); 8565 goto err_dfs_detector_exit; 8566 } 8567 8568 if (test_bit(WMI_SERVICE_SPOOF_MAC_SUPPORT, ar->wmi.svc_map)) { 8569 ret = ath10k_wmi_scan_prob_req_oui(ar, ar->mac_addr); 8570 if (ret) { 8571 ath10k_err(ar, "failed to set prob req oui: %i\n", ret); 8572 goto err_dfs_detector_exit; 8573 } 8574 8575 ar->hw->wiphy->features |= 8576 NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; 8577 } 8578 8579 ar->hw->wiphy->cipher_suites = cipher_suites; 8580 8581 /* QCA988x and QCA6174 family chips do not support CCMP-256, GCMP-128 8582 * and GCMP-256 ciphers in hardware. Fetch number of ciphers supported 8583 * from chip specific hw_param table. 8584 */ 8585 if (!ar->hw_params.n_cipher_suites || 8586 ar->hw_params.n_cipher_suites > ARRAY_SIZE(cipher_suites)) { 8587 ath10k_err(ar, "invalid hw_params.n_cipher_suites %d\n", 8588 ar->hw_params.n_cipher_suites); 8589 ar->hw_params.n_cipher_suites = 8; 8590 } 8591 ar->hw->wiphy->n_cipher_suites = ar->hw_params.n_cipher_suites; 8592 8593 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 8594 8595 ret = ieee80211_register_hw(ar->hw); 8596 if (ret) { 8597 ath10k_err(ar, "failed to register ieee80211: %d\n", ret); 8598 goto err_dfs_detector_exit; 8599 } 8600 8601 if (!ath_is_world_regd(&ar->ath_common.regulatory)) { 8602 ret = regulatory_hint(ar->hw->wiphy, 8603 ar->ath_common.regulatory.alpha2); 8604 if (ret) 8605 goto err_unregister; 8606 } 8607 8608 return 0; 8609 8610 err_unregister: 8611 ieee80211_unregister_hw(ar->hw); 8612 8613 err_dfs_detector_exit: 8614 if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) 8615 ar->dfs_detector->exit(ar->dfs_detector); 8616 8617 err_free: 8618 kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); 8619 kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); 8620 8621 SET_IEEE80211_DEV(ar->hw, NULL); 8622 return ret; 8623 } 8624 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Balaji, Thank you for the patch! Yet something to improve: [auto build test ERROR on ath6kl/ath-next] [cannot apply to v4.19-rc3 next-20180910] [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/Balaji-Pothunoori/ath10k-management-tx-ack-rssi-capability-check/20180911-105502 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next config: x86_64-randconfig-g0-09111118 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/net//wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register': >> drivers/net//wireless/ath/ath10k/mac.c:8485:11: error: 'NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT' undeclared (first use in this function) NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); ^ drivers/net//wireless/ath/ath10k/mac.c:8485:11: note: each undeclared identifier is reported only once for each function it appears in vim +/NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT +8485 drivers/net//wireless/ath/ath10k/mac.c 8299 8300 int ath10k_mac_register(struct ath10k *ar) 8301 { 8302 static const u32 cipher_suites[] = { 8303 WLAN_CIPHER_SUITE_WEP40, 8304 WLAN_CIPHER_SUITE_WEP104, 8305 WLAN_CIPHER_SUITE_TKIP, 8306 WLAN_CIPHER_SUITE_CCMP, 8307 8308 /* Do not add hardware supported ciphers before this line. 8309 * Allow software encryption for all chips. Don't forget to 8310 * update n_cipher_suites below. 8311 */ 8312 WLAN_CIPHER_SUITE_AES_CMAC, 8313 WLAN_CIPHER_SUITE_BIP_CMAC_256, 8314 WLAN_CIPHER_SUITE_BIP_GMAC_128, 8315 WLAN_CIPHER_SUITE_BIP_GMAC_256, 8316 8317 /* Only QCA99x0 and QCA4019 varients support GCMP-128, GCMP-256 8318 * and CCMP-256 in hardware. 8319 */ 8320 WLAN_CIPHER_SUITE_GCMP, 8321 WLAN_CIPHER_SUITE_GCMP_256, 8322 WLAN_CIPHER_SUITE_CCMP_256, 8323 }; 8324 struct ieee80211_supported_band *band; 8325 void *channels; 8326 int ret; 8327 8328 SET_IEEE80211_PERM_ADDR(ar->hw, ar->mac_addr); 8329 8330 SET_IEEE80211_DEV(ar->hw, ar->dev); 8331 8332 BUILD_BUG_ON((ARRAY_SIZE(ath10k_2ghz_channels) + 8333 ARRAY_SIZE(ath10k_5ghz_channels)) != 8334 ATH10K_NUM_CHANS); 8335 8336 if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { 8337 channels = kmemdup(ath10k_2ghz_channels, 8338 sizeof(ath10k_2ghz_channels), 8339 GFP_KERNEL); 8340 if (!channels) { 8341 ret = -ENOMEM; 8342 goto err_free; 8343 } 8344 8345 band = &ar->mac.sbands[NL80211_BAND_2GHZ]; 8346 band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); 8347 band->channels = channels; 8348 8349 if (ar->hw_params.cck_rate_map_rev2) { 8350 band->n_bitrates = ath10k_g_rates_rev2_size; 8351 band->bitrates = ath10k_g_rates_rev2; 8352 } else { 8353 band->n_bitrates = ath10k_g_rates_size; 8354 band->bitrates = ath10k_g_rates; 8355 } 8356 8357 ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = band; 8358 } 8359 8360 if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { 8361 channels = kmemdup(ath10k_5ghz_channels, 8362 sizeof(ath10k_5ghz_channels), 8363 GFP_KERNEL); 8364 if (!channels) { 8365 ret = -ENOMEM; 8366 goto err_free; 8367 } 8368 8369 band = &ar->mac.sbands[NL80211_BAND_5GHZ]; 8370 band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); 8371 band->channels = channels; 8372 band->n_bitrates = ath10k_a_rates_size; 8373 band->bitrates = ath10k_a_rates; 8374 ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; 8375 } 8376 8377 wiphy_read_of_freq_limits(ar->hw->wiphy); 8378 ath10k_mac_setup_ht_vht_cap(ar); 8379 8380 ar->hw->wiphy->interface_modes = 8381 BIT(NL80211_IFTYPE_STATION) | 8382 BIT(NL80211_IFTYPE_AP) | 8383 BIT(NL80211_IFTYPE_MESH_POINT); 8384 8385 ar->hw->wiphy->available_antennas_rx = ar->cfg_rx_chainmask; 8386 ar->hw->wiphy->available_antennas_tx = ar->cfg_tx_chainmask; 8387 8388 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->normal_mode_fw.fw_file.fw_features)) 8389 ar->hw->wiphy->interface_modes |= 8390 BIT(NL80211_IFTYPE_P2P_DEVICE) | 8391 BIT(NL80211_IFTYPE_P2P_CLIENT) | 8392 BIT(NL80211_IFTYPE_P2P_GO); 8393 8394 ieee80211_hw_set(ar->hw, SIGNAL_DBM); 8395 8396 if (!test_bit(ATH10K_FW_FEATURE_NO_PS, 8397 ar->running_fw->fw_file.fw_features)) { 8398 ieee80211_hw_set(ar->hw, SUPPORTS_PS); 8399 ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS); 8400 } 8401 8402 ieee80211_hw_set(ar->hw, MFP_CAPABLE); 8403 ieee80211_hw_set(ar->hw, REPORTS_TX_ACK_STATUS); 8404 ieee80211_hw_set(ar->hw, HAS_RATE_CONTROL); 8405 ieee80211_hw_set(ar->hw, AP_LINK_PS); 8406 ieee80211_hw_set(ar->hw, SPECTRUM_MGMT); 8407 ieee80211_hw_set(ar->hw, SUPPORT_FAST_XMIT); 8408 ieee80211_hw_set(ar->hw, CONNECTION_MONITOR); 8409 ieee80211_hw_set(ar->hw, SUPPORTS_PER_STA_GTK); 8410 ieee80211_hw_set(ar->hw, WANT_MONITOR_VIF); 8411 ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); 8412 ieee80211_hw_set(ar->hw, QUEUE_CONTROL); 8413 ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); 8414 ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK); 8415 8416 if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) 8417 ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL); 8418 8419 ar->hw->wiphy->features |= NL80211_FEATURE_STATIC_SMPS; 8420 ar->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 8421 8422 if (ar->ht_cap_info & WMI_HT_CAP_DYNAMIC_SMPS) 8423 ar->hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS; 8424 8425 if (ar->ht_cap_info & WMI_HT_CAP_ENABLED) { 8426 ieee80211_hw_set(ar->hw, AMPDU_AGGREGATION); 8427 ieee80211_hw_set(ar->hw, TX_AMPDU_SETUP_IN_HW); 8428 } 8429 8430 ar->hw->wiphy->max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID; 8431 ar->hw->wiphy->max_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN; 8432 8433 ar->hw->vif_data_size = sizeof(struct ath10k_vif); 8434 ar->hw->sta_data_size = sizeof(struct ath10k_sta); 8435 ar->hw->txq_data_size = sizeof(struct ath10k_txq); 8436 8437 ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL; 8438 8439 if (test_bit(WMI_SERVICE_BEACON_OFFLOAD, ar->wmi.svc_map)) { 8440 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; 8441 8442 /* Firmware delivers WPS/P2P Probe Requests frames to driver so 8443 * that userspace (e.g. wpa_supplicant/hostapd) can generate 8444 * correct Probe Responses. This is more of a hack advert.. 8445 */ 8446 ar->hw->wiphy->probe_resp_offload |= 8447 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | 8448 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | 8449 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; 8450 } 8451 8452 if (test_bit(WMI_SERVICE_TDLS, ar->wmi.svc_map) || 8453 test_bit(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, ar->wmi.svc_map)) { 8454 ar->hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; 8455 if (test_bit(WMI_SERVICE_TDLS_WIDER_BANDWIDTH, ar->wmi.svc_map)) 8456 ieee80211_hw_set(ar->hw, TDLS_WIDER_BW); 8457 } 8458 8459 if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map)) 8460 ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA); 8461 8462 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; 8463 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; 8464 ar->hw->wiphy->max_remain_on_channel_duration = 5000; 8465 8466 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; 8467 ar->hw->wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE | 8468 NL80211_FEATURE_AP_SCAN; 8469 8470 ar->hw->wiphy->max_ap_assoc_sta = ar->max_num_stations; 8471 8472 ret = ath10k_wow_init(ar); 8473 if (ret) { 8474 ath10k_warn(ar, "failed to init wow: %d\n", ret); 8475 goto err_free; 8476 } 8477 8478 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS); 8479 wiphy_ext_feature_set(ar->hw->wiphy, 8480 NL80211_EXT_FEATURE_SET_SCAN_DWELL); 8481 8482 if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) || 8483 test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map)) 8484 wiphy_ext_feature_set(ar->hw->wiphy, > 8485 NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); 8486 8487 /* 8488 * on LL hardware queues are managed entirely by the FW 8489 * so we only advertise to mac we can do the queues thing 8490 */ 8491 ar->hw->queues = IEEE80211_MAX_QUEUES; 8492 8493 /* vdev_ids are used as hw queue numbers. Make sure offchan tx queue is 8494 * something that vdev_ids can't reach so that we don't stop the queue 8495 * accidentally. 8496 */ 8497 ar->hw->offchannel_tx_hw_queue = IEEE80211_MAX_QUEUES - 1; 8498 8499 switch (ar->running_fw->fw_file.wmi_op_version) { 8500 case ATH10K_FW_WMI_OP_VERSION_MAIN: 8501 ar->hw->wiphy->iface_combinations = ath10k_if_comb; 8502 ar->hw->wiphy->n_iface_combinations = 8503 ARRAY_SIZE(ath10k_if_comb); 8504 ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); 8505 break; 8506 case ATH10K_FW_WMI_OP_VERSION_TLV: 8507 if (test_bit(WMI_SERVICE_ADAPTIVE_OCS, ar->wmi.svc_map)) { 8508 ar->hw->wiphy->iface_combinations = 8509 ath10k_tlv_qcs_if_comb; 8510 ar->hw->wiphy->n_iface_combinations = 8511 ARRAY_SIZE(ath10k_tlv_qcs_if_comb); 8512 } else { 8513 ar->hw->wiphy->iface_combinations = ath10k_tlv_if_comb; 8514 ar->hw->wiphy->n_iface_combinations = 8515 ARRAY_SIZE(ath10k_tlv_if_comb); 8516 } 8517 ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC); 8518 break; 8519 case ATH10K_FW_WMI_OP_VERSION_10_1: 8520 case ATH10K_FW_WMI_OP_VERSION_10_2: 8521 case ATH10K_FW_WMI_OP_VERSION_10_2_4: 8522 ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; 8523 ar->hw->wiphy->n_iface_combinations = 8524 ARRAY_SIZE(ath10k_10x_if_comb); 8525 break; 8526 case ATH10K_FW_WMI_OP_VERSION_10_4: 8527 ar->hw->wiphy->iface_combinations = ath10k_10_4_if_comb; 8528 ar->hw->wiphy->n_iface_combinations = 8529 ARRAY_SIZE(ath10k_10_4_if_comb); 8530 break; 8531 case ATH10K_FW_WMI_OP_VERSION_UNSET: 8532 case ATH10K_FW_WMI_OP_VERSION_MAX: 8533 WARN_ON(1); 8534 ret = -EINVAL; 8535 goto err_free; 8536 } 8537 8538 if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) 8539 ar->hw->netdev_features = NETIF_F_HW_CSUM; 8540 8541 if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) { 8542 /* Init ath dfs pattern detector */ 8543 ar->ath_common.debug_mask = ATH_DBG_DFS; 8544 ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common, 8545 NL80211_DFS_UNSET); 8546 8547 if (!ar->dfs_detector) 8548 ath10k_warn(ar, "failed to initialise DFS pattern detector\n"); 8549 } 8550 8551 ret = ath10k_mac_init_rd(ar); 8552 if (ret) { 8553 ath10k_err(ar, "failed to derive regdom: %d\n", ret); 8554 goto err_dfs_detector_exit; 8555 } 8556 8557 /* Disable set_coverage_class for chipsets that do not support it. */ 8558 if (!ar->hw_params.hw_ops->set_coverage_class) 8559 ar->ops->set_coverage_class = NULL; 8560 8561 ret = ath_regd_init(&ar->ath_common.regulatory, ar->hw->wiphy, 8562 ath10k_reg_notifier); 8563 if (ret) { 8564 ath10k_err(ar, "failed to initialise regulatory: %i\n", ret); 8565 goto err_dfs_detector_exit; 8566 } 8567 8568 if (test_bit(WMI_SERVICE_SPOOF_MAC_SUPPORT, ar->wmi.svc_map)) { 8569 ret = ath10k_wmi_scan_prob_req_oui(ar, ar->mac_addr); 8570 if (ret) { 8571 ath10k_err(ar, "failed to set prob req oui: %i\n", ret); 8572 goto err_dfs_detector_exit; 8573 } 8574 8575 ar->hw->wiphy->features |= 8576 NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR; 8577 } 8578 8579 ar->hw->wiphy->cipher_suites = cipher_suites; 8580 8581 /* QCA988x and QCA6174 family chips do not support CCMP-256, GCMP-128 8582 * and GCMP-256 ciphers in hardware. Fetch number of ciphers supported 8583 * from chip specific hw_param table. 8584 */ 8585 if (!ar->hw_params.n_cipher_suites || 8586 ar->hw_params.n_cipher_suites > ARRAY_SIZE(cipher_suites)) { 8587 ath10k_err(ar, "invalid hw_params.n_cipher_suites %d\n", 8588 ar->hw_params.n_cipher_suites); 8589 ar->hw_params.n_cipher_suites = 8; 8590 } 8591 ar->hw->wiphy->n_cipher_suites = ar->hw_params.n_cipher_suites; 8592 8593 wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); 8594 8595 ret = ieee80211_register_hw(ar->hw); 8596 if (ret) { 8597 ath10k_err(ar, "failed to register ieee80211: %d\n", ret); 8598 goto err_dfs_detector_exit; 8599 } 8600 8601 if (!ath_is_world_regd(&ar->ath_common.regulatory)) { 8602 ret = regulatory_hint(ar->hw->wiphy, 8603 ar->ath_common.regulatory.alpha2); 8604 if (ret) 8605 goto err_unregister; 8606 } 8607 8608 return 0; 8609 8610 err_unregister: 8611 ieee80211_unregister_hw(ar->hw); 8612 8613 err_dfs_detector_exit: 8614 if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) 8615 ar->dfs_detector->exit(ar->dfs_detector); 8616 8617 err_free: 8618 kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); 8619 kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); 8620 8621 SET_IEEE80211_DEV(ar->hw, NULL); 8622 return ret; 8623 } 8624 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot <lkp@intel.com> writes: > Hi Balaji, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on ath6kl/ath-next] > [cannot apply to v4.19-rc3 next-20180910] > [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/Balaji-Pothunoori/ath10k-management-tx-ack-rssi-capability-check/20180911-105502 > base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next > config: xtensa-allmodconfig (attached as .config) > compiler: xtensa-linux-gcc (GCC) 8.1.0 > reproduce: > 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 > GCC_VERSION=8.1.0 make.cross ARCH=xtensa > > All errors (new ones prefixed by >>): > > drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register': >>> drivers/net/wireless/ath/ath10k/mac.c:8485:11: error: >> 'NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT' undeclared (first use in >> this function); did you mean >> 'NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT'? > NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT > drivers/net/wireless/ath/ath10k/mac.c:8485:11: note: each undeclared identifier is reported only once for each function it appears in This is expected as this depends on a cfg80211 patch not yet in my ath.git tree: 9c06602b1b92 cfg80211: clarify frames covered by average ACK signal report Currently in net-next.
Balaji Pothunoori <bpothuno@codeaurora.org> wrote: > Adding WMI service check for management tx ack rssi support; this is > done to maintain common avg ack signal in user level for both data > and management tx ack packet. > > Tested on QCA4019(fw version-10.4-3.2.1-00063). > > Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Patch applied to ath-next branch of ath.git, thanks. 6bc17950f4b2 ath10k: management tx ack rssi capability check
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 97548f9..84c6ecd 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -8479,9 +8479,10 @@ int ath10k_mac_register(struct ath10k *ar) wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); - if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map)) + if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) || + test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map)) wiphy_ext_feature_set(ar->hw->wiphy, - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT); + NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT); /* * on LL hardware queues are managed entirely by the FW
Adding WMI service check for management tx ack rssi support; this is done to maintain common avg ack signal in user level for both data and management tx ack packet. Tested on QCA4019(fw version-10.4-3.2.1-00063). Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org> --- v3: modified ack rssi support check to newly added command. cfg80211/mac80211 changes are already merged hence modified ath10k patch alone. drivers/net/wireless/ath/ath10k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)