wlan_crypto_none.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: Public API intialization of crypto service with object manager
  20. */
  21. #include <qdf_types.h>
  22. #include <wlan_cmn.h>
  23. #include <wlan_objmgr_cmn.h>
  24. #include <wlan_objmgr_global_obj.h>
  25. #include <wlan_objmgr_psoc_obj.h>
  26. #include <wlan_objmgr_pdev_obj.h>
  27. #include <wlan_objmgr_vdev_obj.h>
  28. #include <wlan_objmgr_peer_obj.h>
  29. #include "wlan_crypto_global_def.h"
  30. #include "wlan_crypto_def_i.h"
  31. #include "wlan_crypto_main_i.h"
  32. #include "wlan_crypto_obj_mgr_i.h"
  33. static QDF_STATUS none_setkey(struct wlan_crypto_key *key)
  34. {
  35. return QDF_STATUS_SUCCESS;
  36. }
  37. static QDF_STATUS none_encap(struct wlan_crypto_key *key,
  38. qdf_nbuf_t wbuf,
  39. uint8_t encapdone,
  40. uint8_t hdrlen){
  41. return QDF_STATUS_SUCCESS;
  42. }
  43. static QDF_STATUS none_decap(struct wlan_crypto_key *key,
  44. qdf_nbuf_t wbuf,
  45. uint8_t tid,
  46. uint8_t hdrlen){
  47. return QDF_STATUS_SUCCESS;
  48. }
  49. static QDF_STATUS none_enmic(struct wlan_crypto_key *key,
  50. qdf_nbuf_t wbuf,
  51. uint8_t encapdone,
  52. uint8_t hdrlen){
  53. return QDF_STATUS_SUCCESS;
  54. }
  55. static QDF_STATUS none_demic(struct wlan_crypto_key *key,
  56. qdf_nbuf_t wbuf,
  57. uint8_t tid,
  58. uint8_t hdrlen){
  59. return QDF_STATUS_SUCCESS;
  60. }
  61. const struct wlan_crypto_cipher none_cipher_table = {
  62. "NONE",
  63. WLAN_CRYPTO_CIPHER_NONE,
  64. 0,
  65. 0,
  66. 0,
  67. 0,
  68. none_setkey,
  69. none_encap,
  70. none_decap,
  71. none_enmic,
  72. none_demic,
  73. };
  74. const struct wlan_crypto_cipher *none_register(void)
  75. {
  76. return &none_cipher_table;
  77. }