|
@@ -3182,207 +3182,6 @@ static int hdd_we_dump_stats(struct hdd_adapter *adapter, int value)
|
|
|
return hdd_wlan_dump_stats(adapter, value);
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * hdd_get_ldpc() - Get adapter LDPC
|
|
|
- * @adapter: adapter being queried
|
|
|
- * @value: where to store the value
|
|
|
- *
|
|
|
- * Return: 0 on success, negative errno on failure
|
|
|
- */
|
|
|
-int hdd_get_ldpc(struct hdd_adapter *adapter, int *value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- int ret;
|
|
|
-
|
|
|
- hdd_enter();
|
|
|
- ret = sme_get_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_ADVANCE_CODING);
|
|
|
- if (ret < 0) {
|
|
|
- hdd_err("Failed to get LDPC value");
|
|
|
- } else {
|
|
|
- *value = ret;
|
|
|
- ret = 0;
|
|
|
- }
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-int hdd_set_ldpc(struct hdd_adapter *adapter, int value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- int ret;
|
|
|
- QDF_STATUS status;
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- struct mlme_ht_capabilities_info ht_cap_info;
|
|
|
-
|
|
|
- hdd_debug("%d", value);
|
|
|
-
|
|
|
- if (!mac_handle) {
|
|
|
- hdd_err("NULL Mac handle");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc, &ht_cap_info);
|
|
|
- if (QDF_STATUS_SUCCESS != status) {
|
|
|
- hdd_err("Failed to get HT capability info");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
-
|
|
|
- ht_cap_info.adv_coding_cap = value;
|
|
|
- status = ucfg_mlme_set_ht_cap_info(hdd_ctx->psoc, ht_cap_info);
|
|
|
- if (QDF_STATUS_SUCCESS != status) {
|
|
|
- hdd_err("Failed to set HT capability info");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- status = ucfg_mlme_cfg_set_vht_ldpc_coding_cap(hdd_ctx->psoc, value);
|
|
|
- if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
- hdd_err("Failed to set VHT LDPC capability info");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- ret = sme_update_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_ADVANCE_CODING,
|
|
|
- value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set LDPC value");
|
|
|
- ret = sme_update_he_ldpc_supp(mac_handle, adapter->vdev_id, value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set HE LDPC value");
|
|
|
- ret = sme_set_auto_rate_ldpc(mac_handle, adapter->vdev_id,
|
|
|
- (value ? 0 : 1));
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * hdd_get_tx_stbc() - Get adapter TX STBC
|
|
|
- * @adapter: adapter being queried
|
|
|
- * @value: where to store the value
|
|
|
- *
|
|
|
- * Return: 0 on success, negative errno on failure
|
|
|
- */
|
|
|
-int hdd_get_tx_stbc(struct hdd_adapter *adapter, int *value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- int ret;
|
|
|
-
|
|
|
- hdd_enter();
|
|
|
- ret = sme_get_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_TX_STBC);
|
|
|
- if (ret < 0) {
|
|
|
- hdd_err("Failed to get TX STBC value");
|
|
|
- } else {
|
|
|
- *value = ret;
|
|
|
- ret = 0;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-int hdd_set_tx_stbc(struct hdd_adapter *adapter, int value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- int ret;
|
|
|
- QDF_STATUS status;
|
|
|
- struct mlme_ht_capabilities_info ht_cap_info;
|
|
|
-
|
|
|
- hdd_debug("%d", value);
|
|
|
-
|
|
|
- if (!mac_handle) {
|
|
|
- hdd_err("NULL Mac handle");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- if (value) {
|
|
|
- /* make sure HT capabilities allow this */
|
|
|
- status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc,
|
|
|
- &ht_cap_info);
|
|
|
- if (QDF_STATUS_SUCCESS != status) {
|
|
|
- hdd_err("Failed to get HT capability info");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- if (!ht_cap_info.tx_stbc) {
|
|
|
- hdd_err("TX STBC not supported");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
- }
|
|
|
- ret = sme_update_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_TX_STBC,
|
|
|
- value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set TX STBC value");
|
|
|
- ret = sme_update_he_tx_stbc_cap(mac_handle, adapter->vdev_id, value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set HE TX STBC value");
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * hdd_get_rx_stbc() - Get adapter RX STBC
|
|
|
- * @adapter: adapter being queried
|
|
|
- * @value: where to store the value
|
|
|
- *
|
|
|
- * Return: 0 on success, negative errno on failure
|
|
|
- */
|
|
|
-int hdd_get_rx_stbc(struct hdd_adapter *adapter, int *value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- int ret;
|
|
|
-
|
|
|
- hdd_enter();
|
|
|
- ret = sme_get_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_RX_STBC);
|
|
|
- if (ret < 0) {
|
|
|
- hdd_err("Failed to get RX STBC value");
|
|
|
- } else {
|
|
|
- *value = ret;
|
|
|
- ret = 0;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
-int hdd_set_rx_stbc(struct hdd_adapter *adapter, int value)
|
|
|
-{
|
|
|
- mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- int ret;
|
|
|
- QDF_STATUS status;
|
|
|
- struct mlme_ht_capabilities_info ht_cap_info;
|
|
|
-
|
|
|
- hdd_debug("%d", value);
|
|
|
-
|
|
|
- if (!mac_handle) {
|
|
|
- hdd_err("NULL Mac handle");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- if (value) {
|
|
|
- /* make sure HT capabilities allow this */
|
|
|
- status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc,
|
|
|
- &ht_cap_info);
|
|
|
- if (QDF_STATUS_SUCCESS != status) {
|
|
|
- hdd_err("Failed to get HT capability info");
|
|
|
- return -EIO;
|
|
|
- }
|
|
|
- if (!ht_cap_info.rx_stbc) {
|
|
|
- hdd_warn("RX STBC not supported");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
- }
|
|
|
- ret = sme_update_ht_config(mac_handle, adapter->vdev_id,
|
|
|
- WNI_CFG_HT_CAP_INFO_RX_STBC,
|
|
|
- value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set RX STBC value");
|
|
|
-
|
|
|
- ret = sme_update_he_rx_stbc_cap(mac_handle, adapter->vdev_id, value);
|
|
|
- if (ret)
|
|
|
- hdd_err("Failed to set HE RX STBC value");
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* iw_get_linkspeed() - Get current link speed ioctl
|
|
|
* @dev: device upon which the ioctl was received
|