X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Fshared%2Ffwcmd.h;h=e5bcc364f0886b84363f52e21257f759498cf965;hb=HEAD;hp=8fea62901b2bcfae0405dbfe9739c503ed4af522;hpb=af915846d44d23adc02c7ded807282d607b46faa;p=carl9170fw.git diff --git a/include/shared/fwcmd.h b/include/shared/fwcmd.h index 8fea629..e5bcc36 100644 --- a/include/shared/fwcmd.h +++ b/include/shared/fwcmd.h @@ -55,6 +55,8 @@ enum carl9170_cmd_oids { CARL9170_CMD_READ_TSF = 0x06, CARL9170_CMD_RX_FILTER = 0x07, CARL9170_CMD_WOL = 0x08, + CARL9170_CMD_TALLY = 0x09, + CARL9170_CMD_WREGB = 0x0a, /* CAM */ CARL9170_CMD_EKEY = 0x10, @@ -116,10 +118,16 @@ struct carl9170_reg_list { } __packed; struct carl9170_write_reg { - struct { + DECLARE_FLEX_ARRAY(struct { __le32 addr; __le32 val; - } regs[0] __packed; + } __packed, regs); +} __packed; + +struct carl9170_write_reg_byte { + __le32 addr; + __le32 count; + u8 val[]; } __packed; #define CARL9170FW_PHY_HT_ENABLE 0x4 @@ -155,6 +163,14 @@ struct carl9170_psm { } __packed; #define CARL9170_PSM_SIZE 4 +/* + * Note: If a bit in rx_filter is set, then it + * means that the particular frames which matches + * the condition are FILTERED/REMOVED/DISCARDED! + * (This is can be a bit confusing, especially + * because someone people think it's the exact + * opposite way, so watch out!) + */ struct carl9170_rx_filter_cmd { __le32 rx_filter; } __packed; @@ -186,7 +202,7 @@ struct carl9170_wol_cmd { u8 mac[6]; u8 bssid[6]; __le32 null_interval; - __le32 free_for_use2; + __le32 free_for_use2; __le32 mask; u8 pattern[32]; } __packed; @@ -217,13 +233,14 @@ struct carl9170_cmd { struct carl9170_u32_list echo; struct carl9170_reg_list rreg; struct carl9170_write_reg wreg; + struct carl9170_write_reg_byte wregb; struct carl9170_rf_init rf_init; struct carl9170_psm psm; struct carl9170_wol_cmd wol; struct carl9170_bcn_ctrl_cmd bcn_ctrl; struct carl9170_rx_filter_cmd rx_filter; u8 data[CARL9170_MAX_CMD_PAYLOAD_LEN]; - } __packed; + } __packed __aligned(4); } __packed __aligned(4); #define CARL9170_TX_STATUS_QUEUE 3 @@ -286,6 +303,15 @@ struct carl9170_tsf_rsp { } __packed; #define CARL9170_TSF_RSP_SIZE 8 +struct carl9170_tally_rsp { + __le32 active; + __le32 cca; + __le32 tx_time; + __le32 rx_total; + __le32 rx_overrun; + __le32 tick; +} __packed; + struct carl9170_rsp { struct carl9170_cmd_head hdr; @@ -294,12 +320,13 @@ struct carl9170_rsp { struct carl9170_u32_list rreg_res; struct carl9170_u32_list echo; #ifdef __CARL9170FW__ - struct carl9170_tx_status tx_status[0]; + DECLARE_FLEX_ARRAY(struct carl9170_tx_status, tx_status); #endif /* __CARL9170FW__ */ - struct _carl9170_tx_status _tx_status[0]; + DECLARE_FLEX_ARRAY(struct _carl9170_tx_status, _tx_status); struct carl9170_gpio gpio; struct carl9170_tsf_rsp tsf; struct carl9170_psm psm; + struct carl9170_tally_rsp tally; u8 data[CARL9170_MAX_CMD_PAYLOAD_LEN]; } __packed; } __packed __aligned(4);