mac.c (7ebf721d0d47150f6e327a6ae2692779495a2c2a) | mac.c (c4cdf753ed4287467248126a4fac072fbba53b31) |
---|---|
1/* 2 * Copyright (c) 2005-2011 Atheros Communications Inc. 3 * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 1758 unchanged lines hidden (view full) --- 1767 1768 if (arvif->vif->type != NL80211_IFTYPE_STATION) 1769 return 0; 1770 1771 enable_ps = arvif->ps; 1772 1773 if (enable_ps && ath10k_mac_num_vifs_started(ar) > 1 && 1774 !test_bit(ATH10K_FW_FEATURE_MULTI_VIF_PS_SUPPORT, | 1/* 2 * Copyright (c) 2005-2011 Atheros Communications Inc. 3 * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 1758 unchanged lines hidden (view full) --- 1767 1768 if (arvif->vif->type != NL80211_IFTYPE_STATION) 1769 return 0; 1770 1771 enable_ps = arvif->ps; 1772 1773 if (enable_ps && ath10k_mac_num_vifs_started(ar) > 1 && 1774 !test_bit(ATH10K_FW_FEATURE_MULTI_VIF_PS_SUPPORT, |
1775 ar->fw_features)) { | 1775 ar->running_fw->fw_file.fw_features)) { |
1776 ath10k_warn(ar, "refusing to enable ps on vdev %i: not supported by fw\n", 1777 arvif->vdev_id); 1778 enable_ps = false; 1779 } 1780 1781 if (!arvif->is_started) { 1782 /* mac80211 can update vif powersave state while disconnected. 1783 * Firmware doesn't behave nicely and consumes more power than --- 271 unchanged lines hidden (view full) --- 2055 } 2056 2057 if (wpaie) { 2058 ath10k_dbg(ar, ATH10K_DBG_WMI, "%s: wpa ie found\n", __func__); 2059 arg->peer_flags |= ar->wmi.peer_flags->need_gtk_2_way; 2060 } 2061 2062 if (sta->mfp && | 1776 ath10k_warn(ar, "refusing to enable ps on vdev %i: not supported by fw\n", 1777 arvif->vdev_id); 1778 enable_ps = false; 1779 } 1780 1781 if (!arvif->is_started) { 1782 /* mac80211 can update vif powersave state while disconnected. 1783 * Firmware doesn't behave nicely and consumes more power than --- 271 unchanged lines hidden (view full) --- 2055 } 2056 2057 if (wpaie) { 2058 ath10k_dbg(ar, ATH10K_DBG_WMI, "%s: wpa ie found\n", __func__); 2059 arg->peer_flags |= ar->wmi.peer_flags->need_gtk_2_way; 2060 } 2061 2062 if (sta->mfp && |
2063 test_bit(ATH10K_FW_FEATURE_MFP_SUPPORT, ar->fw_features)) { | 2063 test_bit(ATH10K_FW_FEATURE_MFP_SUPPORT, 2064 ar->running_fw->fw_file.fw_features)) { |
2064 arg->peer_flags |= ar->wmi.peer_flags->pmf; 2065 } 2066} 2067 2068static void ath10k_peer_assoc_h_rates(struct ath10k *ar, 2069 struct ieee80211_vif *vif, 2070 struct ieee80211_sta *sta, 2071 struct wmi_peer_assoc_complete_arg *arg) --- 1130 unchanged lines hidden (view full) --- 3202 * NullFunc frames to driver. However there's a HTT Mgmt Tx command 3203 * which seems to deliver correct tx reports for NullFunc frames. The 3204 * downside of using it is it ignores client powersave state so it can 3205 * end up disconnecting sleeping clients in AP mode. It should fix STA 3206 * mode though because AP don't sleep. 3207 */ 3208 if (ar->htt.target_version_major < 3 && 3209 (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) && | 2065 arg->peer_flags |= ar->wmi.peer_flags->pmf; 2066 } 2067} 2068 2069static void ath10k_peer_assoc_h_rates(struct ath10k *ar, 2070 struct ieee80211_vif *vif, 2071 struct ieee80211_sta *sta, 2072 struct wmi_peer_assoc_complete_arg *arg) --- 1130 unchanged lines hidden (view full) --- 3203 * NullFunc frames to driver. However there's a HTT Mgmt Tx command 3204 * which seems to deliver correct tx reports for NullFunc frames. The 3205 * downside of using it is it ignores client powersave state so it can 3206 * end up disconnecting sleeping clients in AP mode. It should fix STA 3207 * mode though because AP don't sleep. 3208 */ 3209 if (ar->htt.target_version_major < 3 && 3210 (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) && |
3210 !test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, ar->fw_features)) | 3211 !test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, 3212 ar->running_fw->fw_file.fw_features)) |
3211 return ATH10K_HW_TXRX_MGMT; 3212 3213 /* Workaround: 3214 * 3215 * Some wmi-tlv firmwares for qca6174 have broken Tx key selection for 3216 * NativeWifi txmode - it selects AP key instead of peer key. It seems 3217 * to work with Ethernet txmode so use it. 3218 * --- 170 unchanged lines hidden (view full) --- 3389{ 3390 switch (txmode) { 3391 case ATH10K_HW_TXRX_RAW: 3392 case ATH10K_HW_TXRX_NATIVE_WIFI: 3393 case ATH10K_HW_TXRX_ETHERNET: 3394 return ATH10K_MAC_TX_HTT; 3395 case ATH10K_HW_TXRX_MGMT: 3396 if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, | 3213 return ATH10K_HW_TXRX_MGMT; 3214 3215 /* Workaround: 3216 * 3217 * Some wmi-tlv firmwares for qca6174 have broken Tx key selection for 3218 * NativeWifi txmode - it selects AP key instead of peer key. It seems 3219 * to work with Ethernet txmode so use it. 3220 * --- 170 unchanged lines hidden (view full) --- 3391{ 3392 switch (txmode) { 3393 case ATH10K_HW_TXRX_RAW: 3394 case ATH10K_HW_TXRX_NATIVE_WIFI: 3395 case ATH10K_HW_TXRX_ETHERNET: 3396 return ATH10K_MAC_TX_HTT; 3397 case ATH10K_HW_TXRX_MGMT: 3398 if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, |
3397 ar->fw_features)) | 3399 ar->running_fw->fw_file.fw_features)) |
3398 return ATH10K_MAC_TX_WMI_MGMT; 3399 else if (ar->htt.target_version_major >= 3) 3400 return ATH10K_MAC_TX_HTT; 3401 else 3402 return ATH10K_MAC_TX_HTT_MGMT; 3403 } 3404 3405 return ATH10K_MAC_TX_UNKNOWN; --- 1024 unchanged lines hidden (view full) --- 4430 ret = ath10k_wmi_pdev_set_param(ar, param, 0); 4431 if (ret) { 4432 ath10k_warn(ar, "failed to set arp ac override parameter: %d\n", 4433 ret); 4434 goto err_core_stop; 4435 } 4436 4437 if (test_bit(ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA, | 3400 return ATH10K_MAC_TX_WMI_MGMT; 3401 else if (ar->htt.target_version_major >= 3) 3402 return ATH10K_MAC_TX_HTT; 3403 else 3404 return ATH10K_MAC_TX_HTT_MGMT; 3405 } 3406 3407 return ATH10K_MAC_TX_UNKNOWN; --- 1024 unchanged lines hidden (view full) --- 4432 ret = ath10k_wmi_pdev_set_param(ar, param, 0); 4433 if (ret) { 4434 ath10k_warn(ar, "failed to set arp ac override parameter: %d\n", 4435 ret); 4436 goto err_core_stop; 4437 } 4438 4439 if (test_bit(ATH10K_FW_FEATURE_SUPPORTS_ADAPTIVE_CCA, |
4438 ar->fw_features)) { | 4440 ar->running_fw->fw_file.fw_features)) { |
4439 ret = ath10k_wmi_pdev_enable_adaptive_cca(ar, 1, 4440 WMI_CCA_DETECT_LEVEL_AUTO, 4441 WMI_CCA_DETECT_MARGIN_AUTO); 4442 if (ret) { 4443 ath10k_warn(ar, "failed to enable adaptive cca: %d\n", 4444 ret); 4445 goto err_core_stop; 4446 } --- 3242 unchanged lines hidden (view full) --- 7689 ar->hw->wiphy->interface_modes = 7690 BIT(NL80211_IFTYPE_STATION) | 7691 BIT(NL80211_IFTYPE_AP) | 7692 BIT(NL80211_IFTYPE_MESH_POINT); 7693 7694 ar->hw->wiphy->available_antennas_rx = ar->cfg_rx_chainmask; 7695 ar->hw->wiphy->available_antennas_tx = ar->cfg_tx_chainmask; 7696 | 4441 ret = ath10k_wmi_pdev_enable_adaptive_cca(ar, 1, 4442 WMI_CCA_DETECT_LEVEL_AUTO, 4443 WMI_CCA_DETECT_MARGIN_AUTO); 4444 if (ret) { 4445 ath10k_warn(ar, "failed to enable adaptive cca: %d\n", 4446 ret); 4447 goto err_core_stop; 4448 } --- 3242 unchanged lines hidden (view full) --- 7691 ar->hw->wiphy->interface_modes = 7692 BIT(NL80211_IFTYPE_STATION) | 7693 BIT(NL80211_IFTYPE_AP) | 7694 BIT(NL80211_IFTYPE_MESH_POINT); 7695 7696 ar->hw->wiphy->available_antennas_rx = ar->cfg_rx_chainmask; 7697 ar->hw->wiphy->available_antennas_tx = ar->cfg_tx_chainmask; 7698 |
7697 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features)) | 7699 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->normal_mode_fw.fw_file.fw_features)) |
7698 ar->hw->wiphy->interface_modes |= 7699 BIT(NL80211_IFTYPE_P2P_DEVICE) | 7700 BIT(NL80211_IFTYPE_P2P_CLIENT) | 7701 BIT(NL80211_IFTYPE_P2P_GO); 7702 7703 ieee80211_hw_set(ar->hw, SIGNAL_DBM); 7704 ieee80211_hw_set(ar->hw, SUPPORTS_PS); 7705 ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS); --- 185 unchanged lines hidden --- | 7700 ar->hw->wiphy->interface_modes |= 7701 BIT(NL80211_IFTYPE_P2P_DEVICE) | 7702 BIT(NL80211_IFTYPE_P2P_CLIENT) | 7703 BIT(NL80211_IFTYPE_P2P_GO); 7704 7705 ieee80211_hw_set(ar->hw, SIGNAL_DBM); 7706 ieee80211_hw_set(ar->hw, SUPPORTS_PS); 7707 ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS); --- 185 unchanged lines hidden --- |