testmode.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include "wcn36xx.h"
  17. struct ftm_rsp_msg {
  18. u16 msg_id;
  19. u16 msg_body_length;
  20. u32 resp_status;
  21. u8 msg_response[0];
  22. } __packed;
  23. /* The request buffer of FTM which contains a byte of command and the request */
  24. struct ftm_payload {
  25. u16 ftm_cmd_type;
  26. struct ftm_rsp_msg ftm_cmd_msg;
  27. } __packed;
  28. #define MSG_GET_BUILD_RELEASE_NUMBER 0x32A2
  29. #ifdef CONFIG_NL80211_TESTMODE
  30. int wcn36xx_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  31. void *data, int len);
  32. #else
  33. static inline int wcn36xx_tm_cmd(struct ieee80211_hw *hw,
  34. struct ieee80211_vif *vif,
  35. void *data, int len)
  36. {
  37. return 0;
  38. }
  39. #endif