Loading drivers/net/wireless/iwlwifi/Kconfig +23 −7 Original line number Original line Diff line number Diff line Loading @@ -102,12 +102,28 @@ config IWLWIFI_DEVICE_TRACING occur. occur. endmenu endmenu config IWLWIFI_DEVICE_SVTOOL config IWLWIFI_DEVICE_TESTMODE bool "iwlwifi device svtool support" def_bool y depends on IWLWIFI depends on IWLWIFI select NL80211_TESTMODE depends on NL80211_TESTMODE help help This option enables the svtool support for iwlwifi device through This option enables the testmode support for iwlwifi device through NL80211_TESTMODE. svtool is a software validation tool that runs in NL80211_TESTMODE. This provide the capabilities of enable user space the user space and interacts with the device in the kernel space validation applications to interacts with the device through the through the generic netlink message via NL80211_TESTMODE channel. generic netlink message via NL80211_TESTMODE channel. config IWLWIFI_P2P bool "iwlwifi experimental P2P support" depends on IWLWIFI help This option enables experimental P2P support for some devices based on microcode support. Since P2P support is still under development, this option may even enable it for some devices now that turn out to not support it in the future due to microcode restrictions. To determine if your microcode supports the experimental P2P offered by this option, check if the driver advertises AP support when it is loaded. Say Y only if you want to experiment with P2P. drivers/net/wireless/iwlwifi/Makefile +1 −1 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,7 @@ iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_SVTOOL) += iwl-testmode.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o CFLAGS_iwl-devtrace.o := -I$(src) CFLAGS_iwl-devtrace.o := -I$(src) Loading drivers/net/wireless/iwlwifi/iwl-5000.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -134,10 +134,10 @@ static struct iwl_sensitivity_ranges iwl5150_sensitivity = { #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5) #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5) static s32 iwl_temp_calib_to_offset(struct iwl_priv *priv) static s32 iwl_temp_calib_to_offset(struct iwl_shared *shrd) { { u16 temperature, voltage; u16 temperature, voltage; __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(priv, __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(shrd, EEPROM_KELVIN_TEMPERATURE); EEPROM_KELVIN_TEMPERATURE); temperature = le16_to_cpu(temp_calib[0]); temperature = le16_to_cpu(temp_calib[0]); Loading @@ -151,7 +151,7 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv) { { const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF; const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF; s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - iwl_temp_calib_to_offset(priv); iwl_temp_calib_to_offset(priv->shrd); hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; } } Loading Loading @@ -223,7 +223,7 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) static void iwl5150_temperature(struct iwl_priv *priv) static void iwl5150_temperature(struct iwl_priv *priv) { { u32 vt = 0; u32 vt = 0; s32 offset = iwl_temp_calib_to_offset(priv); s32 offset = iwl_temp_calib_to_offset(priv->shrd); vt = le32_to_cpu(priv->statistics.common.temperature); vt = le32_to_cpu(priv->statistics.common.temperature); vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; Loading drivers/net/wireless/iwlwifi/iwl-6000.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -81,7 +81,7 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) static void iwl6050_additional_nic_config(struct iwl_priv *priv) static void iwl6050_additional_nic_config(struct iwl_priv *priv) { { /* Indicate calibration version to uCode. */ /* Indicate calibration version to uCode. */ if (iwlagn_eeprom_calib_version(priv) >= 6) if (iwl_eeprom_calib_version(priv->shrd) >= 6) iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); } } Loading @@ -89,7 +89,7 @@ static void iwl6050_additional_nic_config(struct iwl_priv *priv) static void iwl6150_additional_nic_config(struct iwl_priv *priv) static void iwl6150_additional_nic_config(struct iwl_priv *priv) { { /* Indicate calibration version to uCode. */ /* Indicate calibration version to uCode. */ if (iwlagn_eeprom_calib_version(priv) >= 6) if (iwl_eeprom_calib_version(priv->shrd) >= 6) iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, Loading drivers/net/wireless/iwlwifi/iwl-agn-calib.c +9 −9 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,7 @@ struct statistics_general_data { u32 beacon_energy_c; u32 beacon_energy_c; }; }; int iwl_send_calib_results(struct iwl_priv *priv) int iwl_send_calib_results(struct iwl_trans *trans) { { struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = { .id = REPLY_PHY_CALIBRATION_CMD, .id = REPLY_PHY_CALIBRATION_CMD, Loading @@ -90,15 +90,15 @@ int iwl_send_calib_results(struct iwl_priv *priv) }; }; struct iwl_calib_result *res; struct iwl_calib_result *res; list_for_each_entry(res, &priv->calib_results, list) { list_for_each_entry(res, &trans->calib_results, list) { int ret; int ret; hcmd.len[0] = res->cmd_len; hcmd.len[0] = res->cmd_len; hcmd.data[0] = &res->hdr; hcmd.data[0] = &res->hdr; hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; ret = iwl_trans_send_cmd(trans(priv), &hcmd); ret = iwl_trans_send_cmd(trans, &hcmd); if (ret) { if (ret) { IWL_ERR(priv, "Error %d on calib cmd %d\n", IWL_ERR(trans, "Error %d on calib cmd %d\n", ret, res->hdr.op_code); ret, res->hdr.op_code); return ret; return ret; } } Loading @@ -107,7 +107,7 @@ int iwl_send_calib_results(struct iwl_priv *priv) return 0; return 0; } } int iwl_calib_set(struct iwl_priv *priv, int iwl_calib_set(struct iwl_trans *trans, const struct iwl_calib_hdr *cmd, int len) const struct iwl_calib_hdr *cmd, int len) { { struct iwl_calib_result *res, *tmp; struct iwl_calib_result *res, *tmp; Loading @@ -119,7 +119,7 @@ int iwl_calib_set(struct iwl_priv *priv, memcpy(&res->hdr, cmd, len); memcpy(&res->hdr, cmd, len); res->cmd_len = len; res->cmd_len = len; list_for_each_entry(tmp, &priv->calib_results, list) { list_for_each_entry(tmp, &trans->calib_results, list) { if (tmp->hdr.op_code == res->hdr.op_code) { if (tmp->hdr.op_code == res->hdr.op_code) { list_replace(&tmp->list, &res->list); list_replace(&tmp->list, &res->list); kfree(tmp); kfree(tmp); Loading @@ -128,16 +128,16 @@ int iwl_calib_set(struct iwl_priv *priv, } } /* wasn't in list already */ /* wasn't in list already */ list_add_tail(&res->list, &priv->calib_results); list_add_tail(&res->list, &trans->calib_results); return 0; return 0; } } void iwl_calib_free_results(struct iwl_priv *priv) void iwl_calib_free_results(struct iwl_trans *trans) { { struct iwl_calib_result *res, *tmp; struct iwl_calib_result *res, *tmp; list_for_each_entry_safe(res, tmp, &priv->calib_results, list) { list_for_each_entry_safe(res, tmp, &trans->calib_results, list) { list_del(&res->list); list_del(&res->list); kfree(res); kfree(res); } } Loading Loading
drivers/net/wireless/iwlwifi/Kconfig +23 −7 Original line number Original line Diff line number Diff line Loading @@ -102,12 +102,28 @@ config IWLWIFI_DEVICE_TRACING occur. occur. endmenu endmenu config IWLWIFI_DEVICE_SVTOOL config IWLWIFI_DEVICE_TESTMODE bool "iwlwifi device svtool support" def_bool y depends on IWLWIFI depends on IWLWIFI select NL80211_TESTMODE depends on NL80211_TESTMODE help help This option enables the svtool support for iwlwifi device through This option enables the testmode support for iwlwifi device through NL80211_TESTMODE. svtool is a software validation tool that runs in NL80211_TESTMODE. This provide the capabilities of enable user space the user space and interacts with the device in the kernel space validation applications to interacts with the device through the through the generic netlink message via NL80211_TESTMODE channel. generic netlink message via NL80211_TESTMODE channel. config IWLWIFI_P2P bool "iwlwifi experimental P2P support" depends on IWLWIFI help This option enables experimental P2P support for some devices based on microcode support. Since P2P support is still under development, this option may even enable it for some devices now that turn out to not support it in the future due to microcode restrictions. To determine if your microcode supports the experimental P2P offered by this option, check if the driver advertises AP support when it is loaded. Say Y only if you want to experiment with P2P.
drivers/net/wireless/iwlwifi/Makefile +1 −1 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,7 @@ iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_SVTOOL) += iwl-testmode.o iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o CFLAGS_iwl-devtrace.o := -I$(src) CFLAGS_iwl-devtrace.o := -I$(src) Loading
drivers/net/wireless/iwlwifi/iwl-5000.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -134,10 +134,10 @@ static struct iwl_sensitivity_ranges iwl5150_sensitivity = { #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5) #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5) static s32 iwl_temp_calib_to_offset(struct iwl_priv *priv) static s32 iwl_temp_calib_to_offset(struct iwl_shared *shrd) { { u16 temperature, voltage; u16 temperature, voltage; __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(priv, __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(shrd, EEPROM_KELVIN_TEMPERATURE); EEPROM_KELVIN_TEMPERATURE); temperature = le16_to_cpu(temp_calib[0]); temperature = le16_to_cpu(temp_calib[0]); Loading @@ -151,7 +151,7 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv) { { const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF; const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF; s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - iwl_temp_calib_to_offset(priv); iwl_temp_calib_to_offset(priv->shrd); hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; } } Loading Loading @@ -223,7 +223,7 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) static void iwl5150_temperature(struct iwl_priv *priv) static void iwl5150_temperature(struct iwl_priv *priv) { { u32 vt = 0; u32 vt = 0; s32 offset = iwl_temp_calib_to_offset(priv); s32 offset = iwl_temp_calib_to_offset(priv->shrd); vt = le32_to_cpu(priv->statistics.common.temperature); vt = le32_to_cpu(priv->statistics.common.temperature); vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; Loading
drivers/net/wireless/iwlwifi/iwl-6000.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -81,7 +81,7 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) static void iwl6050_additional_nic_config(struct iwl_priv *priv) static void iwl6050_additional_nic_config(struct iwl_priv *priv) { { /* Indicate calibration version to uCode. */ /* Indicate calibration version to uCode. */ if (iwlagn_eeprom_calib_version(priv) >= 6) if (iwl_eeprom_calib_version(priv->shrd) >= 6) iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); } } Loading @@ -89,7 +89,7 @@ static void iwl6050_additional_nic_config(struct iwl_priv *priv) static void iwl6150_additional_nic_config(struct iwl_priv *priv) static void iwl6150_additional_nic_config(struct iwl_priv *priv) { { /* Indicate calibration version to uCode. */ /* Indicate calibration version to uCode. */ if (iwlagn_eeprom_calib_version(priv) >= 6) if (iwl_eeprom_calib_version(priv->shrd) >= 6) iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, iwl_set_bit(bus(priv), CSR_GP_DRIVER_REG, Loading
drivers/net/wireless/iwlwifi/iwl-agn-calib.c +9 −9 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,7 @@ struct statistics_general_data { u32 beacon_energy_c; u32 beacon_energy_c; }; }; int iwl_send_calib_results(struct iwl_priv *priv) int iwl_send_calib_results(struct iwl_trans *trans) { { struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = { .id = REPLY_PHY_CALIBRATION_CMD, .id = REPLY_PHY_CALIBRATION_CMD, Loading @@ -90,15 +90,15 @@ int iwl_send_calib_results(struct iwl_priv *priv) }; }; struct iwl_calib_result *res; struct iwl_calib_result *res; list_for_each_entry(res, &priv->calib_results, list) { list_for_each_entry(res, &trans->calib_results, list) { int ret; int ret; hcmd.len[0] = res->cmd_len; hcmd.len[0] = res->cmd_len; hcmd.data[0] = &res->hdr; hcmd.data[0] = &res->hdr; hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY; ret = iwl_trans_send_cmd(trans(priv), &hcmd); ret = iwl_trans_send_cmd(trans, &hcmd); if (ret) { if (ret) { IWL_ERR(priv, "Error %d on calib cmd %d\n", IWL_ERR(trans, "Error %d on calib cmd %d\n", ret, res->hdr.op_code); ret, res->hdr.op_code); return ret; return ret; } } Loading @@ -107,7 +107,7 @@ int iwl_send_calib_results(struct iwl_priv *priv) return 0; return 0; } } int iwl_calib_set(struct iwl_priv *priv, int iwl_calib_set(struct iwl_trans *trans, const struct iwl_calib_hdr *cmd, int len) const struct iwl_calib_hdr *cmd, int len) { { struct iwl_calib_result *res, *tmp; struct iwl_calib_result *res, *tmp; Loading @@ -119,7 +119,7 @@ int iwl_calib_set(struct iwl_priv *priv, memcpy(&res->hdr, cmd, len); memcpy(&res->hdr, cmd, len); res->cmd_len = len; res->cmd_len = len; list_for_each_entry(tmp, &priv->calib_results, list) { list_for_each_entry(tmp, &trans->calib_results, list) { if (tmp->hdr.op_code == res->hdr.op_code) { if (tmp->hdr.op_code == res->hdr.op_code) { list_replace(&tmp->list, &res->list); list_replace(&tmp->list, &res->list); kfree(tmp); kfree(tmp); Loading @@ -128,16 +128,16 @@ int iwl_calib_set(struct iwl_priv *priv, } } /* wasn't in list already */ /* wasn't in list already */ list_add_tail(&res->list, &priv->calib_results); list_add_tail(&res->list, &trans->calib_results); return 0; return 0; } } void iwl_calib_free_results(struct iwl_priv *priv) void iwl_calib_free_results(struct iwl_trans *trans) { { struct iwl_calib_result *res, *tmp; struct iwl_calib_result *res, *tmp; list_for_each_entry_safe(res, tmp, &priv->calib_results, list) { list_for_each_entry_safe(res, tmp, &trans->calib_results, list) { list_del(&res->list); list_del(&res->list); kfree(res); kfree(res); } } Loading