aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShahar Levi <shahar_levi@ti.com>2010-10-13 10:09:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:25:09 -0500
commite8b03a2b8debc6056f6f43d24f98f601097301a1 (patch)
tree7be9ef063b952ad910243492666c146bd243cd57 /drivers
parent2fe33e8cff354a3f320549544bffebbbab680145 (diff)
wl1271: 11n Support, Add Definitions
Two acx commands: ht_capabilities & ht_information, 11n sta capabilities macro. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271.h11
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.h81
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c15
3 files changed, 106 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 718e96d97d0b..ab53162b4343 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -434,7 +434,12 @@ struct wl1271 {
434 /* Our association ID */ 434 /* Our association ID */
435 u16 aid; 435 u16 aid;
436 436
437 /* currently configured rate set */ 437 /*
438 * currently configured rate set:
439 * bits 0-15 - 802.11abg rates
440 * bits 16-23 - 802.11n MCS index mask
441 * support only 1 stream, thus only 8 bits for the MCS rates (0-7).
442 */
438 u32 sta_rate_set; 443 u32 sta_rate_set;
439 u32 basic_rate_set; 444 u32 basic_rate_set;
440 u32 basic_rate; 445 u32 basic_rate;
@@ -511,4 +516,8 @@ int wl1271_plt_stop(struct wl1271 *wl);
511#define WL1271_PRE_POWER_ON_SLEEP 20 /* in miliseconds */ 516#define WL1271_PRE_POWER_ON_SLEEP 20 /* in miliseconds */
512#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */ 517#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */
513 518
519/* Macros to handle wl1271.sta_rate_set */
520#define HW_BG_RATES_MASK 0xffff
521#define HW_HT_RATES_OFFSET 16
522
514#endif 523#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index ebb341d36e8c..f090a0470ebc 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -964,6 +964,87 @@ struct wl1271_acx_rssi_snr_avg_weights {
964 u8 snr_data; 964 u8 snr_data;
965}; 965};
966 966
967/*
968 * ACX_PEER_HT_CAP
969 * Configure HT capabilities - declare the capabilities of the peer
970 * we are connected to.
971 */
972struct wl1271_acx_ht_capabilities {
973 struct acx_header header;
974
975 /*
976 * bit 0 - Allow HT Operation
977 * bit 1 - Allow Greenfield format in TX
978 * bit 2 - Allow Short GI in TX
979 * bit 3 - Allow L-SIG TXOP Protection in TX
980 * bit 4 - Allow HT Control fields in TX.
981 * Note, driver will still leave space for HT control in packets
982 * regardless of the value of this field. FW will be responsible
983 * to drop the HT field from any frame when this Bit set to 0.
984 * bit 5 - Allow RD initiation in TXOP. FW is allowed to initate RD.
985 * Exact policy setting for this feature is TBD.
986 * Note, this bit can only be set to 1 if bit 3 is set to 1.
987 */
988 __le32 ht_capabilites;
989
990 /*
991 * Indicates to which peer these capabilities apply.
992 * For infrastructure use ff:ff:ff:ff:ff:ff that indicates relevance
993 * for all peers.
994 * Only valid for IBSS/DLS operation.
995 */
996 u8 mac_address[ETH_ALEN];
997
998 /*
999 * This the maximum A-MPDU length supported by the AP. The FW may not
1000 * exceed this length when sending A-MPDUs
1001 */
1002 u8 ampdu_max_length;
1003
1004 /* This is the minimal spacing required when sending A-MPDUs to the AP*/
1005 u8 ampdu_min_spacing;
1006} __packed;
1007
1008/* HT Capabilites Fw Bit Mask Mapping */
1009#define WL1271_ACX_FW_CAP_HT_OPERATION BIT(0)
1010#define WL1271_ACX_FW_CAP_GREENFIELD_FRAME_FORMAT BIT(1)
1011#define WL1271_ACX_FW_CAP_SHORT_GI_FOR_20MHZ_PACKETS BIT(2)
1012#define WL1271_ACX_FW_CAP_LSIG_TXOP_PROTECTION BIT(3)
1013#define WL1271_ACX_FW_CAP_HT_CONTROL_FIELDS BIT(4)
1014#define WL1271_ACX_FW_CAP_RD_INITIATION BIT(5)
1015
1016
1017/*
1018 * ACX_HT_BSS_OPERATION
1019 * Configure HT capabilities - AP rules for behavior in the BSS.
1020 */
1021struct wl1271_acx_ht_information {
1022 struct acx_header header;
1023
1024 /* Values: 0 - RIFS not allowed, 1 - RIFS allowed */
1025 u8 rifs_mode;
1026
1027 /* Values: 0 - 3 like in spec */
1028 u8 ht_protection;
1029
1030 /* Values: 0 - GF protection not required, 1 - GF protection required */
1031 u8 gf_protection;
1032
1033 /*Values: 0 - TX Burst limit not required, 1 - TX Burst Limit required*/
1034 u8 ht_tx_burst_limit;
1035
1036 /*
1037 * Values: 0 - Dual CTS protection not required,
1038 * 1 - Dual CTS Protection required
1039 * Note: When this value is set to 1 FW will protect all TXOP with RTS
1040 * frame and will not use CTS-to-self regardless of the value of the
1041 * ACX_CTS_PROTECTION information element
1042 */
1043 u8 dual_cts_protection;
1044
1045 u8 padding[3];
1046} __packed;
1047
967struct wl1271_acx_fw_tsf_information { 1048struct wl1271_acx_fw_tsf_information {
968 struct acx_header header; 1049 struct acx_header header;
969 1050
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 0fd472597fa6..5d5f4c6a9644 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -2145,6 +2145,21 @@ static const u8 wl1271_rate_to_idx_2ghz[] = {
2145 0 /* CONF_HW_RXTX_RATE_1 */ 2145 0 /* CONF_HW_RXTX_RATE_1 */
2146}; 2146};
2147 2147
2148/* 11n STA capabilities */
2149#define HW_RX_HIGHEST_RATE 72
2150
2151#define WL1271_HT_CAP { \
2152 .cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20, \
2153 .ht_supported = true, \
2154 .ampdu_factor = IEEE80211_HT_MAX_AMPDU_8K, \
2155 .ampdu_density = IEEE80211_HT_MPDU_DENSITY_8, \
2156 .mcs = { \
2157 .rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
2158 .rx_highest = cpu_to_le16(HW_RX_HIGHEST_RATE), \
2159 .tx_params = IEEE80211_HT_MCS_TX_DEFINED, \
2160 }, \
2161}
2162
2148/* can't be const, mac80211 writes to this */ 2163/* can't be const, mac80211 writes to this */
2149static struct ieee80211_supported_band wl1271_band_2ghz = { 2164static struct ieee80211_supported_band wl1271_band_2ghz = {
2150 .channels = wl1271_channels, 2165 .channels = wl1271_channels,