wmi.h (240d279940ef496e9456db2287b7989f6521e2e2) | wmi.h (6765d0aa5ff5b92098f5e571f26904106eae6ff3) |
---|---|
1/* 2 * Copyright (c) 2010-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 159 unchanged lines hidden (view full) --- 168#define WMI_DATA_HDR_SEQNO_SHIFT 0 169 170#define WMI_DATA_HDR_AMSDU_MASK 0x1 171#define WMI_DATA_HDR_AMSDU_SHIFT 12 172 173#define WMI_DATA_HDR_META_MASK 0x7 174#define WMI_DATA_HDR_META_SHIFT 13 175 | 1/* 2 * Copyright (c) 2010-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 159 unchanged lines hidden (view full) --- 168#define WMI_DATA_HDR_SEQNO_SHIFT 0 169 170#define WMI_DATA_HDR_AMSDU_MASK 0x1 171#define WMI_DATA_HDR_AMSDU_SHIFT 12 172 173#define WMI_DATA_HDR_META_MASK 0x7 174#define WMI_DATA_HDR_META_SHIFT 13 175 |
176#define WMI_DATA_HDR_IF_IDX_MASK 0xF 177 |
|
176struct wmi_data_hdr { 177 s8 rssi; 178 179 /* 180 * usage of 'info' field(8-bit): 181 * 182 * b1:b0 - WMI_MSG_TYPE 183 * b4:b3:b2 - UP(tid) --- 8 unchanged lines hidden (view full) --- 192 /* 193 * usage of 'info2' field(16-bit): 194 * 195 * b11:b0 - seq_no 196 * b12 - A-MSDU? 197 * b15:b13 - META_DATA_VERSION 0 - 7 198 */ 199 __le16 info2; | 178struct wmi_data_hdr { 179 s8 rssi; 180 181 /* 182 * usage of 'info' field(8-bit): 183 * 184 * b1:b0 - WMI_MSG_TYPE 185 * b4:b3:b2 - UP(tid) --- 8 unchanged lines hidden (view full) --- 194 /* 195 * usage of 'info2' field(16-bit): 196 * 197 * b11:b0 - seq_no 198 * b12 - A-MSDU? 199 * b15:b13 - META_DATA_VERSION 0 - 7 200 */ 201 __le16 info2; |
202 203 /* 204 * usage of info3, 16-bit: 205 * b3:b0 - Interface index 206 * b15:b4 - Reserved 207 */ |
|
200 __le16 info3; 201} __packed; 202 203static inline u8 wmi_data_hdr_get_up(struct wmi_data_hdr *dhdr) 204{ 205 return (dhdr->info >> WMI_DATA_HDR_UP_SHIFT) & WMI_DATA_HDR_UP_MASK; 206} 207 --- 26 unchanged lines hidden (view full) --- 234} 235 236static inline u8 wmi_data_hdr_get_meta(struct wmi_data_hdr *dhdr) 237{ 238 return (le16_to_cpu(dhdr->info2) >> WMI_DATA_HDR_META_SHIFT) & 239 WMI_DATA_HDR_META_MASK; 240} 241 | 208 __le16 info3; 209} __packed; 210 211static inline u8 wmi_data_hdr_get_up(struct wmi_data_hdr *dhdr) 212{ 213 return (dhdr->info >> WMI_DATA_HDR_UP_SHIFT) & WMI_DATA_HDR_UP_MASK; 214} 215 --- 26 unchanged lines hidden (view full) --- 242} 243 244static inline u8 wmi_data_hdr_get_meta(struct wmi_data_hdr *dhdr) 245{ 246 return (le16_to_cpu(dhdr->info2) >> WMI_DATA_HDR_META_SHIFT) & 247 WMI_DATA_HDR_META_MASK; 248} 249 |
250static inline u8 wmi_data_hdr_get_if_idx(struct wmi_data_hdr *dhdr) 251{ 252 return le16_to_cpu(dhdr->info3) & WMI_DATA_HDR_IF_IDX_MASK; 253} 254 |
|
242/* Tx meta version definitions */ 243#define WMI_MAX_TX_META_SZ 12 244#define WMI_META_VERSION_1 0x01 245#define WMI_META_VERSION_2 0x02 246 247struct wmi_tx_meta_v1 { 248 /* packet ID to identify the tx request */ 249 u8 pkt_id; --- 48 unchanged lines hidden (view full) --- 298 * b03:b00 - id 299 * b15:b04 - unused */ 300 __le16 info1; 301 302 /* for alignment */ 303 __le16 reserved; 304} __packed; 305 | 255/* Tx meta version definitions */ 256#define WMI_MAX_TX_META_SZ 12 257#define WMI_META_VERSION_1 0x01 258#define WMI_META_VERSION_2 0x02 259 260struct wmi_tx_meta_v1 { 261 /* packet ID to identify the tx request */ 262 u8 pkt_id; --- 48 unchanged lines hidden (view full) --- 311 * b03:b00 - id 312 * b15:b04 - unused */ 313 __le16 info1; 314 315 /* for alignment */ 316 __le16 reserved; 317} __packed; 318 |
319static inline u8 wmi_cmd_hdr_get_if_idx(struct wmi_cmd_hdr *chdr) 320{ 321 return le16_to_cpu(chdr->info1) & WMI_CMD_HDR_IF_ID_MASK; 322} 323 |
|
306/* List of WMI commands */ 307enum wmi_cmd_id { 308 WMI_CONNECT_CMDID = 0x0001, 309 WMI_RECONNECT_CMDID, 310 WMI_DISCONNECT_CMDID, 311 WMI_SYNCHRONIZE_CMDID, 312 WMI_CREATE_PSTREAM_CMDID, 313 WMI_DELETE_PSTREAM_CMDID, --- 1848 unchanged lines hidden (view full) --- 2162}; 2163 2164enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi); 2165void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id); 2166int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb); 2167int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb, 2168 u8 msg_type, bool more_data, 2169 enum wmi_data_hdr_data_type data_type, | 324/* List of WMI commands */ 325enum wmi_cmd_id { 326 WMI_CONNECT_CMDID = 0x0001, 327 WMI_RECONNECT_CMDID, 328 WMI_DISCONNECT_CMDID, 329 WMI_SYNCHRONIZE_CMDID, 330 WMI_CREATE_PSTREAM_CMDID, 331 WMI_DELETE_PSTREAM_CMDID, --- 1848 unchanged lines hidden (view full) --- 2180}; 2181 2182enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi); 2183void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id); 2184int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb); 2185int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb, 2186 u8 msg_type, bool more_data, 2187 enum wmi_data_hdr_data_type data_type, |
2170 u8 meta_ver, void *tx_meta_info); | 2188 u8 meta_ver, void *tx_meta_info, u8 if_idx); |
2171 2172int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb); 2173int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb); 2174int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, 2175 struct sk_buff *skb, u32 layer2_priority, 2176 bool wmm_enabled, u8 *ac); 2177 2178int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb); --- 108 unchanged lines hidden (view full) --- 2287 2288int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags); 2289 2290int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx); 2291 2292int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type, 2293 const u8 *ie, u8 ie_len); 2294 | 2189 2190int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb); 2191int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb); 2192int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, 2193 struct sk_buff *skb, u32 layer2_priority, 2194 bool wmm_enabled, u8 *ac); 2195 2196int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb); --- 108 unchanged lines hidden (view full) --- 2305 2306int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags); 2307 2308int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx); 2309 2310int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type, 2311 const u8 *ie, u8 ie_len); 2312 |
2313struct ath6kl_vif *ath6kl_get_vif_by_index(struct ath6kl *ar, u8 if_idx); |
|
2295void *ath6kl_wmi_init(struct ath6kl *devt); 2296void ath6kl_wmi_shutdown(struct wmi *wmi); 2297 2298#endif /* WMI_H */ | 2314void *ath6kl_wmi_init(struct ath6kl *devt); 2315void ath6kl_wmi_shutdown(struct wmi *wmi); 2316 2317#endif /* WMI_H */ |