Skip to content

Commit

Permalink
Merge tag 'iwlwifi-next-for-kalle-2019-06-29' of git://git.kernel.org…
Browse files Browse the repository at this point in the history
…/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Patches intended for v5.3

* Work on the new debugging framework continues;
* Update the FW API for CSI;
* Special SAR implementation for South Korea;
* Fixes in the module init error paths;
* Debugging infra work continues;
* A bunch of RF-kill fixes by Emmanuel;
* A fix for AP mode, also related to RF-kill, by Johannes.
* A few clean-ups;
* Other small fixes and improvements;
  • Loading branch information
Kalle Valo committed Jun 30, 2019
2 parents 9829a0b + 9402256 commit 1375da4
Show file tree
Hide file tree
Showing 37 changed files with 1,110 additions and 530 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/intel/iwlwifi/dvm/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,7 @@ int iwlagn_send_patterns(struct iwl_priv *priv,
if (!wowlan->n_patterns)
return 0;

cmd.len[0] = sizeof(*pattern_cmd) +
wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern);
cmd.len[0] = struct_size(pattern_cmd, patterns, wowlan->n_patterns);

pattern_cmd = kmalloc(cmd.len[0], GFP_KERNEL);
if (!pattern_cmd)
Expand Down
28 changes: 17 additions & 11 deletions drivers/net/wireless/intel/iwlwifi/fw/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ IWL_EXPORT_SYMBOL(iwl_acpi_get_object);

union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
union acpi_object *data,
int data_size)
int data_size, int *tbl_rev)
{
int i;
union acpi_object *wifi_pkg;
Expand All @@ -113,16 +113,19 @@ union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
/*
* We need at least two packages, one for the revision and one
* for the data itself. Also check that the revision is valid
* (i.e. it is an integer set to 0).
* (i.e. it is an integer smaller than 2, as we currently support only
* 2 revisions).
*/
if (data->type != ACPI_TYPE_PACKAGE ||
data->package.count < 2 ||
data->package.elements[0].type != ACPI_TYPE_INTEGER ||
data->package.elements[0].integer.value != 0) {
data->package.elements[0].integer.value > 1) {
IWL_DEBUG_DEV_RADIO(dev, "Unsupported packages structure\n");
return ERR_PTR(-EINVAL);
}

*tbl_rev = data->package.elements[0].integer.value;

/* loop through all the packages to find the one for WiFi */
for (i = 1; i < data->package.count; i++) {
union acpi_object *domain;
Expand Down Expand Up @@ -151,14 +154,15 @@ int iwl_acpi_get_mcc(struct device *dev, char *mcc)
{
union acpi_object *wifi_pkg, *data;
u32 mcc_val;
int ret;
int ret, tbl_rev;

data = iwl_acpi_get_object(dev, ACPI_WRDD_METHOD);
if (IS_ERR(data))
return PTR_ERR(data);

wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_WRDD_WIFI_DATA_SIZE);
if (IS_ERR(wifi_pkg)) {
wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_WRDD_WIFI_DATA_SIZE,
&tbl_rev);
if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
ret = PTR_ERR(wifi_pkg);
goto out_free;
}
Expand All @@ -185,6 +189,7 @@ u64 iwl_acpi_get_pwr_limit(struct device *dev)
{
union acpi_object *data, *wifi_pkg;
u64 dflt_pwr_limit;
int tbl_rev;

data = iwl_acpi_get_object(dev, ACPI_SPLC_METHOD);
if (IS_ERR(data)) {
Expand All @@ -193,8 +198,8 @@ u64 iwl_acpi_get_pwr_limit(struct device *dev)
}

wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data,
ACPI_SPLC_WIFI_DATA_SIZE);
if (IS_ERR(wifi_pkg) ||
ACPI_SPLC_WIFI_DATA_SIZE, &tbl_rev);
if (IS_ERR(wifi_pkg) || tbl_rev != 0 ||
wifi_pkg->package.elements[1].integer.value != ACPI_TYPE_INTEGER) {
dflt_pwr_limit = 0;
goto out_free;
Expand All @@ -211,14 +216,15 @@ IWL_EXPORT_SYMBOL(iwl_acpi_get_pwr_limit);
int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk)
{
union acpi_object *wifi_pkg, *data;
int ret;
int ret, tbl_rev;

data = iwl_acpi_get_object(dev, ACPI_ECKV_METHOD);
if (IS_ERR(data))
return PTR_ERR(data);

wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_ECKV_WIFI_DATA_SIZE);
if (IS_ERR(wifi_pkg)) {
wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_ECKV_WIFI_DATA_SIZE,
&tbl_rev);
if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
ret = PTR_ERR(wifi_pkg);
goto out_free;
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/fw/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
void *iwl_acpi_get_object(struct device *dev, acpi_string method);
union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
union acpi_object *data,
int data_size);
int data_size, int *tbl_rev);

