Merge tag 'wireless-drivers-next-for-davem-2016-09-29' of git://git.kernel.org/pub...
[cascardo/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / fw-api.h
index 57b574b..9763369 100644 (file)
@@ -205,7 +205,7 @@ enum {
        /* Phy */
        PHY_CONFIGURATION_CMD = 0x6a,
        CALIB_RES_NOTIF_PHY_DB = 0x6b,
-       /* PHY_DB_CMD = 0x6c, */
+       PHY_DB_CMD = 0x6c,
 
        /* ToF - 802.11mc FTM */
        TOF_CMD = 0x10,
@@ -340,6 +340,11 @@ enum iwl_prot_offload_subcmd_ids {
        STORED_BEACON_NTF = 0xFF,
 };
 
+enum iwl_fmac_debug_cmds {
+       LMAC_RD_WR = 0x0,
+       UMAC_RD_WR = 0x1,
+};
+
 /* command groups */
 enum {
        LEGACY_GROUP = 0x0,
@@ -349,6 +354,7 @@ enum {
        PHY_OPS_GROUP = 0x4,
        DATA_PATH_GROUP = 0x5,
        PROT_OFFLOAD_GROUP = 0xb,
+       DEBUG_GROUP = 0xf,
 };
 
 /**
@@ -1977,8 +1983,9 @@ struct iwl_tdls_config_res {
        struct iwl_tdls_config_sta_info_res sta_info[IWL_MVM_TDLS_STA_COUNT];
 } __packed; /* TDLS_CONFIG_RSP_API_S_VER_1 */
 
-#define TX_FIFO_MAX_NUM                8
-#define RX_FIFO_MAX_NUM                2
+#define TX_FIFO_MAX_NUM_9000           8
+#define TX_FIFO_MAX_NUM                        15
+#define RX_FIFO_MAX_NUM                        2
 #define TX_FIFO_INTERNAL_MAX_NUM       6
 
 /**
@@ -2004,6 +2011,21 @@ struct iwl_tdls_config_res {
  * NOTE: on firmware that don't have IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG
  *      set, the last 3 members don't exist.
  */
+struct iwl_shared_mem_cfg_v1 {
+       __le32 shared_mem_addr;
+       __le32 shared_mem_size;
+       __le32 sample_buff_addr;
+       __le32 sample_buff_size;
+       __le32 txfifo_addr;
+       __le32 txfifo_size[TX_FIFO_MAX_NUM_9000];
+       __le32 rxfifo_size[RX_FIFO_MAX_NUM];
+       __le32 page_buff_addr;
+       __le32 page_buff_size;
+       __le32 rxfifo_addr;
+       __le32 internal_txfifo_addr;
+       __le32 internal_txfifo_size[TX_FIFO_INTERNAL_MAX_NUM];
+} __packed; /* SHARED_MEM_ALLOC_API_S_VER_2 */
+
 struct iwl_shared_mem_cfg {
        __le32 shared_mem_addr;
        __le32 shared_mem_size;
@@ -2017,7 +2039,7 @@ struct iwl_shared_mem_cfg {
        __le32 rxfifo_addr;
        __le32 internal_txfifo_addr;
        __le32 internal_txfifo_size[TX_FIFO_INTERNAL_MAX_NUM];
-} __packed; /* SHARED_MEM_ALLOC_API_S_VER_2 */
+} __packed; /* SHARED_MEM_ALLOC_API_S_VER_3 */
 
 /**
  * VHT MU-MIMO group configuration
@@ -2133,4 +2155,48 @@ struct iwl_channel_switch_noa_notif {
        __le32 id_and_color;
 } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */
 
+/* Operation types for the debug mem access */
+enum {
+       DEBUG_MEM_OP_READ = 0,
+       DEBUG_MEM_OP_WRITE = 1,
+       DEBUG_MEM_OP_WRITE_BYTES = 2,
+};
+
+#define DEBUG_MEM_MAX_SIZE_DWORDS 32
+
+/**
+ * struct iwl_dbg_mem_access_cmd - Request the device to read/write memory
+ * @op: DEBUG_MEM_OP_*
+ * @addr: address to read/write from/to
+ * @len: in dwords, to read/write
+ * @data: for write opeations, contains the source buffer
+ */
+struct iwl_dbg_mem_access_cmd {
+       __le32 op;
+       __le32 addr;
+       __le32 len;
+       __le32 data[];
+} __packed; /* DEBUG_(U|L)MAC_RD_WR_CMD_API_S_VER_1 */
+
+/* Status responses for the debug mem access */
+enum {
+       DEBUG_MEM_STATUS_SUCCESS = 0x0,
+       DEBUG_MEM_STATUS_FAILED = 0x1,
+       DEBUG_MEM_STATUS_LOCKED = 0x2,
+       DEBUG_MEM_STATUS_HIDDEN = 0x3,
+       DEBUG_MEM_STATUS_LENGTH = 0x4,
+};
+
+/**
+ * struct iwl_dbg_mem_access_rsp - Response to debug mem commands
+ * @status: DEBUG_MEM_STATUS_*
+ * @len: read dwords (0 for write operations)
+ * @data: contains the read DWs
+ */
+struct iwl_dbg_mem_access_rsp {
+       __le32 status;
+       __le32 len;
+       __le32 data[];
+} __packed; /* DEBUG_(U|L)MAC_RD_WR_RSP_API_S_VER_1 */
+
 #endif /* __fw_api_h__ */