testmode.h (1421B)
1/* 2 * Copyright (c) 2018, The Linux Foundation. All rights reserved. 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 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17#include "wcn36xx.h" 18 19struct ftm_rsp_msg { 20 u16 msg_id; 21 u16 msg_body_length; 22 u32 resp_status; 23 u8 msg_response[]; 24} __packed; 25 26/* The request buffer of FTM which contains a byte of command and the request */ 27struct ftm_payload { 28 u16 ftm_cmd_type; 29 struct ftm_rsp_msg ftm_cmd_msg; 30} __packed; 31 32#define MSG_GET_BUILD_RELEASE_NUMBER 0x32A2 33 34#ifdef CONFIG_NL80211_TESTMODE 35int wcn36xx_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 36 void *data, int len); 37 38#else 39static inline int wcn36xx_tm_cmd(struct ieee80211_hw *hw, 40 struct ieee80211_vif *vif, 41 void *data, int len) 42{ 43 return 0; 44} 45 46#endif