/**
* iwl_acpi_get_mcc - read MCC from ACPI, if available
Expand Down Expand Up @@ -131,7 +131,8 @@ static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method)

static inline union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
union acpi_object *data,
int data_size)
int data_size,
int *tbl_rev)
{
return ERR_PTR(-ENOENT);
}
Expand Down
22 changes: 22 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,28 @@ struct iwl_fw_ini_trigger_tlv {
struct iwl_fw_ini_trigger trigger_config[];
} __packed; /* FW_TLV_DEBUG_TRIGGERS_API_S_VER_1 */

#define IWL_FW_INI_MAX_IMG_NAME_LEN 32
#define IWL_FW_INI_MAX_DBG_CFG_NAME_LEN 64

/**
* struct iwl_fw_ini_debug_info_tlv - (IWL_UCODE_TLV_TYPE_DEBUG_INFO)
*
* holds image name and debug configuration name
*
* @header: header
* @img_name_len: length of the image name string
* @img_name: image name string
* @dbg_cfg_name_len : length of the debug configuration name string
* @dbg_cfg_name: debug configuration name string
*/
struct iwl_fw_ini_debug_info_tlv {
struct iwl_fw_ini_header header;
__le32 img_name_len;
u8 img_name[IWL_FW_INI_MAX_IMG_NAME_LEN];
__le32 dbg_cfg_name_len;
u8 dbg_cfg_name[IWL_FW_INI_MAX_DBG_CFG_NAME_LEN];
} __packed; /* FW_DEBUG_TLV_INFO_API_S_VER_1 */

/**
* enum iwl_fw_ini_trigger_id
*
Expand Down
11 changes: 8 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/fw/api/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -937,15 +937,20 @@ struct iwl_ftm_responder_stats {
__le16 reserved;
} __packed; /* TOF_RESPONDER_STATISTICS_NTFY_S_VER_2 */

#define IWL_CSI_CHUNK_CTL_NUM_MASK 0x3
#define IWL_CSI_CHUNK_CTL_IDX_MASK 0xc
#define IWL_CSI_MAX_EXPECTED_CHUNKS 16

#define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_1 0x0003
#define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_1 0x000c

#define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_2 0x00ff
#define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_2 0xff00

struct iwl_csi_chunk_notification {
__le32 token;
__le16 seq;
__le16 ctl;
__le32 size;
u8 data[];
} __packed; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1 */
} __packed; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1/VER_2 */

#endif /* __iwl_fw_api_location_h__ */
12 changes: 12 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/fw/api/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,26 @@ struct iwl_per_chain_offset_group {
struct iwl_per_chain_offset hb;
} __packed; /* PER_CHAIN_LIMIT_OFFSET_GROUP_S_VER_1 */

/**
* struct iwl_geo_tx_power_profile_cmd_v1 - struct for GEO_TX_POWER_LIMIT cmd.
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
* @table: offset profile per band.
*/
struct iwl_geo_tx_power_profiles_cmd_v1 {
__le32 ops;
struct iwl_per_chain_offset_group table[IWL_NUM_GEO_PROFILES];
} __packed; /* GEO_TX_POWER_LIMIT_VER_1 */

/**
* struct iwl_geo_tx_power_profile_cmd - struct for GEO_TX_POWER_LIMIT cmd.
* @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
* @table: offset profile per band.
* @table_revision: BIOS table revision.
*/
struct iwl_geo_tx_power_profiles_cmd {
__le32 ops;
struct iwl_per_chain_offset_group table[IWL_NUM_GEO_PROFILES];
__le32 table_revision;
} __packed; /* GEO_TX_POWER_LIMIT */

/**
Expand Down
15 changes: 15 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,21 @@ struct iwl_scan_req_umac {
struct iwl_scan_umac_chan_param channel;
u8 data[];
} v8; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_8 */
struct {
u8 active_dwell[SCAN_TWO_LMACS];
u8 adwell_default_hb_n_aps;
u8 adwell_default_lb_n_aps;
u8 adwell_default_n_aps_social;
u8 general_flags2;
__le16 adwell_max_budget;
__le32 max_out_time[SCAN_TWO_LMACS];
__le32 suspend_time[SCAN_TWO_LMACS];
__le32 scan_priority;
u8 passive_dwell[SCAN_TWO_LMACS];
u8 num_of_fragments[SCAN_TWO_LMACS];
struct iwl_scan_umac_chan_param channel;
u8 data[];
} v9; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_9 */
};
} __packed;

Expand Down
Loading

0 comments on commit 1375da4

Please sign in to comment.