rsi: add common structures needed for command packets
authorPrameela Rani Garnepudi <prameela.j04cs@gmail.com>
Mon, 10 Jul 2017 12:40:32 +0000 (18:10 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:25:36 +0000 (17:25 +0300)
All internal management packets (command packets) use some common
fields and some packet specific fields for packet descriptors.
This patch adds some common structures which are needed for all
command packets.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_mgmt.h

index a8a195e8a91e2c6aa31caa45ac373df3b94cf874..63360c2be7262b96ac521a71cfd7421fa9f12749 100644 (file)
@@ -221,6 +221,44 @@ struct rsi_mac_frame {
        __le16 desc_word[8];
 } __packed;
 
+#define PWR_SAVE_WAKEUP_IND            BIT(0)
+#define TCP_CHECK_SUM_OFFLOAD          BIT(1)
+#define CONFIRM_REQUIRED_TO_HOST       BIT(2)
+#define ADD_DELTA_TSF                  BIT(3)
+#define FETCH_RETRY_CNT_FROM_HOST_DESC BIT(4)
+#define EOSP_INDICATION                        BIT(5)
+#define REQUIRE_TSF_SYNC_CONFIRM       BIT(6)
+#define ENCAP_MGMT_PKT                 BIT(7)
+
+struct rsi_cmd_desc_dword0 {
+       __le16 len_qno;
+       u8 frame_type;
+       u8 misc_flags;
+};
+
+struct rsi_cmd_desc_dword1 {
+       u8 xtend_desc_size;
+       u8 reserved1;
+       __le16 reserved2;
+};
+
+struct rsi_cmd_desc_dword2 {
+       __le32 pkt_info; /* Packet specific data */
+};
+
+struct rsi_cmd_desc_dword3 {
+       __le16 token;
+       u8 qid_tid;
+       u8 sta_id;
+};
+
+struct rsi_cmd_desc {
+       struct rsi_cmd_desc_dword0 desc_dword0;
+       struct rsi_cmd_desc_dword1 desc_dword1;
+       struct rsi_cmd_desc_dword2 desc_dword2;
+       struct rsi_cmd_desc_dword3 desc_dword3;
+};
+
 struct rsi_boot_params {
        __le16 desc_word[8];
        struct bootup_params bootup_params;