wl1271: Add structure for firmware configuration values
[linux-2.6.git] / drivers / net / wireless / wl12xx / wl1271_acx.h
index c1773459bf55ecaa2de25fa6c1625dc221fd8dad..8e3b97cff794f70e973f342bd4f5a1ca9a3e5c13 100644 (file)
@@ -61,8 +61,9 @@
                                            WL1271_ACX_INTR_HW_AVAILABLE  | \
                                            WL1271_ACX_INTR_DATA)
 
                                            WL1271_ACX_INTR_HW_AVAILABLE  | \
                                            WL1271_ACX_INTR_DATA)
 
-#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_EVENT_A |  \
-                                           WL1271_ACX_INTR_EVENT_B | \
+#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_EVENT_A      | \
+                                           WL1271_ACX_INTR_EVENT_B      | \
+                                           WL1271_ACX_INTR_HW_AVAILABLE | \
                                            WL1271_ACX_INTR_DATA)
 
 /* Target's information element */
                                            WL1271_ACX_INTR_DATA)
 
 /* Target's information element */
@@ -301,8 +302,8 @@ struct acx_slot {
 } __attribute__ ((packed));
 
 
 } __attribute__ ((packed));
 
 
-#define ADDRESS_GROUP_MAX      (8)
-#define ADDRESS_GROUP_MAX_LEN  (ETH_ALEN * ADDRESS_GROUP_MAX)
+#define ACX_MC_ADDRESS_GROUP_MAX       (8)
+#define ADDRESS_GROUP_MAX_LEN          (ETH_ALEN * ACX_MC_ADDRESS_GROUP_MAX)
 
 struct acx_dot11_grp_addr_tbl {
        struct acx_header header;
 
 struct acx_dot11_grp_addr_tbl {
        struct acx_header header;
@@ -313,7 +314,6 @@ struct acx_dot11_grp_addr_tbl {
        u8 mac_table[ADDRESS_GROUP_MAX_LEN];
 } __attribute__ ((packed));
 
        u8 mac_table[ADDRESS_GROUP_MAX_LEN];
 } __attribute__ ((packed));
 
-
 #define  RX_TIMEOUT_PS_POLL_MIN    0
 #define  RX_TIMEOUT_PS_POLL_MAX    (200000)
 #define  RX_TIMEOUT_PS_POLL_DEF    (15)
 #define  RX_TIMEOUT_PS_POLL_MIN    0
 #define  RX_TIMEOUT_PS_POLL_MAX    (200000)
 #define  RX_TIMEOUT_PS_POLL_DEF    (15)
@@ -399,6 +399,11 @@ struct acx_beacon_filter_option {
                           (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
                            BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
 
                           (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
                            BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
 
+#define BEACON_RULE_PASS_ON_CHANGE                     BIT(0)
+#define BEACON_RULE_PASS_ON_APPEARANCE                 BIT(1)
+
+#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN         (37)
+
 struct acx_beacon_filter_ie_table {
        struct acx_header header;
 
 struct acx_beacon_filter_ie_table {
        struct acx_header header;
 
@@ -407,6 +412,16 @@ struct acx_beacon_filter_ie_table {
        u8 pad[3];
 } __attribute__ ((packed));
 
        u8 pad[3];
 } __attribute__ ((packed));
 
+#define SYNCH_FAIL_DEFAULT_THRESHOLD    5     /* number of beacons */
+#define NO_BEACON_DEFAULT_TIMEOUT       (100) /* TU */
+
+struct acx_conn_monit_params {
+       struct acx_header header;
+
+       u32 synch_fail_thold; /* number of beacons missed */
+       u32 bss_lose_timeout; /* number of TU's from synch fail */
+};
+
 enum {
        SG_ENABLE = 0,
        SG_DISABLE,
 enum {
        SG_ENABLE = 0,
        SG_DISABLE,
@@ -430,6 +445,25 @@ struct acx_bt_wlan_coex {
        u8 pad[3];
 } __attribute__ ((packed));
 
        u8 pad[3];
 } __attribute__ ((packed));
 
+struct acx_smart_reflex_state {
+       struct acx_header header;
+
+       u8 enable;
+       u8 padding[3];
+};
+
+struct smart_reflex_err_table {
+       u8 len;
+       s8 upper_limit;
+       s8 values[14];
+};
+
+struct acx_smart_reflex_config_params {
+       struct acx_header header;
+
+       struct smart_reflex_err_table error_table[3];
+};
+
 #define PTA_ANTENNA_TYPE_DEF             (0)
 #define PTA_BT_HP_MAXTIME_DEF            (2000)
 #define PTA_WLAN_HP_MAX_TIME_DEF         (5000)
 #define PTA_ANTENNA_TYPE_DEF             (0)
 #define PTA_BT_HP_MAXTIME_DEF            (2000)
 #define PTA_WLAN_HP_MAX_TIME_DEF         (5000)
@@ -462,126 +496,18 @@ struct acx_bt_wlan_coex {
 struct acx_bt_wlan_coex_param {
        struct acx_header header;
 
 struct acx_bt_wlan_coex_param {
        struct acx_header header;
 
-       /*
-        * The minimum rate of a received WLAN packet in the STA,
-        * during protective mode, of which a new BT-HP request
-        * during this Rx will always be respected and gain the antenna.
-        */
-       u32 min_rate;
-
-       /* Max time the BT HP will be respected. */
-       u16 bt_hp_max_time;
-
-       /* Max time the WLAN HP will be respected. */
-       u16 wlan_hp_max_time;
-
-       /*
-        * The time between the last BT activity
-        * and the moment when the sense mode returns
-        * to SENSE_INACTIVE.
-        */
-       u16 sense_disable_timer;
-
-       /* Time before the next BT HP instance */
-       u16 rx_time_bt_hp;
-       u16 tx_time_bt_hp;
-
-       /* range: 10-20000    default: 1500 */
-       u16 rx_time_bt_hp_fast;
-       u16 tx_time_bt_hp_fast;
-
-       /* range: 2000-65535  default: 8700 */
-       u16 wlan_cycle_fast;
-
-       /* range: 0 - 15000 (Msec) default: 1000 */
-       u16 bt_anti_starvation_period;
-
-       /* range 400-10000(Usec) default: 3000 */
-       u16 next_bt_lp_packet;
-
-       /* Deafult: worst case for BT DH5 traffic */
-       u16 wake_up_beacon;
-
-       /* range: 0-50000(Usec) default: 1050 */
-       u16 hp_dm_max_guard_time;
-
-       /*
-        * This is to prevent both BT & WLAN antenna
-        * starvation.
-        * Range: 100-50000(Usec) default:2550
-        */
-       u16 next_wlan_packet;
-
-       /* 0 -> shared antenna */
-       u8 antenna_type;
-
-       /*
-        * 0 -> TI legacy
-        * 1 -> Palau
-        */
-       u8 signal_type;
-
-       /*
-        * BT AFH status
-        * 0 -> no AFH
-        * 1 -> from dedicated GPIO
-        * 2 -> AFH on (from host)
-        */
-       u8 afh_leverage_on;
-
-       /*
-        * The number of cycles during which no
-        * TX will be sent after 1 cycle of RX
-        * transaction in protective mode
-        */
-       u8 quiet_cycle_num;
-
-       /*
-        * The maximum number of CTSs that will
-        * be sent for receiving RX packet in
-        * protective mode
-        */
-       u8 max_cts;
-
-       /*
-        * The number of WLAN packets
-        * transferred in common mode before
-        * switching to BT.
-        */
-       u8 wlan_packets_num;
-
-       /*
-        * The number of BT packets
-        * transferred in common mode before
-        * switching to WLAN.
-        */
-       u8 bt_packets_num;
-
-       /* range: 1-255  default: 5 */
-       u8 missed_rx_avalanche;
-
-       /* range: 0-1    default: 1 */
-       u8 wlan_elp_hp;
-
-       /* range: 0 - 15  default: 4 */
-       u8 bt_anti_starvation_cycles;
-
-       u8 ack_mode_dual_ant;
-
-       /*
-        * Allow PA_SD assertion/de-assertion
-        * during enabled BT activity.
-        */
-       u8 pa_sd_enable;
-
-       /*
-        * Enable/Disable PTA in auto mode:
-        * Support Both Active & P.S modes
-        */
-       u8 pta_auto_mode_enable;
-
-       /* range: 0 - 20  default: 1 */
-       u8 bt_hp_respected_num;
+       u32 per_threshold;
+       u32 max_scan_compensation_time;
+       u16 nfs_sample_interval;
+       u8 load_ratio;
+       u8 auto_ps_mode;
+       u8 probe_req_compensation;
+       u8 scan_window_compensation;
+       u8 antenna_config;
+       u8 beacon_miss_threshold;
+       u32 rate_adaptation_threshold;
+       s8 rate_adaptation_snr;
+       u8 padding[3];
 } __attribute__ ((packed));
 
 #define CCA_THRSH_ENABLE_ENERGY_D       0x140A
 } __attribute__ ((packed));
 
 #define CCA_THRSH_ENABLE_ENERGY_D       0x140A
@@ -656,6 +582,10 @@ struct acx_event_mask {
 #define SCAN_TRIGGERED         BIT(2)
 #define SCAN_PRIORITY_HIGH     BIT(3)
 
 #define SCAN_TRIGGERED         BIT(2)
 #define SCAN_PRIORITY_HIGH     BIT(3)
 
+/* When set, disable HW encryption */
+#define DF_ENCRYPTION_DISABLE      0x01
+#define DF_SNIFF_MODE_ENABLE       0x80
+
 struct acx_feature_config {
        struct acx_header header;
 
 struct acx_feature_config {
        struct acx_header header;
 
@@ -1169,6 +1099,9 @@ enum {
        ACX_PEER_HT_CAP             = 0x0057,
        ACX_HT_BSS_OPERATION        = 0x0058,
        ACX_COEX_ACTIVITY           = 0x0059,
        ACX_PEER_HT_CAP             = 0x0057,
        ACX_HT_BSS_OPERATION        = 0x0058,
        ACX_COEX_ACTIVITY           = 0x0059,
+       ACX_SET_SMART_REFLEX_DEBUG  = 0x005A,
+       ACX_SET_SMART_REFLEX_STATE  = 0x005B,
+       ACX_SET_SMART_REFLEX_PARAMS = 0x005F,
        DOT11_RX_MSDU_LIFE_TIME     = 0x1004,
        DOT11_CUR_TX_PWR            = 0x100D,
        DOT11_RX_DOT11_MODE         = 0x1012,
        DOT11_RX_MSDU_LIFE_TIME     = 0x1004,
        DOT11_CUR_TX_PWR            = 0x100D,
        DOT11_RX_DOT11_MODE         = 0x1012,
@@ -1193,11 +1126,13 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl, u32 life_time);
 int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter);
 int wl1271_acx_pd_threshold(struct wl1271 *wl);
 int wl1271_acx_slot(struct wl1271 *wl, enum acx_slot_type slot_time);
 int wl1271_acx_rx_config(struct wl1271 *wl, u32 config, u32 filter);
 int wl1271_acx_pd_threshold(struct wl1271 *wl);
 int wl1271_acx_slot(struct wl1271 *wl, enum acx_slot_type slot_time);
-int wl1271_acx_group_address_tbl(struct wl1271 *wl);
+int wl1271_acx_group_address_tbl(struct wl1271 *wl, bool enable,
+                                void *mc_list, u32 mc_list_len);
 int wl1271_acx_service_period_timeout(struct wl1271 *wl);
 int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold);
 int wl1271_acx_service_period_timeout(struct wl1271 *wl);
 int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold);
-int wl1271_acx_beacon_filter_opt(struct wl1271 *wl);
+int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
 int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
 int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
+int wl1271_acx_conn_monit_params(struct wl1271 *wl);
 int wl1271_acx_sg_enable(struct wl1271 *wl);
 int wl1271_acx_sg_cfg(struct wl1271 *wl);
 int wl1271_acx_cca_threshold(struct wl1271 *wl);
 int wl1271_acx_sg_enable(struct wl1271 *wl);
 int wl1271_acx_sg_cfg(struct wl1271 *wl);
 int wl1271_acx_cca_threshold(struct wl1271 *wl);
@@ -1216,5 +1151,6 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl);
 int wl1271_acx_mem_cfg(struct wl1271 *wl);
 int wl1271_acx_init_mem_config(struct wl1271 *wl);
 int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
 int wl1271_acx_mem_cfg(struct wl1271 *wl);
 int wl1271_acx_init_mem_config(struct wl1271 *wl);
 int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
+int wl1271_acx_smart_reflex(struct wl1271 *wl);
 
 #endif /* __WL1271_ACX_H__ */
 
 #endif /* __WL1271_ACX_H__ */