Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wireless: fix nl80211 vendor commands

In my previous commit to validate a policy I neglected to
actually add one to the few drivers using vendor commands,
fix that now.

Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Fixes: 901bb9891855 ("nl80211: require and validate vendor command policy")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+8
+4
drivers/net/wireless/ath/wil6210/cfg80211.c
··· 177 177 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SECTOR_CFG, 178 178 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | 179 179 WIPHY_VENDOR_CMD_NEED_RUNNING, 180 + .policy = wil_rf_sector_policy, 180 181 .doit = wil_rf_sector_get_cfg 181 182 }, 182 183 { ··· 185 184 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SECTOR_CFG, 186 185 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | 187 186 WIPHY_VENDOR_CMD_NEED_RUNNING, 187 + .policy = wil_rf_sector_policy, 188 188 .doit = wil_rf_sector_set_cfg 189 189 }, 190 190 { ··· 194 192 QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SELECTED_SECTOR, 195 193 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | 196 194 WIPHY_VENDOR_CMD_NEED_RUNNING, 195 + .policy = wil_rf_sector_policy, 197 196 .doit = wil_rf_sector_get_selected 198 197 }, 199 198 { ··· 203 200 QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SELECTED_SECTOR, 204 201 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | 205 202 WIPHY_VENDOR_CMD_NEED_RUNNING, 203 + .policy = wil_rf_sector_policy, 206 204 .doit = wil_rf_sector_set_selected 207 205 }, 208 206 };
+1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c
··· 112 112 }, 113 113 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | 114 114 WIPHY_VENDOR_CMD_NEED_NETDEV, 115 + .policy = VENDOR_CMD_RAW_DATA, 115 116 .doit = brcmf_cfg80211_vndr_cmds_dcmd_handler 116 117 }, 117 118 };
+3
drivers/net/wireless/ti/wlcore/vendor_cmd.c
··· 163 163 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV | 164 164 WIPHY_VENDOR_CMD_NEED_RUNNING, 165 165 .doit = wlcore_vendor_cmd_smart_config_start, 166 + .policy = wlcore_vendor_attr_policy, 166 167 }, 167 168 { 168 169 .info = { ··· 173 172 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV | 174 173 WIPHY_VENDOR_CMD_NEED_RUNNING, 175 174 .doit = wlcore_vendor_cmd_smart_config_stop, 175 + .policy = wlcore_vendor_attr_policy, 176 176 }, 177 177 { 178 178 .info = { ··· 183 181 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV | 184 182 WIPHY_VENDOR_CMD_NEED_RUNNING, 185 183 .doit = wlcore_vendor_cmd_smart_config_set_group_key, 184 + .policy = wlcore_vendor_attr_policy, 186 185 }, 187 186 }; 188 187