diff options
author | Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com> | 2012-01-12 07:51:39 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-01-13 06:48:25 -0500 |
commit | c1762a3fe196483981f91b926f5f6ee18af757f2 (patch) | |
tree | 39247fd547f84646ed137bdbac25851d73c58262 /drivers/net/wireless/ath/ath6kl/wmi.h | |
parent | 8232736dabd2a0310f76944fa7af0542fe3ded4f (diff) |
ath6kl: Add support for uAPSD
* A new APSD power save queue is added in the station structure.
* When a station has APSD capability and goes to power save, the frame
designated to the station will be buffered in APSD queue.
* When the host receives a frame which the firmware marked as trigger,
host delivers the buffered frame from the APSD power save queue.
Number of frames to deliver is decided by MAX SP length.
* When a station moves from sleep to awake state, all frames buffered
in APSD power save queue are sent to the firmware.
* When a station is disconnected, all frames bufferes in APSD power save
queue are dropped.
* When the host queues the first frame to the APSD queue or removes the
last frame from the APSD queue, it is indicated to the firmware using
WMI_AP_APSD_BUFFERED_TRAFFIC_CMD.
kvalo: fix buggy handling of sks queues, made it more obvious
the user priority when wmm is disabled, remove unneed else block and
combined some variable declarations
Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/wmi.h')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index eae0e4e065c4..48e9d2641d69 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -149,8 +149,7 @@ enum wmi_msg_type { | |||
149 | #define WMI_DATA_HDR_PS_MASK 0x1 | 149 | #define WMI_DATA_HDR_PS_MASK 0x1 |
150 | #define WMI_DATA_HDR_PS_SHIFT 5 | 150 | #define WMI_DATA_HDR_PS_SHIFT 5 |
151 | 151 | ||
152 | #define WMI_DATA_HDR_MORE_MASK 0x1 | 152 | #define WMI_DATA_HDR_MORE 0x20 |
153 | #define WMI_DATA_HDR_MORE_SHIFT 5 | ||
154 | 153 | ||
155 | enum wmi_data_hdr_data_type { | 154 | enum wmi_data_hdr_data_type { |
156 | WMI_DATA_HDR_DATA_TYPE_802_3 = 0, | 155 | WMI_DATA_HDR_DATA_TYPE_802_3 = 0, |
@@ -160,6 +159,13 @@ enum wmi_data_hdr_data_type { | |||
160 | WMI_DATA_HDR_DATA_TYPE_ACL, | 159 | WMI_DATA_HDR_DATA_TYPE_ACL, |
161 | }; | 160 | }; |
162 | 161 | ||
162 | /* Bitmap of data header flags */ | ||
163 | enum wmi_data_hdr_flags { | ||
164 | WMI_DATA_HDR_FLAGS_MORE = 0x1, | ||
165 | WMI_DATA_HDR_FLAGS_EOSP = 0x2, | ||
166 | WMI_DATA_HDR_FLAGS_UAPSD = 0x4, | ||
167 | }; | ||
168 | |||
163 | #define WMI_DATA_HDR_DATA_TYPE_MASK 0x3 | 169 | #define WMI_DATA_HDR_DATA_TYPE_MASK 0x3 |
164 | #define WMI_DATA_HDR_DATA_TYPE_SHIFT 6 | 170 | #define WMI_DATA_HDR_DATA_TYPE_SHIFT 6 |
165 | 171 | ||
@@ -173,8 +179,12 @@ enum wmi_data_hdr_data_type { | |||
173 | #define WMI_DATA_HDR_META_MASK 0x7 | 179 | #define WMI_DATA_HDR_META_MASK 0x7 |
174 | #define WMI_DATA_HDR_META_SHIFT 13 | 180 | #define WMI_DATA_HDR_META_SHIFT 13 |
175 | 181 | ||
182 | /* Macros for operating on WMI_DATA_HDR (info3) field */ | ||
176 | #define WMI_DATA_HDR_IF_IDX_MASK 0xF | 183 | #define WMI_DATA_HDR_IF_IDX_MASK 0xF |
177 | 184 | ||
185 | #define WMI_DATA_HDR_TRIG 0x10 | ||
186 | #define WMI_DATA_HDR_EOSP 0x10 | ||
187 | |||
178 | struct wmi_data_hdr { | 188 | struct wmi_data_hdr { |
179 | s8 rssi; | 189 | s8 rssi; |
180 | 190 | ||
@@ -203,7 +213,8 @@ struct wmi_data_hdr { | |||
203 | /* | 213 | /* |
204 | * usage of info3, 16-bit: | 214 | * usage of info3, 16-bit: |
205 | * b3:b0 - Interface index | 215 | * b3:b0 - Interface index |
206 | * b15:b4 - Reserved | 216 | * b4 - uAPSD trigger in rx & EOSP in tx |
217 | * b15:b5 - Reserved | ||
207 | */ | 218 | */ |
208 | __le16 info3; | 219 | __le16 info3; |
209 | } __packed; | 220 | } __packed; |
@@ -2116,6 +2127,19 @@ struct wmi_rx_frame_format_cmd { | |||
2116 | } __packed; | 2127 | } __packed; |
2117 | 2128 | ||
2118 | /* AP mode events */ | 2129 | /* AP mode events */ |
2130 | struct wmi_ap_set_apsd_cmd { | ||
2131 | u8 enable; | ||
2132 | } __packed; | ||
2133 | |||
2134 | enum wmi_ap_apsd_buffered_traffic_flags { | ||
2135 | WMI_AP_APSD_NO_DELIVERY_FRAMES = 0x1, | ||
2136 | }; | ||
2137 | |||
2138 | struct wmi_ap_apsd_buffered_traffic_cmd { | ||
2139 | __le16 aid; | ||
2140 | __le16 bitmap; | ||
2141 | __le32 flags; | ||
2142 | } __packed; | ||
2119 | 2143 | ||
2120 | /* WMI_PS_POLL_EVENT */ | 2144 | /* WMI_PS_POLL_EVENT */ |
2121 | struct wmi_pspoll_event { | 2145 | struct wmi_pspoll_event { |
@@ -2332,7 +2356,7 @@ enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi); | |||
2332 | void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id); | 2356 | void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id); |
2333 | int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb); | 2357 | int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb); |
2334 | int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb, | 2358 | int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb, |
2335 | u8 msg_type, bool more_data, | 2359 | u8 msg_type, u32 flags, |
2336 | enum wmi_data_hdr_data_type data_type, | 2360 | enum wmi_data_hdr_data_type data_type, |
2337 | u8 meta_ver, void *tx_meta_info, u8 if_idx); | 2361 | u8 meta_ver, void *tx_meta_info, u8 if_idx); |
2338 | 2362 | ||
@@ -2446,7 +2470,16 @@ int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode); | |||
2446 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); | 2470 | int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on); |
2447 | int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, | 2471 | int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, |
2448 | u8 *filter, bool add_filter); | 2472 | u8 *filter, bool add_filter); |
2473 | /* AP mode uAPSD */ | ||
2474 | int ath6kl_wmi_ap_set_apsd(struct wmi *wmi, u8 if_idx, u8 enable); | ||
2475 | |||
2476 | int ath6kl_wmi_set_apsd_bfrd_traf(struct wmi *wmi, | ||
2477 | u8 if_idx, u16 aid, | ||
2478 | u16 bitmap, u32 flags); | ||
2479 | |||
2480 | u8 ath6kl_wmi_get_traffic_class(u8 user_priority); | ||
2449 | 2481 | ||
2482 | u8 ath6kl_wmi_determine_user_priority(u8 *pkt, u32 layer2_pri); | ||
2450 | /* AP mode */ | 2483 | /* AP mode */ |
2451 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx, | 2484 | int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx, |
2452 | struct wmi_connect_cmd *p); | 2485 | struct wmi_connect_cmd *p); |