002-vendor_command_policy.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. mac80211 from kernel 5.3 and later checks the new policy attribute.
  2. As this driver does not define any policies and does strange things,
  3. just tell mac80211 to ignore the policies.
  4. --- a/os_dep/linux/rtw_cfgvendor.c
  5. +++ b/os_dep/linux/rtw_cfgvendor.c
  6. @@ -1173,7 +1173,8 @@ static const struct wiphy_vendor_command
  7. .subcmd = BRCM_VENDOR_SCMD_PRIV_STR
  8. },
  9. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  10. - .doit = wl_cfgvendor_priv_string_handler
  11. + .doit = wl_cfgvendor_priv_string_handler,
  12. + .policy = VENDOR_CMD_RAW_DATA,
  13. },
  14. #if defined(GSCAN_SUPPORT) && 0
  15. {
  16. @@ -1182,7 +1183,8 @@ static const struct wiphy_vendor_command
  17. .subcmd = GSCAN_SUBCMD_GET_CAPABILITIES
  18. },
  19. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  20. - .doit = wl_cfgvendor_gscan_get_capabilities
  21. + .doit = wl_cfgvendor_gscan_get_capabilities,
  22. + .policy = VENDOR_CMD_RAW_DATA,
  23. },
  24. {
  25. {
  26. @@ -1190,7 +1192,8 @@ static const struct wiphy_vendor_command
  27. .subcmd = GSCAN_SUBCMD_SET_CONFIG
  28. },
  29. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  30. - .doit = wl_cfgvendor_set_scan_cfg
  31. + .doit = wl_cfgvendor_set_scan_cfg,
  32. + .policy = VENDOR_CMD_RAW_DATA,
  33. },
  34. {
  35. {
  36. @@ -1198,7 +1201,8 @@ static const struct wiphy_vendor_command
  37. .subcmd = GSCAN_SUBCMD_SET_SCAN_CONFIG
  38. },
  39. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  40. - .doit = wl_cfgvendor_set_batch_scan_cfg
  41. + .doit = wl_cfgvendor_set_batch_scan_cfg,
  42. + .policy = VENDOR_CMD_RAW_DATA,
  43. },
  44. {
  45. {
  46. @@ -1206,7 +1210,8 @@ static const struct wiphy_vendor_command
  47. .subcmd = GSCAN_SUBCMD_ENABLE_GSCAN
  48. },
  49. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  50. - .doit = wl_cfgvendor_initiate_gscan
  51. + .doit = wl_cfgvendor_initiate_gscan,
  52. + .policy = VENDOR_CMD_RAW_DATA,
  53. },
  54. {
  55. {
  56. @@ -1214,7 +1219,8 @@ static const struct wiphy_vendor_command
  57. .subcmd = GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS
  58. },
  59. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  60. - .doit = wl_cfgvendor_enable_full_scan_result
  61. + .doit = wl_cfgvendor_enable_full_scan_result,
  62. + .policy = VENDOR_CMD_RAW_DATA,
  63. },
  64. {
  65. {
  66. @@ -1222,7 +1228,8 @@ static const struct wiphy_vendor_command
  67. .subcmd = GSCAN_SUBCMD_SET_HOTLIST
  68. },
  69. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  70. - .doit = wl_cfgvendor_hotlist_cfg
  71. + .doit = wl_cfgvendor_hotlist_cfg,
  72. + .policy = VENDOR_CMD_RAW_DATA,
  73. },
  74. {
  75. {
  76. @@ -1230,7 +1237,8 @@ static const struct wiphy_vendor_command
  77. .subcmd = GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG
  78. },
  79. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  80. - .doit = wl_cfgvendor_significant_change_cfg
  81. + .doit = wl_cfgvendor_significant_change_cfg,
  82. + .policy = VENDOR_CMD_RAW_DATA,
  83. },
  84. {
  85. {
  86. @@ -1238,7 +1246,8 @@ static const struct wiphy_vendor_command
  87. .subcmd = GSCAN_SUBCMD_GET_SCAN_RESULTS
  88. },
  89. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  90. - .doit = wl_cfgvendor_gscan_get_batch_results
  91. + .doit = wl_cfgvendor_gscan_get_batch_results,
  92. + .policy = VENDOR_CMD_RAW_DATA,
  93. },
  94. {
  95. {
  96. @@ -1246,7 +1255,8 @@ static const struct wiphy_vendor_command
  97. .subcmd = GSCAN_SUBCMD_GET_CHANNEL_LIST
  98. },
  99. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  100. - .doit = wl_cfgvendor_gscan_get_channel_list
  101. + .doit = wl_cfgvendor_gscan_get_channel_list,
  102. + .policy = VENDOR_CMD_RAW_DATA,
  103. },
  104. #endif /* GSCAN_SUPPORT */
  105. #if defined(RTT_SUPPORT) && 0
  106. @@ -1256,7 +1266,8 @@ static const struct wiphy_vendor_command
  107. .subcmd = RTT_SUBCMD_SET_CONFIG
  108. },
  109. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  110. - .doit = wl_cfgvendor_rtt_set_config
  111. + .doit = wl_cfgvendor_rtt_set_config,
  112. + .policy = VENDOR_CMD_RAW_DATA,
  113. },
  114. {
  115. {
  116. @@ -1264,7 +1275,8 @@ static const struct wiphy_vendor_command
  117. .subcmd = RTT_SUBCMD_CANCEL_CONFIG
  118. },
  119. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  120. - .doit = wl_cfgvendor_rtt_cancel_config
  121. + .doit = wl_cfgvendor_rtt_cancel_config,
  122. + .policy = VENDOR_CMD_RAW_DATA,
  123. },
  124. {
  125. {
  126. @@ -1272,7 +1284,8 @@ static const struct wiphy_vendor_command
  127. .subcmd = RTT_SUBCMD_GETCAPABILITY
  128. },
  129. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  130. - .doit = wl_cfgvendor_rtt_get_capability
  131. + .doit = wl_cfgvendor_rtt_get_capability,
  132. + .policy = VENDOR_CMD_RAW_DATA,
  133. },
  134. #endif /* RTT_SUPPORT */
  135. {
  136. @@ -1281,7 +1294,8 @@ static const struct wiphy_vendor_command
  137. .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET
  138. },
  139. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  140. - .doit = rtw_cfgvendor_get_feature_set
  141. + .doit = rtw_cfgvendor_get_feature_set,
  142. + .policy = VENDOR_CMD_RAW_DATA,
  143. },
  144. {
  145. {
  146. @@ -1289,7 +1303,8 @@ static const struct wiphy_vendor_command
  147. .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET_MATRIX
  148. },
  149. .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
  150. - .doit = rtw_cfgvendor_get_feature_set_matrix
  151. + .doit = rtw_cfgvendor_get_feature_set_matrix,
  152. + .policy = VENDOR_CMD_RAW_DATA,
  153. }
  154. };