mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 06:41:43 +00:00
* new Tx power firmware API
* bump max firmware API to 17 * fix bug in debug prints * static checker fix * fix unused defines * fix command list on newest firmware -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJV2ZpTAAoJEC0Llv5uNjIBe5cP/jlQtTV2mwiRg+2T9ZP3j4aB kx+g3Rb0NtAM09M/6hO6pqyvBDRrqGLCvqnUemCPYeyoctG4zhpS3S6xWytHPxHk 9jbJxeFzU7Y8rVkYf0padXqfQfgyiqH8+QNgtV/bf6Lj5/ETjptWPzREM6T2Krsr 3JltroO6Ra02MQP9nrTKHsTQH7zZxGubo5KHw4sff6fge4BCldX1+W7vLzBIzOs9 NGKBgticBE6Lx9cbbdr4N26gl8pM+Ed1AdblFoVIUlkYu1WooxSBTD2/GfnjzT5l MeB+BE34RF9fouN0eBNe9IkgC5xM8jXDgMx6ZrM9l3TPmsD0SDoZb3MFTUBFakuY oAXgrM7bxkYABpMT7a12s6IKE0C5/PmpVZIy34sG+jQFmBDjV9wZWj5yVn49KGUU j0SMxlGdARzYYUS1NQZjC2pKfEWQCSa2cRelvi2g01bddGwyceTZ7ge4p1J5BeQ6 m86u3TvsxkNq1WyLyVeiQFSxL/zRZSnpVGm20WJ7OXjlHzQg+0khC5m877vRF1ka VjbNQRP03R1bj74UU6lcpEun9hnmWYEhUXaLFVMUjF9cIoYXI8cXOPwhLkpUjKFR nZrEDT7AXbwXQq5s78tlUZIUJ48rd1qzDu9TkYKx8J8IgYyBLXMoyV8ANFZ0CRWm 0SDiEfrd4LJ2zt8ZztoE =2eAA -----END PGP SIGNATURE----- Merge tag 'iwlwifi-next-for-kalle-2015-08-23' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * new Tx power firmware API * bump max firmware API to 17 * fix bug in debug prints * static checker fix * fix unused defines * fix command list on newest firmware
This commit is contained in:
commit
11c3653705
@ -473,7 +473,7 @@ do { \
|
||||
} while (0)
|
||||
#endif /* CONFIG_IWLWIFI_DEBUG */
|
||||
|
||||
extern const char *const iwl_dvm_cmd_strings[REPLY_MAX];
|
||||
extern const char *const iwl_dvm_cmd_strings[REPLY_MAX + 1];
|
||||
|
||||
static inline const char *iwl_dvm_get_cmd_string(u8 cmd)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#define IWL_CMD_ENTRY(x) [x] = #x
|
||||
|
||||
const char *const iwl_dvm_cmd_strings[REPLY_MAX] = {
|
||||
const char *const iwl_dvm_cmd_strings[REPLY_MAX + 1] = {
|
||||
IWL_CMD_ENTRY(REPLY_ALIVE),
|
||||
IWL_CMD_ENTRY(REPLY_ERROR),
|
||||
IWL_CMD_ENTRY(REPLY_ECHO),
|
||||
|
@ -69,7 +69,7 @@
|
||||
#include "iwl-agn-hw.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL7260_UCODE_API_MAX 16
|
||||
#define IWL7260_UCODE_API_MAX 17
|
||||
|
||||
/* Oldest version we won't warn about */
|
||||
#define IWL7260_UCODE_API_OK 12
|
||||
|
@ -69,7 +69,7 @@
|
||||
#include "iwl-agn-hw.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL8000_UCODE_API_MAX 16
|
||||
#define IWL8000_UCODE_API_MAX 17
|
||||
|
||||
/* Oldest version we won't warn about */
|
||||
#define IWL8000_UCODE_API_OK 12
|
||||
|
@ -259,6 +259,8 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t;
|
||||
* @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format
|
||||
* @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority
|
||||
* instead of 3.
|
||||
* @IWL_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size
|
||||
* (command version 3) that supports per-chain limits
|
||||
*/
|
||||
enum iwl_ucode_tlv_api {
|
||||
IWL_UCODE_TLV_API_BT_COEX_SPLIT = (__force iwl_ucode_tlv_api_t)3,
|
||||
@ -274,6 +276,7 @@ enum iwl_ucode_tlv_api {
|
||||
IWL_UCODE_TLV_API_STATS_V10 = (__force iwl_ucode_tlv_api_t)19,
|
||||
IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20,
|
||||
IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY = (__force iwl_ucode_tlv_api_t)24,
|
||||
IWL_UCODE_TLV_API_TX_POWER_CHAIN = (__force iwl_ucode_tlv_api_t)27,
|
||||
};
|
||||
|
||||
typedef unsigned int __bitwise__ iwl_ucode_tlv_capa_t;
|
||||
|
@ -949,9 +949,10 @@ static ssize_t iwl_dbgfs_fw_dbg_conf_write(struct iwl_mvm *mvm,
|
||||
char *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int ret, conf_id;
|
||||
unsigned int conf_id;
|
||||
int ret;
|
||||
|
||||
ret = kstrtoint(buf, 0, &conf_id);
|
||||
ret = kstrtouint(buf, 0, &conf_id);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -339,8 +339,13 @@ enum iwl_wowlan_wakeup_reason {
|
||||
IWL_WOWLAN_WAKEUP_BY_FOUR_WAY_HANDSHAKE = BIT(8),
|
||||
IWL_WOWLAN_WAKEUP_BY_REM_WAKE_LINK_LOSS = BIT(9),
|
||||
IWL_WOWLAN_WAKEUP_BY_REM_WAKE_SIGNATURE_TABLE = BIT(10),
|
||||
/* BIT(11) reserved */
|
||||
IWL_WOWLAN_WAKEUP_BY_REM_WAKE_TCP_EXTERNAL = BIT(11),
|
||||
IWL_WOWLAN_WAKEUP_BY_REM_WAKE_WAKEUP_PACKET = BIT(12),
|
||||
IWL_WOWLAN_WAKEUP_BY_IOAC_MAGIC_PACKET = BIT(13),
|
||||
IWL_WOWLAN_WAKEUP_BY_D3_WAKEUP_HOST_TIMER = BIT(14),
|
||||
IWL_WOWLAN_WAKEUP_BY_RXFRAME_FILTERED_IN = BIT(15),
|
||||
IWL_WOWLAN_WAKEUP_BY_BEACON_FILTERED_IN = BIT(16),
|
||||
|
||||
}; /* WOWLAN_WAKE_UP_REASON_API_E_VER_2 */
|
||||
|
||||
struct iwl_wowlan_gtk_status {
|
||||
|
@ -7,6 +7,7 @@
|
||||
*
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of version 2 of the GNU General Public License as
|
||||
@ -33,6 +34,7 @@
|
||||
*
|
||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -310,17 +312,22 @@ struct iwl_reduce_tx_power_cmd {
|
||||
__le16 pwr_restriction;
|
||||
} __packed; /* TX_REDUCED_POWER_API_S_VER_1 */
|
||||
|
||||
enum iwl_dev_tx_power_cmd_mode {
|
||||
IWL_TX_POWER_MODE_SET_MAC = 0,
|
||||
IWL_TX_POWER_MODE_SET_DEVICE = 1,
|
||||
IWL_TX_POWER_MODE_SET_CHAINS = 2,
|
||||
}; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_2 */;
|
||||
|
||||
/**
|
||||
* struct iwl_dev_tx_power_cmd - TX power reduction command
|
||||
* REDUCE_TX_POWER_CMD = 0x9f
|
||||
* @set_mode: 0 - MAC tx power, 1 - device tx power
|
||||
* struct iwl_dev_tx_power_cmd_v2 - TX power reduction command
|
||||
* @set_mode: see &enum iwl_dev_tx_power_cmd_mode
|
||||
* @mac_context_id: id of the mac ctx for which we are reducing TX power.
|
||||
* @pwr_restriction: TX power restriction in 1/8 dBms.
|
||||
* @dev_24: device TX power restriction in 1/8 dBms
|
||||
* @dev_52_low: device TX power restriction upper band - low
|
||||
* @dev_52_high: device TX power restriction upper band - high
|
||||
*/
|
||||
struct iwl_dev_tx_power_cmd {
|
||||
struct iwl_dev_tx_power_cmd_v2 {
|
||||
__le32 set_mode;
|
||||
__le32 mac_context_id;
|
||||
__le16 pwr_restriction;
|
||||
@ -329,6 +336,20 @@ struct iwl_dev_tx_power_cmd {
|
||||
__le16 dev_52_high;
|
||||
} __packed; /* TX_REDUCED_POWER_API_S_VER_2 */
|
||||
|
||||
#define IWL_NUM_CHAIN_LIMITS 2
|
||||
#define IWL_NUM_SUB_BANDS 5
|
||||
|
||||
/**
|
||||
* struct iwl_dev_tx_power_cmd - TX power reduction command
|
||||
* @v2: version 2 of the command, embedded here for easier software handling
|
||||
* @per_chain_restriction: per chain restrictions
|
||||
*/
|
||||
struct iwl_dev_tx_power_cmd {
|
||||
/* v3 is just an extension of v2 - keep this here */
|
||||
struct iwl_dev_tx_power_cmd_v2 v2;
|
||||
__le16 per_chain_restriction[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS];
|
||||
} __packed; /* TX_REDUCED_POWER_API_S_VER_3 */
|
||||
|
||||
#define IWL_DEV_MAX_TX_POWER 0x7FFF
|
||||
|
||||
/**
|
||||
|
@ -1595,20 +1595,23 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
s16 tx_power)
|
||||
{
|
||||
struct iwl_dev_tx_power_cmd cmd = {
|
||||
.set_mode = 0,
|
||||
.mac_context_id =
|
||||
.v2.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
|
||||
.v2.mac_context_id =
|
||||
cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id),
|
||||
.pwr_restriction = cpu_to_le16(8 * tx_power),
|
||||
.v2.pwr_restriction = cpu_to_le16(8 * tx_power),
|
||||
};
|
||||
int len = sizeof(cmd);
|
||||
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_TX_POWER_DEV))
|
||||
return iwl_mvm_set_tx_power_old(mvm, vif, tx_power);
|
||||
|
||||
if (tx_power == IWL_DEFAULT_MAX_TX_POWER)
|
||||
cmd.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
|
||||
cmd.v2.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER);
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0,
|
||||
sizeof(cmd), &cmd);
|
||||
if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_TX_POWER_CHAIN))
|
||||
len = sizeof(cmd.v2);
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd);
|
||||
}
|
||||
|
||||
static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
|
||||
|
@ -268,7 +268,7 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {
|
||||
#undef RX_HANDLER_GRP
|
||||
#define CMD(x) [x] = #x
|
||||
|
||||
static const char *const iwl_mvm_cmd_strings[REPLY_MAX] = {
|
||||
static const char *const iwl_mvm_cmd_strings[REPLY_MAX + 1] = {
|
||||
CMD(MVM_ALIVE),
|
||||
CMD(REPLY_ERROR),
|
||||
CMD(INIT_COMPLETE_NOTIF),
|
||||
|
@ -349,10 +349,11 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
if (mvm->scan_status & IWL_MVM_SCAN_STOPPING_SCHED) {
|
||||
WARN_ON_ONCE(mvm->scan_status & IWL_MVM_SCAN_STOPPING_REGULAR);
|
||||
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Scheduled scan %s, EBS status %s, Last line %d, Last iteration %d, Time after last iteration %d\n",
|
||||
IWL_DEBUG_SCAN(mvm, "Scheduled scan %s, EBS status %s\n",
|
||||
aborted ? "aborted" : "completed",
|
||||
iwl_mvm_ebs_status_str(scan_notif->ebs_status),
|
||||
iwl_mvm_ebs_status_str(scan_notif->ebs_status));
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Last line %d, Last iteration %d, Time after last iteration %d\n",
|
||||
scan_notif->last_schedule_line,
|
||||
scan_notif->last_schedule_iteration,
|
||||
__le32_to_cpu(scan_notif->time_after_last_iter));
|
||||
@ -367,10 +368,11 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
} else if (mvm->scan_status & IWL_MVM_SCAN_SCHED) {
|
||||
WARN_ON_ONCE(mvm->scan_status & IWL_MVM_SCAN_REGULAR);
|
||||
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Scheduled scan %s, EBS status %s, Last line %d, Last iteration %d, Time after last iteration %d (FW)\n",
|
||||
IWL_DEBUG_SCAN(mvm, "Scheduled scan %s, EBS status %s\n",
|
||||
aborted ? "aborted" : "completed",
|
||||
iwl_mvm_ebs_status_str(scan_notif->ebs_status),
|
||||
iwl_mvm_ebs_status_str(scan_notif->ebs_status));
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Last line %d, Last iteration %d, Time after last iteration %d (FW)\n",
|
||||
scan_notif->last_schedule_line,
|
||||
scan_notif->last_schedule_iteration,
|
||||
__le32_to_cpu(scan_notif->time_after_last_iter));
|
||||
@ -1346,11 +1348,13 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
|
||||
mvm->scan_status &= ~mvm->scan_uid_status[uid];
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Scan completed, uid %u type %u, status %s, EBS status %s, Last line %d, Last iteration %d, Time from last iteration %d\n",
|
||||
"Scan completed, uid %u type %u, status %s, EBS status %s\n",
|
||||
uid, mvm->scan_uid_status[uid],
|
||||
notif->status == IWL_SCAN_OFFLOAD_COMPLETED ?
|
||||
"completed" : "aborted",
|
||||
iwl_mvm_ebs_status_str(notif->ebs_status),
|
||||
iwl_mvm_ebs_status_str(notif->ebs_status));
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Last line %d, Last iteration %d, Time from last iteration %d\n",
|
||||
notif->last_schedule, notif->last_iter,
|
||||
__le32_to_cpu(notif->time_from_last_iter));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user