wl1251: Prepare for idle mode support
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251_cmd.h
index ca1cb24..15b4d51 100644 (file)
@@ -37,7 +37,8 @@ int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len);
 int wl1251_cmd_configure(struct wl1251 *wl, u16 id, void *buf, size_t len);
 int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
                   void *bitmap, u16 bitmap_len, u8 bitmap_control);
-int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable);
+int wl1251_cmd_data_path_rx(struct wl1251 *wl, u8 channel, bool enable);
+int wl1251_cmd_data_path_tx(struct wl1251 *wl, u8 channel, bool enable);
 int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel,
                    u16 beacon_interval, u8 dtim_interval);
 int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode);
@@ -106,12 +107,12 @@ struct wl1251_cmd_header {
        u16 status;
        /* payload */
        u8 data[0];
-} __attribute__ ((packed));
+} __packed;
 
 struct  wl1251_command {
        struct wl1251_cmd_header header;
        u8  parameters[MAX_CMD_PARAMS];
-};
+} __packed;
 
 enum {
        CMD_MAILBOX_IDLE                        =  0,
@@ -164,11 +165,16 @@ struct cmd_read_write_memory {
           of this field is the Host in WRITE command or the Wilink in READ
           command. */
        u8 value[MAX_READ_SIZE];
-};
+} __packed;
 
 #define CMDMBOX_HEADER_LEN 4
 #define CMDMBOX_INFO_ELEM_HEADER_LEN 4
 
+#define WL1251_SCAN_OPT_PASSIVE                1
+#define WL1251_SCAN_OPT_5GHZ_BAND      2
+#define WL1251_SCAN_OPT_TRIGGERD_SCAN  4
+#define WL1251_SCAN_OPT_PRIORITY_HIGH  8
+
 #define WL1251_SCAN_MIN_DURATION 30000
 #define WL1251_SCAN_MAX_DURATION 60000
 
@@ -201,7 +207,7 @@ struct wl1251_scan_parameters {
        u8 ssid_len;
        u8 ssid[32];
 
-} __attribute__ ((packed));
+} __packed;
 
 struct wl1251_scan_ch_parameters {
        __le32 min_duration; /* in TU */
@@ -218,7 +224,7 @@ struct wl1251_scan_ch_parameters {
        u8 tx_power_att;
        u8 channel;
        u8 pad[3];
-} __attribute__ ((packed));
+} __packed;
 
 /* SCAN parameters */
 #define SCAN_MAX_NUM_OF_CHANNELS 16
@@ -228,7 +234,7 @@ struct wl1251_cmd_scan {
 
        struct wl1251_scan_parameters params;
        struct wl1251_scan_ch_parameters channels[SCAN_MAX_NUM_OF_CHANNELS];
-} __attribute__ ((packed));
+} __packed;
 
 enum {
        BSS_TYPE_IBSS = 0,
@@ -276,14 +282,14 @@ struct cmd_join {
        u8 tx_mgt_frame_rate; /* OBSOLETE */
        u8 tx_mgt_frame_mod;  /* OBSOLETE */
        u8 reserved;
-} __attribute__ ((packed));
+} __packed;
 
 struct cmd_enabledisable_path {
        struct wl1251_cmd_header header;
 
        u8 channel;
        u8 padding[3];
-} __attribute__ ((packed));
+} __packed;
 
 #define WL1251_MAX_TEMPLATE_SIZE 300
 
@@ -292,7 +298,7 @@ struct wl1251_cmd_packet_template {
 
        __le16 size;
        u8 data[0];
-} __attribute__ ((packed));
+} __packed;
 
 #define TIM_ELE_ID    5
 #define PARTIAL_VBM_MAX    251
@@ -304,7 +310,7 @@ struct wl1251_tim {
        u8 dtim_period;
        u8 bitmap_ctrl;
        u8 pvb_field[PARTIAL_VBM_MAX]; /* Partial Virtual Bitmap */
-} __attribute__ ((packed));
+} __packed;
 
 /* Virtual Bit Map update */
 struct wl1251_cmd_vbm_update {
@@ -312,11 +318,11 @@ struct wl1251_cmd_vbm_update {
        __le16 len;
        u8  padding[2];
        struct wl1251_tim tim;
-} __attribute__ ((packed));
+} __packed;
 
 enum wl1251_cmd_ps_mode {
-       STATION_ACTIVE_MODE,
-       STATION_POWER_SAVE_MODE
+       CHIP_ACTIVE_MODE,
+       CHIP_POWER_SAVE_MODE
 };
 
 struct wl1251_cmd_ps_params {
@@ -333,13 +339,13 @@ struct wl1251_cmd_ps_params {
        u8 hang_over_period;
        u16 null_data_rate;
        u8 pad[2];
-} __attribute__ ((packed));
+} __packed;
 
 struct wl1251_cmd_trigger_scan_to {
        struct wl1251_cmd_header header;
 
        u32 timeout;
-};
+} __packed;
 
 /* HW encryption keys */
 #define NUM_ACCESS_CATEGORIES_COPY 4
@@ -411,7 +417,7 @@ struct wl1251_cmd_set_keys {
        u8 key[MAX_KEY_SIZE];
        u16 ac_seq_num16[NUM_ACCESS_CATEGORIES_COPY];
        u32 ac_seq_num32[NUM_ACCESS_CATEGORIES_COPY];
-} __attribute__ ((packed));
+} __packed;
 
 
 #endif /* __WL1251_CMD_H__ */