]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/wl12xx/acx.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / net / wireless / wl12xx / acx.h
similarity index 89%
rename from drivers/net/wireless/wl12xx/wl1271_acx.h
rename to drivers/net/wireless/wl12xx/acx.h
index ebb341d36e8c01a88f2fe423908c2a0994e6be1d..7bd8e4db4a71368f0fb756888124b9d28ea6a68c 100644 (file)
  *
  */
 
-#ifndef __WL1271_ACX_H__
-#define __WL1271_ACX_H__
+#ifndef __ACX_H__
+#define __ACX_H__
 
-#include "wl1271.h"
-#include "wl1271_cmd.h"
+#include "wl12xx.h"
+#include "cmd.h"
 
 /*************************************************************************
 
@@ -47,9 +47,9 @@
 #define WL1271_ACX_INTR_HW_AVAILABLE       BIT(5)
 /* The MISC bit is used for aggregation of RX, TxComplete and TX rate update */
 #define WL1271_ACX_INTR_DATA               BIT(6)
-/* Trace meassge on MBOX #A */
+/* Trace message on MBOX #A */
 #define WL1271_ACX_INTR_TRACE_A            BIT(7)
-/* Trace meassge on MBOX #B */
+/* Trace message on MBOX #B */
 #define WL1271_ACX_INTR_TRACE_B            BIT(8)
 
 #define WL1271_ACX_INTR_ALL               0xFFFFFFFF
@@ -61,7 +61,8 @@
                                            WL1271_ACX_INTR_HW_AVAILABLE  | \
                                            WL1271_ACX_INTR_DATA)
 
-#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_EVENT_A      | \
+#define WL1271_INTR_MASK                   (WL1271_ACX_INTR_WATCHDOG     | \
+                                           WL1271_ACX_INTR_EVENT_A      | \
                                            WL1271_ACX_INTR_EVENT_B      | \
                                            WL1271_ACX_INTR_HW_AVAILABLE | \
                                            WL1271_ACX_INTR_DATA)
