cfg80211: constify wowlan/coalesce mask/pattern pointers
[pandora-kernel.git] / drivers / net / wireless / ti / wlcore / wlcore_i.h
index ce7261c..c2c34a8 100644 (file)
 #define WL1271_DEFAULT_DTIM_PERIOD 1
 
 #define WL12XX_MAX_ROLES           4
-#define WL12XX_MAX_LINKS           12
 #define WL12XX_INVALID_ROLE_ID     0xff
 #define WL12XX_INVALID_LINK_ID     0xff
 
+/*
+ * max number of links allowed by all HWs.
+ * this is NOT the actual max links supported by the current hw.
+ */
+#define WLCORE_MAX_LINKS 16
+
 /* the driver supports the 2.4Ghz and 5Ghz bands */
 #define WLCORE_NUM_BANDS           2
 
@@ -118,72 +123,58 @@ struct wl1271_chip {
 
 #define NUM_TX_QUEUES              4
 
-#define AP_MAX_STATIONS            8
-
-struct wl_fw_packet_counters {
-       /* Cumulative counter of released packets per AC */
-       u8 tx_released_pkts[NUM_TX_QUEUES];
-
-       /* Cumulative counter of freed packets per HLID */
-       u8 tx_lnk_free_pkts[WL12XX_MAX_LINKS];
-
-       /* Cumulative counter of released Voice memory blocks */
-       u8 tx_voice_released_blks;
-
-       /* Tx rate of the last transmitted packet */
-       u8 tx_last_rate;
-
-       u8 padding[2];
-} __packed;
-
-/* FW status registers */
-struct wl_fw_status_1 {
-       __le32 intr;
+struct wl_fw_status {
+       u32 intr;
        u8  fw_rx_counter;
        u8  drv_rx_counter;
-       u8  reserved;
        u8  tx_results_counter;
-       __le32 rx_pkt_descs[0];
-} __packed;
-
-/*
- * Each HW arch has a different number of Rx descriptors.
- * The length of the status depends on it, since it holds an array
- * of descriptors.
- */
-#define WLCORE_FW_STATUS_1_LEN(num_rx_desc) \
-               (sizeof(struct wl_fw_status_1) + \
-               (sizeof(((struct wl_fw_status_1 *)0)->rx_pkt_descs[0])) * \
-               num_rx_desc)
+       __le32 *rx_pkt_descs;
 
-struct wl_fw_status_2 {
-       __le32 fw_localtime;
+       u32 fw_localtime;
 
        /*
         * A bitmap (where each bit represents a single HLID)
         * to indicate if the station is in PS mode.
         */
-       __le32 link_ps_bitmap;
+       u32 link_ps_bitmap;
 
        /*
         * A bitmap (where each bit represents a single HLID) to indicate
         * if the station is in Fast mode
         */
-       __le32 link_fast_bitmap;
+       u32 link_fast_bitmap;
 
        /* Cumulative counter of total released mem blocks since FW-reset */
-       __le32 total_released_blks;
+       u32 total_released_blks;
 
        /* Size (in Memory Blocks) of TX pool */
-       __le32 tx_total;
+       u32 tx_total;
+
+       struct {
+               /*
+                * Cumulative counter of released packets per AC
+                * (length of the array is NUM_TX_QUEUES)
+                */
+               u8 *tx_released_pkts;
 
-       struct wl_fw_packet_counters counters;
+               /*
+                * Cumulative counter of freed packets per HLID
+                * (length of the array is wl->num_links)
+                */
+               u8 *tx_lnk_free_pkts;
+
+               /* Cumulative counter of released Voice memory blocks */
+               u8 tx_voice_released_blks;
 
-       __le32 log_start_addr;
+               /* Tx rate of the last transmitted packet */
+               u8 tx_last_rate;
+       } counters;
+
+       u32 log_start_addr;
 
        /* Private status to be used by the lower drivers */
-       u8 priv[0];
-} __packed;
+       void *priv;
+};
 
 #define WL1271_MAX_CHANNELS 64
 struct wl1271_scan {
@@ -240,6 +231,7 @@ enum wl12xx_flags {
        WL1271_FLAG_VIF_CHANGE_IN_PROGRESS,
        WL1271_FLAG_INTENDED_FW_RECOVERY,
        WL1271_FLAG_IO_FAILED,
+       WL1271_FLAG_REINIT_TX_WDOG,
 };
 
 enum wl12xx_vif_flags {
@@ -368,7 +360,7 @@ struct wl12xx_vif {
 
                        /* HLIDs bitmap of associated stations */
                        unsigned long sta_hlid_map[BITS_TO_LONGS(
-                                                       WL12XX_MAX_LINKS)];
+                                                       WLCORE_MAX_LINKS)];
 
                        /* recoreded keys - set here before AP startup */
                        struct wl1271_ap_key *recorded_keys[MAX_NUM_KEYS];
@@ -385,7 +377,7 @@ struct wl12xx_vif {
        /* counters of packets per AC, across all links in the vif */
        int tx_queue_count[NUM_TX_QUEUES];
 
-       unsigned long links_map[BITS_TO_LONGS(WL12XX_MAX_LINKS)];
+       unsigned long links_map[BITS_TO_LONGS(WLCORE_MAX_LINKS)];
 
        u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
        u8 ssid_len;
@@ -520,8 +512,8 @@ int wl1271_recalc_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif);
 void wl12xx_queue_recovery_work(struct wl1271 *wl);
 size_t wl12xx_copy_fwlog(struct wl1271 *wl, u8 *memblock, size_t maxlen);
 int wl1271_rx_filter_alloc_field(struct wl12xx_rx_filter *filter,
-                                       u16 offset, u8 flags,
-                                       u8 *pattern, u8 len);
+                                u16 offset, u8 flags,
+                                const u8 *pattern, u8 len);
 void wl1271_rx_filter_free(struct wl12xx_rx_filter *filter);
 struct wl12xx_rx_filter *wl1271_rx_filter_alloc(void);
 int wl1271_rx_filter_get_fields_size(struct wl12xx_rx_filter *filter);