@@ -867,10 +868,15 @@ struct wl1271_acx_bet_enable {
 #define ACX_IPV4_VERSION 4
 #define ACX_IPV6_VERSION 6
 #define ACX_IPV4_ADDR_SIZE 4
+
+/* bitmap of enabled arp_filter features */
+#define ACX_ARP_FILTER_ARP_FILTERING   BIT(0)
+#define ACX_ARP_FILTER_AUTO_ARP                BIT(1)
+
 struct wl1271_acx_arp_filter {
        struct acx_header header;
        u8 version;         /* ACX_IPV4_VERSION, ACX_IPV6_VERSION */
-       u8 enable;          /* 1 to enable ARP filtering, 0 to disable */
+       u8 enable;          /* bitmap of enabled ARP filtering features */
        u8 padding[2];
        u8 address[16];     /* The configured device IP address - all ARP
                               requests directed to this IP address will pass
@@ -964,6 +970,87 @@ struct wl1271_acx_rssi_snr_avg_weights {
        u8 snr_data;
 };
 
+/*
+ * ACX_PEER_HT_CAP
+ * Configure HT capabilities - declare the capabilities of the peer
+ * we are connected to.
+ */
+struct wl1271_acx_ht_capabilities {
+       struct acx_header header;
+
+       /*
+        * bit 0 - Allow HT Operation
+        * bit 1 - Allow Greenfield format in TX
+        * bit 2 - Allow Short GI in TX
+        * bit 3 - Allow L-SIG TXOP Protection in TX
+        * bit 4 - Allow HT Control fields in TX.
+        *         Note, driver will still leave space for HT control in packets
+        *         regardless of the value of this field. FW will be responsible
+        *         to drop the HT field from any frame when this Bit set to 0.
+        * bit 5 - Allow RD initiation in TXOP. FW is allowed to initate RD.
+        *         Exact policy setting for this feature is TBD.
+        *         Note, this bit can only be set to 1 if bit 3 is set to 1.
+        */
+       __le32 ht_capabilites;
+
+       /*
+        * Indicates to which peer these capabilities apply.
+        * For infrastructure use ff:ff:ff:ff:ff:ff that indicates relevance
+        * for all peers.
+        * Only valid for IBSS/DLS operation.
+        */
+       u8 mac_address[ETH_ALEN];
+
+       /*
+        * This the maximum A-MPDU length supported by the AP. The FW may not
+        * exceed this length when sending A-MPDUs
+        */
+       u8 ampdu_max_length;
+
+       /* This is the minimal spacing required when sending A-MPDUs to the AP*/
+       u8 ampdu_min_spacing;
+} __packed;
+
+/* HT Capabilites Fw Bit Mask Mapping */
+#define WL1271_ACX_FW_CAP_HT_OPERATION                 BIT(0)
+#define WL1271_ACX_FW_CAP_GREENFIELD_FRAME_FORMAT      BIT(1)
+#define WL1271_ACX_FW_CAP_SHORT_GI_FOR_20MHZ_PACKETS   BIT(2)
+#define WL1271_ACX_FW_CAP_LSIG_TXOP_PROTECTION         BIT(3)
+#define WL1271_ACX_FW_CAP_HT_CONTROL_FIELDS            BIT(4)
+#define WL1271_ACX_FW_CAP_RD_INITIATION                BIT(5)
+
+
+/*
+ * ACX_HT_BSS_OPERATION
+ * Configure HT capabilities - AP rules for behavior in the BSS.
+ */
+struct wl1271_acx_ht_information {
+       struct acx_header header;
+
+       /* Values: 0 - RIFS not allowed, 1 - RIFS allowed */
+       u8 rifs_mode;
+
+       /* Values: 0 - 3 like in spec */
+       u8 ht_protection;
+
+       /* Values: 0 - GF protection not required, 1 - GF protection required */
+       u8 gf_protection;
+
+       /*Values: 0 - TX Burst limit not required, 1 - TX Burst Limit required*/
+       u8 ht_tx_burst_limit;
+
+       /*
+        * Values: 0 - Dual CTS protection not required,
+        *         1 - Dual CTS Protection required
+        * Note: When this value is set to 1 FW will protect all TXOP with RTS
+        * frame and will not use CTS-to-self regardless of the value of the
+        * ACX_CTS_PROTECTION information element
+        */
+       u8 dual_cts_protection;
+
+       u8 padding[3];
+} __packed;
+
 struct wl1271_acx_fw_tsf_information {
        struct acx_header header;
 
@@ -1079,20 +1166,25 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
 int wl1271_acx_tid_cfg(struct wl1271 *wl, u8 queue_id, u8 channel_type,
                       u8 tsid, u8 ps_scheme, u8 ack_policy,
                       u32 apsd_conf0, u32 apsd_conf1);
-int wl1271_acx_frag_threshold(struct wl1271 *wl);
+int wl1271_acx_frag_threshold(struct wl1271 *wl, u16 frag_threshold);
 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_smart_reflex(struct wl1271 *wl);
 int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable);
-int wl1271_acx_arp_ip_filter(struct wl1271 *wl, bool enable, __be32 address);
+int wl1271_acx_arp_ip_filter(struct wl1271 *wl, u8 enable, __be32 address);
 int wl1271_acx_pm_config(struct wl1271 *wl);
 int wl1271_acx_keep_alive_mode(struct wl1271 *wl, bool enable);
 int wl1271_acx_keep_alive_config(struct wl1271 *wl, u8 index, u8 tpl_valid);
 int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, bool enable,
                                s16 thold, u8 hyst);
 int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl);
+int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
+                                   struct ieee80211_sta_ht_cap *ht_cap,
+                                   bool allow_ht_operation);
+int wl1271_acx_set_ht_information(struct wl1271 *wl,
+                                  u16 ht_operation_mode);
 int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime);
 
 #endif /* __WL1271_ACX_H__ */