| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 
|---|
| 2 | /* | 
|---|
| 3 | * Portions of this file | 
|---|
| 4 | * Copyright(c) 2016-2017 Intel Deutschland GmbH | 
|---|
| 5 | * Copyright (C) 2018, 2021-2025 Intel Corporation | 
|---|
| 6 | */ | 
|---|
| 7 | #ifndef __CFG80211_RDEV_OPS | 
|---|
| 8 | #define __CFG80211_RDEV_OPS | 
|---|
| 9 |  | 
|---|
| 10 | #include <linux/rtnetlink.h> | 
|---|
| 11 | #include <net/cfg80211.h> | 
|---|
| 12 | #include "core.h" | 
|---|
| 13 | #include "trace.h" | 
|---|
| 14 |  | 
|---|
| 15 | static inline int rdev_suspend(struct cfg80211_registered_device *rdev, | 
|---|
| 16 | struct cfg80211_wowlan *wowlan) | 
|---|
| 17 | { | 
|---|
| 18 | int ret; | 
|---|
| 19 | trace_rdev_suspend(wiphy: &rdev->wiphy, wow: wowlan); | 
|---|
| 20 | ret = rdev->ops->suspend(&rdev->wiphy, wowlan); | 
|---|
| 21 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 22 | return ret; | 
|---|
| 23 | } | 
|---|
| 24 |  | 
|---|
| 25 | static inline int rdev_resume(struct cfg80211_registered_device *rdev) | 
|---|
| 26 | { | 
|---|
| 27 | int ret; | 
|---|
| 28 | trace_rdev_resume(wiphy: &rdev->wiphy); | 
|---|
| 29 | ret = rdev->ops->resume(&rdev->wiphy); | 
|---|
| 30 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 31 | return ret; | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 | static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev, | 
|---|
| 35 | bool enabled) | 
|---|
| 36 | { | 
|---|
| 37 | trace_rdev_set_wakeup(wiphy: &rdev->wiphy, enabled); | 
|---|
| 38 | rdev->ops->set_wakeup(&rdev->wiphy, enabled); | 
|---|
| 39 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 40 | } | 
|---|
| 41 |  | 
|---|
| 42 | static inline struct wireless_dev | 
|---|
| 43 | *rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name, | 
|---|
| 44 | unsigned char name_assign_type, | 
|---|
| 45 | enum nl80211_iftype type, | 
|---|
| 46 | struct vif_params *params) | 
|---|
| 47 | { | 
|---|
| 48 | struct wireless_dev *ret; | 
|---|
| 49 | trace_rdev_add_virtual_intf(wiphy: &rdev->wiphy, name, type); | 
|---|
| 50 | ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, name_assign_type, | 
|---|
| 51 | type, params); | 
|---|
| 52 | trace_rdev_return_wdev(wiphy: &rdev->wiphy, wdev: ret); | 
|---|
| 53 | return ret; | 
|---|
| 54 | } | 
|---|
| 55 |  | 
|---|
| 56 | static inline int | 
|---|
| 57 | rdev_del_virtual_intf(struct cfg80211_registered_device *rdev, | 
|---|
| 58 | struct wireless_dev *wdev) | 
|---|
| 59 | { | 
|---|
| 60 | int ret; | 
|---|
| 61 | trace_rdev_del_virtual_intf(wiphy: &rdev->wiphy, wdev); | 
|---|
| 62 | ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); | 
|---|
| 63 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 64 | return ret; | 
|---|
| 65 | } | 
|---|
| 66 |  | 
|---|
| 67 | static inline int | 
|---|
| 68 | rdev_change_virtual_intf(struct cfg80211_registered_device *rdev, | 
|---|
| 69 | struct net_device *dev, enum nl80211_iftype type, | 
|---|
| 70 | struct vif_params *params) | 
|---|
| 71 | { | 
|---|
| 72 | int ret; | 
|---|
| 73 | trace_rdev_change_virtual_intf(wiphy: &rdev->wiphy, netdev: dev, type); | 
|---|
| 74 | ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, params); | 
|---|
| 75 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 76 | return ret; | 
|---|
| 77 | } | 
|---|
| 78 |  | 
|---|
| 79 | static inline int rdev_add_key(struct cfg80211_registered_device *rdev, | 
|---|
| 80 | struct net_device *netdev, int link_id, | 
|---|
| 81 | u8 key_index, bool pairwise, const u8 *mac_addr, | 
|---|
| 82 | struct key_params *params) | 
|---|
| 83 | { | 
|---|
| 84 | int ret; | 
|---|
| 85 | trace_rdev_add_key(wiphy: &rdev->wiphy, netdev, link_id, key_index, pairwise, | 
|---|
| 86 | mac_addr, mode: params->mode); | 
|---|
| 87 | ret = rdev->ops->add_key(&rdev->wiphy, netdev, link_id, key_index, | 
|---|
| 88 | pairwise, mac_addr, params); | 
|---|
| 89 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 90 | return ret; | 
|---|
| 91 | } | 
|---|
| 92 |  | 
|---|
| 93 | static inline int | 
|---|
| 94 | rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, | 
|---|
| 95 | int link_id, u8 key_index, bool pairwise, const u8 *mac_addr, | 
|---|
| 96 | void *cookie, | 
|---|
| 97 | void (*callback)(void *cookie, struct key_params*)) | 
|---|
| 98 | { | 
|---|
| 99 | int ret; | 
|---|
| 100 | trace_rdev_get_key(wiphy: &rdev->wiphy, netdev, link_id, key_index, pairwise, | 
|---|
| 101 | mac_addr); | 
|---|
| 102 | ret = rdev->ops->get_key(&rdev->wiphy, netdev, link_id, key_index, | 
|---|
| 103 | pairwise, mac_addr, cookie, callback); | 
|---|
| 104 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 105 | return ret; | 
|---|
| 106 | } | 
|---|
| 107 |  | 
|---|
| 108 | static inline int rdev_del_key(struct cfg80211_registered_device *rdev, | 
|---|
| 109 | struct net_device *netdev, int link_id, | 
|---|
| 110 | u8 key_index, bool pairwise, const u8 *mac_addr) | 
|---|
| 111 | { | 
|---|
| 112 | int ret; | 
|---|
| 113 | trace_rdev_del_key(wiphy: &rdev->wiphy, netdev, link_id, key_index, pairwise, | 
|---|
| 114 | mac_addr); | 
|---|
| 115 | ret = rdev->ops->del_key(&rdev->wiphy, netdev, link_id, key_index, | 
|---|
| 116 | pairwise, mac_addr); | 
|---|
| 117 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 118 | return ret; | 
|---|
| 119 | } | 
|---|
| 120 |  | 
|---|
| 121 | static inline int | 
|---|
| 122 | rdev_set_default_key(struct cfg80211_registered_device *rdev, | 
|---|
| 123 | struct net_device *netdev, int link_id, u8 key_index, | 
|---|
| 124 | bool unicast, bool multicast) | 
|---|
| 125 | { | 
|---|
| 126 | int ret; | 
|---|
| 127 | trace_rdev_set_default_key(wiphy: &rdev->wiphy, netdev, link_id, key_index, | 
|---|
| 128 | unicast, multicast); | 
|---|
| 129 | ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, link_id, | 
|---|
| 130 | key_index, unicast, multicast); | 
|---|
| 131 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 132 | return ret; | 
|---|
| 133 | } | 
|---|
| 134 |  | 
|---|
| 135 | static inline int | 
|---|
| 136 | rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev, | 
|---|
| 137 | struct net_device *netdev, int link_id, u8 key_index) | 
|---|
| 138 | { | 
|---|
| 139 | int ret; | 
|---|
| 140 | trace_rdev_set_default_mgmt_key(wiphy: &rdev->wiphy, netdev, link_id, | 
|---|
| 141 | key_index); | 
|---|
| 142 | ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, link_id, | 
|---|
| 143 | key_index); | 
|---|
| 144 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 145 | return ret; | 
|---|
| 146 | } | 
|---|
| 147 |  | 
|---|
| 148 | static inline int | 
|---|
| 149 | rdev_set_default_beacon_key(struct cfg80211_registered_device *rdev, | 
|---|
| 150 | struct net_device *netdev, int link_id, | 
|---|
| 151 | u8 key_index) | 
|---|
| 152 | { | 
|---|
| 153 | int ret; | 
|---|
| 154 |  | 
|---|
| 155 | trace_rdev_set_default_beacon_key(wiphy: &rdev->wiphy, netdev, link_id, | 
|---|
| 156 | key_index); | 
|---|
| 157 | ret = rdev->ops->set_default_beacon_key(&rdev->wiphy, netdev, link_id, | 
|---|
| 158 | key_index); | 
|---|
| 159 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 160 | return ret; | 
|---|
| 161 | } | 
|---|
| 162 |  | 
|---|
| 163 | static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, | 
|---|
| 164 | struct net_device *dev, | 
|---|
| 165 | struct cfg80211_ap_settings *settings) | 
|---|
| 166 | { | 
|---|
| 167 | int ret; | 
|---|
| 168 | trace_rdev_start_ap(wiphy: &rdev->wiphy, netdev: dev, settings); | 
|---|
| 169 | ret = rdev->ops->start_ap(&rdev->wiphy, dev, settings); | 
|---|
| 170 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 171 | return ret; | 
|---|
| 172 | } | 
|---|
| 173 |  | 
|---|
| 174 | static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, | 
|---|
| 175 | struct net_device *dev, | 
|---|
| 176 | struct cfg80211_ap_update *info) | 
|---|
| 177 | { | 
|---|
| 178 | int ret; | 
|---|
| 179 | trace_rdev_change_beacon(wiphy: &rdev->wiphy, netdev: dev, info); | 
|---|
| 180 | ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info); | 
|---|
| 181 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 182 | return ret; | 
|---|
| 183 | } | 
|---|
| 184 |  | 
|---|
| 185 | static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev, | 
|---|
| 186 | struct net_device *dev, unsigned int link_id) | 
|---|
| 187 | { | 
|---|
| 188 | int ret; | 
|---|
| 189 | trace_rdev_stop_ap(wiphy: &rdev->wiphy, netdev: dev, link_id); | 
|---|
| 190 | ret = rdev->ops->stop_ap(&rdev->wiphy, dev, link_id); | 
|---|
| 191 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 192 | return ret; | 
|---|
| 193 | } | 
|---|
| 194 |  | 
|---|
| 195 | static inline int rdev_add_station(struct cfg80211_registered_device *rdev, | 
|---|
| 196 | struct net_device *dev, u8 *mac, | 
|---|
| 197 | struct station_parameters *params) | 
|---|
| 198 | { | 
|---|
| 199 | int ret; | 
|---|
| 200 | trace_rdev_add_station(wiphy: &rdev->wiphy, netdev: dev, mac, params); | 
|---|
| 201 | ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params); | 
|---|
| 202 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 203 | return ret; | 
|---|
| 204 | } | 
|---|
| 205 |  | 
|---|
| 206 | static inline int rdev_del_station(struct cfg80211_registered_device *rdev, | 
|---|
| 207 | struct net_device *dev, | 
|---|
| 208 | struct station_del_parameters *params) | 
|---|
| 209 | { | 
|---|
| 210 | int ret; | 
|---|
| 211 | trace_rdev_del_station(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 212 | ret = rdev->ops->del_station(&rdev->wiphy, dev, params); | 
|---|
| 213 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 214 | return ret; | 
|---|
| 215 | } | 
|---|
| 216 |  | 
|---|
| 217 | static inline int rdev_change_station(struct cfg80211_registered_device *rdev, | 
|---|
| 218 | struct net_device *dev, u8 *mac, | 
|---|
| 219 | struct station_parameters *params) | 
|---|
| 220 | { | 
|---|
| 221 | int ret; | 
|---|
| 222 | trace_rdev_change_station(wiphy: &rdev->wiphy, netdev: dev, mac, params); | 
|---|
| 223 | ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params); | 
|---|
| 224 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 225 | return ret; | 
|---|
| 226 | } | 
|---|
| 227 |  | 
|---|
| 228 | static inline int rdev_get_station(struct cfg80211_registered_device *rdev, | 
|---|
| 229 | struct net_device *dev, const u8 *mac, | 
|---|
| 230 | struct station_info *sinfo) | 
|---|
| 231 | { | 
|---|
| 232 | int ret; | 
|---|
| 233 | trace_rdev_get_station(wiphy: &rdev->wiphy, netdev: dev, mac); | 
|---|
| 234 | ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); | 
|---|
| 235 | trace_rdev_return_int_station_info(wiphy: &rdev->wiphy, ret, sinfo); | 
|---|
| 236 | return ret; | 
|---|
| 237 | } | 
|---|
| 238 |  | 
|---|
| 239 | static inline int rdev_dump_station(struct cfg80211_registered_device *rdev, | 
|---|
| 240 | struct net_device *dev, int idx, u8 *mac, | 
|---|
| 241 | struct station_info *sinfo) | 
|---|
| 242 | { | 
|---|
| 243 | int ret; | 
|---|
| 244 | trace_rdev_dump_station(wiphy: &rdev->wiphy, netdev: dev, idx: idx, mac); | 
|---|
| 245 | ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); | 
|---|
| 246 | trace_rdev_return_int_station_info(wiphy: &rdev->wiphy, ret, sinfo); | 
|---|
| 247 | return ret; | 
|---|
| 248 | } | 
|---|
| 249 |  | 
|---|
| 250 | static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev, | 
|---|
| 251 | struct net_device *dev, u8 *dst, u8 *next_hop) | 
|---|
| 252 | { | 
|---|
| 253 | int ret; | 
|---|
| 254 | trace_rdev_add_mpath(wiphy: &rdev->wiphy, netdev: dev, dst, next_hop); | 
|---|
| 255 | ret = rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); | 
|---|
| 256 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 257 | return ret; | 
|---|
| 258 | } | 
|---|
| 259 |  | 
|---|
| 260 | static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev, | 
|---|
| 261 | struct net_device *dev, u8 *dst) | 
|---|
| 262 | { | 
|---|
| 263 | int ret; | 
|---|
| 264 | trace_rdev_del_mpath(wiphy: &rdev->wiphy, netdev: dev, mac: dst); | 
|---|
| 265 | ret = rdev->ops->del_mpath(&rdev->wiphy, dev, dst); | 
|---|
| 266 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 267 | return ret; | 
|---|
| 268 | } | 
|---|
| 269 |  | 
|---|
| 270 | static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev, | 
|---|
| 271 | struct net_device *dev, u8 *dst, | 
|---|
| 272 | u8 *next_hop) | 
|---|
| 273 | { | 
|---|
| 274 | int ret; | 
|---|
| 275 | trace_rdev_change_mpath(wiphy: &rdev->wiphy, netdev: dev, dst, next_hop); | 
|---|
| 276 | ret = rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); | 
|---|
| 277 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 278 | return ret; | 
|---|
| 279 | } | 
|---|
| 280 |  | 
|---|
| 281 | static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev, | 
|---|
| 282 | struct net_device *dev, u8 *dst, u8 *next_hop, | 
|---|
| 283 | struct mpath_info *pinfo) | 
|---|
| 284 | { | 
|---|
| 285 | int ret; | 
|---|
| 286 | trace_rdev_get_mpath(wiphy: &rdev->wiphy, netdev: dev, dst, next_hop); | 
|---|
| 287 | ret = rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); | 
|---|
| 288 | trace_rdev_return_int_mpath_info(wiphy: &rdev->wiphy, ret, pinfo); | 
|---|
| 289 | return ret; | 
|---|
| 290 |  | 
|---|
| 291 | } | 
|---|
| 292 |  | 
|---|
| 293 | static inline int rdev_get_mpp(struct cfg80211_registered_device *rdev, | 
|---|
| 294 | struct net_device *dev, u8 *dst, u8 *mpp, | 
|---|
| 295 | struct mpath_info *pinfo) | 
|---|
| 296 | { | 
|---|
| 297 | int ret; | 
|---|
| 298 |  | 
|---|
| 299 | trace_rdev_get_mpp(wiphy: &rdev->wiphy, netdev: dev, dst, mpp); | 
|---|
| 300 | ret = rdev->ops->get_mpp(&rdev->wiphy, dev, dst, mpp, pinfo); | 
|---|
| 301 | trace_rdev_return_int_mpath_info(wiphy: &rdev->wiphy, ret, pinfo); | 
|---|
| 302 | return ret; | 
|---|
| 303 | } | 
|---|
| 304 |  | 
|---|
| 305 | static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, | 
|---|
| 306 | struct net_device *dev, int idx, u8 *dst, | 
|---|
| 307 | u8 *next_hop, struct mpath_info *pinfo) | 
|---|
| 308 |  | 
|---|
| 309 | { | 
|---|
| 310 | int ret; | 
|---|
| 311 | trace_rdev_dump_mpath(wiphy: &rdev->wiphy, netdev: dev, idx: idx, dst, next_hop); | 
|---|
| 312 | ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, | 
|---|
| 313 | pinfo); | 
|---|
| 314 | trace_rdev_return_int_mpath_info(wiphy: &rdev->wiphy, ret, pinfo); | 
|---|
| 315 | return ret; | 
|---|
| 316 | } | 
|---|
| 317 |  | 
|---|
| 318 | static inline int rdev_dump_mpp(struct cfg80211_registered_device *rdev, | 
|---|
| 319 | struct net_device *dev, int idx, u8 *dst, | 
|---|
| 320 | u8 *mpp, struct mpath_info *pinfo) | 
|---|
| 321 |  | 
|---|
| 322 | { | 
|---|
| 323 | int ret; | 
|---|
| 324 |  | 
|---|
| 325 | trace_rdev_dump_mpp(wiphy: &rdev->wiphy, netdev: dev, idx: idx, dst, mpp); | 
|---|
| 326 | ret = rdev->ops->dump_mpp(&rdev->wiphy, dev, idx, dst, mpp, pinfo); | 
|---|
| 327 | trace_rdev_return_int_mpath_info(wiphy: &rdev->wiphy, ret, pinfo); | 
|---|
| 328 | return ret; | 
|---|
| 329 | } | 
|---|
| 330 |  | 
|---|
| 331 | static inline int | 
|---|
| 332 | rdev_get_mesh_config(struct cfg80211_registered_device *rdev, | 
|---|
| 333 | struct net_device *dev, struct mesh_config *conf) | 
|---|
| 334 | { | 
|---|
| 335 | int ret; | 
|---|
| 336 | trace_rdev_get_mesh_config(wiphy: &rdev->wiphy, netdev: dev); | 
|---|
| 337 | ret = rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); | 
|---|
| 338 | trace_rdev_return_int_mesh_config(wiphy: &rdev->wiphy, ret, conf); | 
|---|
| 339 | return ret; | 
|---|
| 340 | } | 
|---|
| 341 |  | 
|---|
| 342 | static inline int | 
|---|
| 343 | rdev_update_mesh_config(struct cfg80211_registered_device *rdev, | 
|---|
| 344 | struct net_device *dev, u32 mask, | 
|---|
| 345 | const struct mesh_config *nconf) | 
|---|
| 346 | { | 
|---|
| 347 | int ret; | 
|---|
| 348 | trace_rdev_update_mesh_config(wiphy: &rdev->wiphy, netdev: dev, mask, conf: nconf); | 
|---|
| 349 | ret = rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); | 
|---|
| 350 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 351 | return ret; | 
|---|
| 352 | } | 
|---|
| 353 |  | 
|---|
| 354 | static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, | 
|---|
| 355 | struct net_device *dev, | 
|---|
| 356 | const struct mesh_config *conf, | 
|---|
| 357 | const struct mesh_setup *setup) | 
|---|
| 358 | { | 
|---|
| 359 | int ret; | 
|---|
| 360 | trace_rdev_join_mesh(wiphy: &rdev->wiphy, netdev: dev, conf, setup); | 
|---|
| 361 | ret = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); | 
|---|
| 362 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 363 | return ret; | 
|---|
| 364 | } | 
|---|
| 365 |  | 
|---|
| 366 |  | 
|---|
| 367 | static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev, | 
|---|
| 368 | struct net_device *dev) | 
|---|
| 369 | { | 
|---|
| 370 | int ret; | 
|---|
| 371 | trace_rdev_leave_mesh(wiphy: &rdev->wiphy, netdev: dev); | 
|---|
| 372 | ret = rdev->ops->leave_mesh(&rdev->wiphy, dev); | 
|---|
| 373 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 374 | return ret; | 
|---|
| 375 | } | 
|---|
| 376 |  | 
|---|
| 377 | static inline int rdev_join_ocb(struct cfg80211_registered_device *rdev, | 
|---|
| 378 | struct net_device *dev, | 
|---|
| 379 | struct ocb_setup *setup) | 
|---|
| 380 | { | 
|---|
| 381 | int ret; | 
|---|
| 382 | trace_rdev_join_ocb(wiphy: &rdev->wiphy, netdev: dev, setup); | 
|---|
| 383 | ret = rdev->ops->join_ocb(&rdev->wiphy, dev, setup); | 
|---|
| 384 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 385 | return ret; | 
|---|
| 386 | } | 
|---|
| 387 |  | 
|---|
| 388 | static inline int rdev_leave_ocb(struct cfg80211_registered_device *rdev, | 
|---|
| 389 | struct net_device *dev) | 
|---|
| 390 | { | 
|---|
| 391 | int ret; | 
|---|
| 392 | trace_rdev_leave_ocb(wiphy: &rdev->wiphy, netdev: dev); | 
|---|
| 393 | ret = rdev->ops->leave_ocb(&rdev->wiphy, dev); | 
|---|
| 394 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 395 | return ret; | 
|---|
| 396 | } | 
|---|
| 397 |  | 
|---|
| 398 | static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, | 
|---|
| 399 | struct net_device *dev, | 
|---|
| 400 | struct bss_parameters *params) | 
|---|
| 401 |  | 
|---|
| 402 | { | 
|---|
| 403 | int ret; | 
|---|
| 404 | trace_rdev_change_bss(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 405 | ret = rdev->ops->change_bss(&rdev->wiphy, dev, params); | 
|---|
| 406 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 407 | return ret; | 
|---|
| 408 | } | 
|---|
| 409 |  | 
|---|
| 410 | static inline void rdev_inform_bss(struct cfg80211_registered_device *rdev, | 
|---|
| 411 | struct cfg80211_bss *bss, | 
|---|
| 412 | const struct cfg80211_bss_ies *ies, | 
|---|
| 413 | void *drv_data) | 
|---|
| 414 |  | 
|---|
| 415 | { | 
|---|
| 416 | trace_rdev_inform_bss(wiphy: &rdev->wiphy, bss); | 
|---|
| 417 | if (rdev->ops->inform_bss) | 
|---|
| 418 | rdev->ops->inform_bss(&rdev->wiphy, bss, ies, drv_data); | 
|---|
| 419 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 420 | } | 
|---|
| 421 |  | 
|---|
| 422 | static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, | 
|---|
| 423 | struct net_device *dev, | 
|---|
| 424 | struct ieee80211_txq_params *params) | 
|---|
| 425 |  | 
|---|
| 426 | { | 
|---|
| 427 | int ret; | 
|---|
| 428 | trace_rdev_set_txq_params(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 429 | ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params); | 
|---|
| 430 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 431 | return ret; | 
|---|
| 432 | } | 
|---|
| 433 |  | 
|---|
| 434 | static inline int | 
|---|
| 435 | rdev_libertas_set_mesh_channel(struct cfg80211_registered_device *rdev, | 
|---|
| 436 | struct net_device *dev, | 
|---|
| 437 | struct ieee80211_channel *chan) | 
|---|
| 438 | { | 
|---|
| 439 | int ret; | 
|---|
| 440 | trace_rdev_libertas_set_mesh_channel(wiphy: &rdev->wiphy, netdev: dev, chan); | 
|---|
| 441 | ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); | 
|---|
| 442 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 443 | return ret; | 
|---|
| 444 | } | 
|---|
| 445 |  | 
|---|
| 446 | static inline int | 
|---|
| 447 | rdev_set_monitor_channel(struct cfg80211_registered_device *rdev, | 
|---|
| 448 | struct net_device *dev, | 
|---|
| 449 | struct cfg80211_chan_def *chandef) | 
|---|
| 450 | { | 
|---|
| 451 | int ret; | 
|---|
| 452 | trace_rdev_set_monitor_channel(wiphy: &rdev->wiphy, netdev: dev, chandef); | 
|---|
| 453 | ret = rdev->ops->set_monitor_channel(&rdev->wiphy, dev, chandef); | 
|---|
| 454 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 455 | return ret; | 
|---|
| 456 | } | 
|---|
| 457 |  | 
|---|
| 458 | static inline int rdev_scan(struct cfg80211_registered_device *rdev, | 
|---|
| 459 | struct cfg80211_scan_request_int *request) | 
|---|
| 460 | { | 
|---|
| 461 | int ret; | 
|---|
| 462 |  | 
|---|
| 463 | if (WARN_ON_ONCE(!request->req.n_ssids && request->req.ssids)) | 
|---|
| 464 | return -EINVAL; | 
|---|
| 465 |  | 
|---|
| 466 | trace_rdev_scan(wiphy: &rdev->wiphy, request); | 
|---|
| 467 | ret = rdev->ops->scan(&rdev->wiphy, &request->req); | 
|---|
| 468 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 469 | return ret; | 
|---|
| 470 | } | 
|---|
| 471 |  | 
|---|
| 472 | static inline void rdev_abort_scan(struct cfg80211_registered_device *rdev, | 
|---|
| 473 | struct wireless_dev *wdev) | 
|---|
| 474 | { | 
|---|
| 475 | trace_rdev_abort_scan(wiphy: &rdev->wiphy, wdev); | 
|---|
| 476 | rdev->ops->abort_scan(&rdev->wiphy, wdev); | 
|---|
| 477 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 478 | } | 
|---|
| 479 |  | 
|---|
| 480 | static inline int rdev_auth(struct cfg80211_registered_device *rdev, | 
|---|
| 481 | struct net_device *dev, | 
|---|
| 482 | struct cfg80211_auth_request *req) | 
|---|
| 483 | { | 
|---|
| 484 | int ret; | 
|---|
| 485 | trace_rdev_auth(wiphy: &rdev->wiphy, netdev: dev, req); | 
|---|
| 486 | ret = rdev->ops->auth(&rdev->wiphy, dev, req); | 
|---|
| 487 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 488 | return ret; | 
|---|
| 489 | } | 
|---|
| 490 |  | 
|---|
| 491 | static inline int rdev_assoc(struct cfg80211_registered_device *rdev, | 
|---|
| 492 | struct net_device *dev, | 
|---|
| 493 | struct cfg80211_assoc_request *req) | 
|---|
| 494 | { | 
|---|
| 495 | int ret; | 
|---|
| 496 |  | 
|---|
| 497 | trace_rdev_assoc(wiphy: &rdev->wiphy, netdev: dev, req); | 
|---|
| 498 | ret = rdev->ops->assoc(&rdev->wiphy, dev, req); | 
|---|
| 499 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 500 | return ret; | 
|---|
| 501 | } | 
|---|
| 502 |  | 
|---|
| 503 | static inline int rdev_deauth(struct cfg80211_registered_device *rdev, | 
|---|
| 504 | struct net_device *dev, | 
|---|
| 505 | struct cfg80211_deauth_request *req) | 
|---|
| 506 | { | 
|---|
| 507 | int ret; | 
|---|
| 508 | trace_rdev_deauth(wiphy: &rdev->wiphy, netdev: dev, req); | 
|---|
| 509 | ret = rdev->ops->deauth(&rdev->wiphy, dev, req); | 
|---|
| 510 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 511 | return ret; | 
|---|
| 512 | } | 
|---|
| 513 |  | 
|---|
| 514 | static inline int rdev_disassoc(struct cfg80211_registered_device *rdev, | 
|---|
| 515 | struct net_device *dev, | 
|---|
| 516 | struct cfg80211_disassoc_request *req) | 
|---|
| 517 | { | 
|---|
| 518 | int ret; | 
|---|
| 519 | trace_rdev_disassoc(wiphy: &rdev->wiphy, netdev: dev, req); | 
|---|
| 520 | ret = rdev->ops->disassoc(&rdev->wiphy, dev, req); | 
|---|
| 521 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 522 | return ret; | 
|---|
| 523 | } | 
|---|
| 524 |  | 
|---|
| 525 | static inline int rdev_connect(struct cfg80211_registered_device *rdev, | 
|---|
| 526 | struct net_device *dev, | 
|---|
| 527 | struct cfg80211_connect_params *sme) | 
|---|
| 528 | { | 
|---|
| 529 | int ret; | 
|---|
| 530 | trace_rdev_connect(wiphy: &rdev->wiphy, netdev: dev, sme); | 
|---|
| 531 | ret = rdev->ops->connect(&rdev->wiphy, dev, sme); | 
|---|
| 532 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 533 | return ret; | 
|---|
| 534 | } | 
|---|
| 535 |  | 
|---|
| 536 | static inline int | 
|---|
| 537 | rdev_update_connect_params(struct cfg80211_registered_device *rdev, | 
|---|
| 538 | struct net_device *dev, | 
|---|
| 539 | struct cfg80211_connect_params *sme, u32 changed) | 
|---|
| 540 | { | 
|---|
| 541 | int ret; | 
|---|
| 542 | trace_rdev_update_connect_params(wiphy: &rdev->wiphy, netdev: dev, sme, changed); | 
|---|
| 543 | ret = rdev->ops->update_connect_params(&rdev->wiphy, dev, sme, changed); | 
|---|
| 544 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 545 | return ret; | 
|---|
| 546 | } | 
|---|
| 547 |  | 
|---|
| 548 | static inline int rdev_disconnect(struct cfg80211_registered_device *rdev, | 
|---|
| 549 | struct net_device *dev, u16 reason_code) | 
|---|
| 550 | { | 
|---|
| 551 | int ret; | 
|---|
| 552 | trace_rdev_disconnect(wiphy: &rdev->wiphy, netdev: dev, reason_code); | 
|---|
| 553 | ret = rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); | 
|---|
| 554 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 555 | return ret; | 
|---|
| 556 | } | 
|---|
| 557 |  | 
|---|
| 558 | static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev, | 
|---|
| 559 | struct net_device *dev, | 
|---|
| 560 | struct cfg80211_ibss_params *params) | 
|---|
| 561 | { | 
|---|
| 562 | int ret; | 
|---|
| 563 | trace_rdev_join_ibss(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 564 | ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params); | 
|---|
| 565 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 566 | return ret; | 
|---|
| 567 | } | 
|---|
| 568 |  | 
|---|
| 569 | static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev, | 
|---|
| 570 | struct net_device *dev) | 
|---|
| 571 | { | 
|---|
| 572 | int ret; | 
|---|
| 573 | trace_rdev_leave_ibss(wiphy: &rdev->wiphy, netdev: dev); | 
|---|
| 574 | ret = rdev->ops->leave_ibss(&rdev->wiphy, dev); | 
|---|
| 575 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 576 | return ret; | 
|---|
| 577 | } | 
|---|
| 578 |  | 
|---|
| 579 | static inline int | 
|---|
| 580 | rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, int radio_idx, | 
|---|
| 581 | u32 changed) | 
|---|
| 582 | { | 
|---|
| 583 | int ret = -EOPNOTSUPP; | 
|---|
| 584 |  | 
|---|
| 585 | trace_rdev_set_wiphy_params(wiphy: &rdev->wiphy, radio_idx, changed); | 
|---|
| 586 | if (rdev->ops->set_wiphy_params) | 
|---|
| 587 | ret = rdev->ops->set_wiphy_params(&rdev->wiphy, radio_idx, | 
|---|
| 588 | changed); | 
|---|
| 589 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 590 | return ret; | 
|---|
| 591 | } | 
|---|
| 592 |  | 
|---|
| 593 | static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, | 
|---|
| 594 | struct wireless_dev *wdev, int radio_idx, | 
|---|
| 595 | enum nl80211_tx_power_setting type, | 
|---|
| 596 | int mbm) | 
|---|
| 597 | { | 
|---|
| 598 | int ret; | 
|---|
| 599 | trace_rdev_set_tx_power(wiphy: &rdev->wiphy, wdev, radio_idx, type, mbm); | 
|---|
| 600 | ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, radio_idx, type, | 
|---|
| 601 | mbm); | 
|---|
| 602 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 603 | return ret; | 
|---|
| 604 | } | 
|---|
| 605 |  | 
|---|
| 606 | static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, | 
|---|
| 607 | struct wireless_dev *wdev, int radio_idx, | 
|---|
| 608 | unsigned int link_id, int *dbm) | 
|---|
| 609 | { | 
|---|
| 610 | int ret; | 
|---|
| 611 | trace_rdev_get_tx_power(wiphy: &rdev->wiphy, wdev, radio_idx, link_id); | 
|---|
| 612 | ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, radio_idx, link_id, | 
|---|
| 613 | dbm); | 
|---|
| 614 | trace_rdev_return_int_int(wiphy: &rdev->wiphy, func_ret: ret, func_fill: *dbm); | 
|---|
| 615 | return ret; | 
|---|
| 616 | } | 
|---|
| 617 |  | 
|---|
| 618 | static inline int | 
|---|
| 619 | rdev_set_multicast_to_unicast(struct cfg80211_registered_device *rdev, | 
|---|
| 620 | struct net_device *dev, | 
|---|
| 621 | const bool enabled) | 
|---|
| 622 | { | 
|---|
| 623 | int ret; | 
|---|
| 624 | trace_rdev_set_multicast_to_unicast(wiphy: &rdev->wiphy, netdev: dev, enabled); | 
|---|
| 625 | ret = rdev->ops->set_multicast_to_unicast(&rdev->wiphy, dev, enabled); | 
|---|
| 626 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 627 | return ret; | 
|---|
| 628 | } | 
|---|
| 629 |  | 
|---|
| 630 | static inline int | 
|---|
| 631 | rdev_get_txq_stats(struct cfg80211_registered_device *rdev, | 
|---|
| 632 | struct wireless_dev *wdev, | 
|---|
| 633 | struct cfg80211_txq_stats *txqstats) | 
|---|
| 634 | { | 
|---|
| 635 | int ret; | 
|---|
| 636 | trace_rdev_get_txq_stats(wiphy: &rdev->wiphy, wdev); | 
|---|
| 637 | ret = rdev->ops->get_txq_stats(&rdev->wiphy, wdev, txqstats); | 
|---|
| 638 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 639 | return ret; | 
|---|
| 640 | } | 
|---|
| 641 |  | 
|---|
| 642 | static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) | 
|---|
| 643 | { | 
|---|
| 644 | trace_rdev_rfkill_poll(wiphy: &rdev->wiphy); | 
|---|
| 645 | rdev->ops->rfkill_poll(&rdev->wiphy); | 
|---|
| 646 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 647 | } | 
|---|
| 648 |  | 
|---|
| 649 |  | 
|---|
| 650 | #ifdef CONFIG_NL80211_TESTMODE | 
|---|
| 651 | static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev, | 
|---|
| 652 | struct wireless_dev *wdev, | 
|---|
| 653 | void *data, int len) | 
|---|
| 654 | { | 
|---|
| 655 | int ret; | 
|---|
| 656 | trace_rdev_testmode_cmd(&rdev->wiphy, wdev); | 
|---|
| 657 | ret = rdev->ops->testmode_cmd(&rdev->wiphy, wdev, data, len); | 
|---|
| 658 | trace_rdev_return_int(&rdev->wiphy, ret); | 
|---|
| 659 | return ret; | 
|---|
| 660 | } | 
|---|
| 661 |  | 
|---|
| 662 | static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, | 
|---|
| 663 | struct sk_buff *skb, | 
|---|
| 664 | struct netlink_callback *cb, void *data, | 
|---|
| 665 | int len) | 
|---|
| 666 | { | 
|---|
| 667 | int ret; | 
|---|
| 668 | trace_rdev_testmode_dump(&rdev->wiphy); | 
|---|
| 669 | ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len); | 
|---|
| 670 | trace_rdev_return_int(&rdev->wiphy, ret); | 
|---|
| 671 | return ret; | 
|---|
| 672 | } | 
|---|
| 673 | #endif | 
|---|
| 674 |  | 
|---|
| 675 | static inline int | 
|---|
| 676 | rdev_set_bitrate_mask(struct cfg80211_registered_device *rdev, | 
|---|
| 677 | struct net_device *dev, unsigned int link_id, | 
|---|
| 678 | const u8 *peer, | 
|---|
| 679 | const struct cfg80211_bitrate_mask *mask) | 
|---|
| 680 | { | 
|---|
| 681 | int ret; | 
|---|
| 682 | trace_rdev_set_bitrate_mask(wiphy: &rdev->wiphy, netdev: dev, link_id, peer, mask); | 
|---|
| 683 | ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, link_id, | 
|---|
| 684 | peer, mask); | 
|---|
| 685 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 686 | return ret; | 
|---|
| 687 | } | 
|---|
| 688 |  | 
|---|
| 689 | static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev, | 
|---|
| 690 | struct net_device *netdev, int idx, | 
|---|
| 691 | struct survey_info *info) | 
|---|
| 692 | { | 
|---|
| 693 | int ret; | 
|---|
| 694 | trace_rdev_dump_survey(wiphy: &rdev->wiphy, netdev, idx: idx); | 
|---|
| 695 | ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); | 
|---|
| 696 | if (ret < 0) | 
|---|
| 697 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 698 | else | 
|---|
| 699 | trace_rdev_return_int_survey_info(wiphy: &rdev->wiphy, ret, info); | 
|---|
| 700 | return ret; | 
|---|
| 701 | } | 
|---|
| 702 |  | 
|---|
| 703 | static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev, | 
|---|
| 704 | struct net_device *netdev, | 
|---|
| 705 | struct cfg80211_pmksa *pmksa) | 
|---|
| 706 | { | 
|---|
| 707 | int ret; | 
|---|
| 708 | trace_rdev_set_pmksa(wiphy: &rdev->wiphy, netdev, pmksa); | 
|---|
| 709 | ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); | 
|---|
| 710 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 711 | return ret; | 
|---|
| 712 | } | 
|---|
| 713 |  | 
|---|
| 714 | static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev, | 
|---|
| 715 | struct net_device *netdev, | 
|---|
| 716 | struct cfg80211_pmksa *pmksa) | 
|---|
| 717 | { | 
|---|
| 718 | int ret; | 
|---|
| 719 | trace_rdev_del_pmksa(wiphy: &rdev->wiphy, netdev, pmksa); | 
|---|
| 720 | ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); | 
|---|
| 721 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 722 | return ret; | 
|---|
| 723 | } | 
|---|
| 724 |  | 
|---|
| 725 | static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev, | 
|---|
| 726 | struct net_device *netdev) | 
|---|
| 727 | { | 
|---|
| 728 | int ret; | 
|---|
| 729 | trace_rdev_flush_pmksa(wiphy: &rdev->wiphy, netdev); | 
|---|
| 730 | ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev); | 
|---|
| 731 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 732 | return ret; | 
|---|
| 733 | } | 
|---|
| 734 |  | 
|---|
| 735 | static inline int | 
|---|
| 736 | rdev_remain_on_channel(struct cfg80211_registered_device *rdev, | 
|---|
| 737 | struct wireless_dev *wdev, | 
|---|
| 738 | struct ieee80211_channel *chan, | 
|---|
| 739 | unsigned int duration, u64 *cookie) | 
|---|
| 740 | { | 
|---|
| 741 | int ret; | 
|---|
| 742 | trace_rdev_remain_on_channel(wiphy: &rdev->wiphy, wdev, chan, duration); | 
|---|
| 743 | ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, | 
|---|
| 744 | duration, cookie); | 
|---|
| 745 | trace_rdev_return_int_cookie(wiphy: &rdev->wiphy, ret, cookie: *cookie); | 
|---|
| 746 | return ret; | 
|---|
| 747 | } | 
|---|
| 748 |  | 
|---|
| 749 | static inline int | 
|---|
| 750 | rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, | 
|---|
| 751 | struct wireless_dev *wdev, u64 cookie) | 
|---|
| 752 | { | 
|---|
| 753 | int ret; | 
|---|
| 754 | trace_rdev_cancel_remain_on_channel(wiphy: &rdev->wiphy, wdev, cookie); | 
|---|
| 755 | ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); | 
|---|
| 756 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 757 | return ret; | 
|---|
| 758 | } | 
|---|
| 759 |  | 
|---|
| 760 | static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, | 
|---|
| 761 | struct wireless_dev *wdev, | 
|---|
| 762 | struct cfg80211_mgmt_tx_params *params, | 
|---|
| 763 | u64 *cookie) | 
|---|
| 764 | { | 
|---|
| 765 | int ret; | 
|---|
| 766 | trace_rdev_mgmt_tx(wiphy: &rdev->wiphy, wdev, params); | 
|---|
| 767 | ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie); | 
|---|
| 768 | trace_rdev_return_int_cookie(wiphy: &rdev->wiphy, ret, cookie: *cookie); | 
|---|
| 769 | return ret; | 
|---|
| 770 | } | 
|---|
| 771 |  | 
|---|
| 772 | static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev, | 
|---|
| 773 | struct net_device *dev, | 
|---|
| 774 | const void *buf, size_t len, | 
|---|
| 775 | const u8 *dest, __be16 proto, | 
|---|
| 776 | const bool noencrypt, int link, | 
|---|
| 777 | u64 *cookie) | 
|---|
| 778 | { | 
|---|
| 779 | int ret; | 
|---|
| 780 | trace_rdev_tx_control_port(wiphy: &rdev->wiphy, netdev: dev, buf, len, | 
|---|
| 781 | dest, proto, unencrypted: noencrypt, link_id: link); | 
|---|
| 782 | ret = rdev->ops->tx_control_port(&rdev->wiphy, dev, buf, len, | 
|---|
| 783 | dest, proto, noencrypt, link, cookie); | 
|---|
| 784 | if (cookie) | 
|---|
| 785 | trace_rdev_return_int_cookie(wiphy: &rdev->wiphy, ret, cookie: *cookie); | 
|---|
| 786 | else | 
|---|
| 787 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 788 | return ret; | 
|---|
| 789 | } | 
|---|
| 790 |  | 
|---|
| 791 | static inline int | 
|---|
| 792 | rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, | 
|---|
| 793 | struct wireless_dev *wdev, u64 cookie) | 
|---|
| 794 | { | 
|---|
| 795 | int ret; | 
|---|
| 796 | trace_rdev_mgmt_tx_cancel_wait(wiphy: &rdev->wiphy, wdev, cookie); | 
|---|
| 797 | ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); | 
|---|
| 798 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 799 | return ret; | 
|---|
| 800 | } | 
|---|
| 801 |  | 
|---|
| 802 | static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev, | 
|---|
| 803 | struct net_device *dev, bool enabled, | 
|---|
| 804 | int timeout) | 
|---|
| 805 | { | 
|---|
| 806 | int ret; | 
|---|
| 807 | trace_rdev_set_power_mgmt(wiphy: &rdev->wiphy, netdev: dev, enabled, timeout); | 
|---|
| 808 | ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); | 
|---|
| 809 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 810 | return ret; | 
|---|
| 811 | } | 
|---|
| 812 |  | 
|---|
| 813 | static inline int | 
|---|
| 814 | (struct cfg80211_registered_device *rdev, | 
|---|
| 815 | struct net_device *dev, s32 , u32 ) | 
|---|
| 816 | { | 
|---|
| 817 | int ret; | 
|---|
| 818 | trace_rdev_set_cqm_rssi_config(wiphy: &rdev->wiphy, netdev: dev, rssi_thold, | 
|---|
| 819 | rssi_hyst); | 
|---|
| 820 | ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, | 
|---|
| 821 | rssi_hyst); | 
|---|
| 822 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 823 | return ret; | 
|---|
| 824 | } | 
|---|
| 825 |  | 
|---|
| 826 | static inline int | 
|---|
| 827 | (struct cfg80211_registered_device *rdev, | 
|---|
| 828 | struct net_device *dev, s32 low, s32 high) | 
|---|
| 829 | { | 
|---|
| 830 | int ret; | 
|---|
| 831 | trace_rdev_set_cqm_rssi_range_config(wiphy: &rdev->wiphy, netdev: dev, low, high); | 
|---|
| 832 | ret = rdev->ops->set_cqm_rssi_range_config(&rdev->wiphy, dev, | 
|---|
| 833 | low, high); | 
|---|
| 834 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 835 | return ret; | 
|---|
| 836 | } | 
|---|
| 837 |  | 
|---|
| 838 | static inline int | 
|---|
| 839 | rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev, | 
|---|
| 840 | struct net_device *dev, u32 rate, u32 pkts, u32 intvl) | 
|---|
| 841 | { | 
|---|
| 842 | int ret; | 
|---|
| 843 | trace_rdev_set_cqm_txe_config(wiphy: &rdev->wiphy, netdev: dev, rate, pkts, intvl); | 
|---|
| 844 | ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, | 
|---|
| 845 | intvl); | 
|---|
| 846 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 847 | return ret; | 
|---|
| 848 | } | 
|---|
| 849 |  | 
|---|
| 850 | static inline void | 
|---|
| 851 | rdev_update_mgmt_frame_registrations(struct cfg80211_registered_device *rdev, | 
|---|
| 852 | struct wireless_dev *wdev, | 
|---|
| 853 | struct mgmt_frame_regs *upd) | 
|---|
| 854 | { | 
|---|
| 855 | might_sleep(); | 
|---|
| 856 |  | 
|---|
| 857 | trace_rdev_update_mgmt_frame_registrations(wiphy: &rdev->wiphy, wdev, upd); | 
|---|
| 858 | if (rdev->ops->update_mgmt_frame_registrations) | 
|---|
| 859 | rdev->ops->update_mgmt_frame_registrations(&rdev->wiphy, wdev, | 
|---|
| 860 | upd); | 
|---|
| 861 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 862 | } | 
|---|
| 863 |  | 
|---|
| 864 | static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, | 
|---|
| 865 | int radio_idx, u32 tx_ant, u32 rx_ant) | 
|---|
| 866 | { | 
|---|
| 867 | int ret; | 
|---|
| 868 | trace_rdev_set_antenna(wiphy: &rdev->wiphy, radio_idx, tx: tx_ant, rx: rx_ant); | 
|---|
| 869 | ret = rdev->ops->set_antenna(&rdev->wiphy, -1, tx_ant, rx_ant); | 
|---|
| 870 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 871 | return ret; | 
|---|
| 872 | } | 
|---|
| 873 |  | 
|---|
| 874 | static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, | 
|---|
| 875 | int radio_idx, u32 *tx_ant, u32 *rx_ant) | 
|---|
| 876 | { | 
|---|
| 877 | int ret; | 
|---|
| 878 | trace_rdev_get_antenna(wiphy: &rdev->wiphy, radio_idx); | 
|---|
| 879 | ret = rdev->ops->get_antenna(&rdev->wiphy, radio_idx, tx_ant, rx_ant); | 
|---|
| 880 | if (ret) | 
|---|
| 881 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 882 | else | 
|---|
| 883 | trace_rdev_return_int_tx_rx(wiphy: &rdev->wiphy, ret, tx: *tx_ant, | 
|---|
| 884 | rx: *rx_ant); | 
|---|
| 885 | return ret; | 
|---|
| 886 | } | 
|---|
| 887 |  | 
|---|
| 888 | static inline int | 
|---|
| 889 | rdev_sched_scan_start(struct cfg80211_registered_device *rdev, | 
|---|
| 890 | struct net_device *dev, | 
|---|
| 891 | struct cfg80211_sched_scan_request *request) | 
|---|
| 892 | { | 
|---|
| 893 | int ret; | 
|---|
| 894 | trace_rdev_sched_scan_start(wiphy: &rdev->wiphy, netdev: dev, id: request->reqid); | 
|---|
| 895 | ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); | 
|---|
| 896 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 897 | return ret; | 
|---|
| 898 | } | 
|---|
| 899 |  | 
|---|
| 900 | static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev, | 
|---|
| 901 | struct net_device *dev, u64 reqid) | 
|---|
| 902 | { | 
|---|
| 903 | int ret; | 
|---|
| 904 | trace_rdev_sched_scan_stop(wiphy: &rdev->wiphy, netdev: dev, id: reqid); | 
|---|
| 905 | ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev, reqid); | 
|---|
| 906 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 907 | return ret; | 
|---|
| 908 | } | 
|---|
| 909 |  | 
|---|
| 910 | static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev, | 
|---|
| 911 | struct net_device *dev, | 
|---|
| 912 | struct cfg80211_gtk_rekey_data *data) | 
|---|
| 913 | { | 
|---|
| 914 | int ret; | 
|---|
| 915 | trace_rdev_set_rekey_data(wiphy: &rdev->wiphy, netdev: dev); | 
|---|
| 916 | ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); | 
|---|
| 917 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 918 | return ret; | 
|---|
| 919 | } | 
|---|
| 920 |  | 
|---|
| 921 | static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, | 
|---|
| 922 | struct net_device *dev, u8 *peer, | 
|---|
| 923 | int link_id, u8 action_code, | 
|---|
| 924 | u8 dialog_token, u16 status_code, | 
|---|
| 925 | u32 peer_capability, bool initiator, | 
|---|
| 926 | const u8 *buf, size_t len) | 
|---|
| 927 | { | 
|---|
| 928 | int ret; | 
|---|
| 929 | trace_rdev_tdls_mgmt(wiphy: &rdev->wiphy, netdev: dev, peer, link_id, action_code, | 
|---|
| 930 | dialog_token, status_code, peer_capability, | 
|---|
| 931 | initiator, buf, len); | 
|---|
| 932 | ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, link_id, | 
|---|
| 933 | action_code, dialog_token, status_code, | 
|---|
| 934 | peer_capability, initiator, buf, len); | 
|---|
| 935 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 936 | return ret; | 
|---|
| 937 | } | 
|---|
| 938 |  | 
|---|
| 939 | static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev, | 
|---|
| 940 | struct net_device *dev, u8 *peer, | 
|---|
| 941 | enum nl80211_tdls_operation oper) | 
|---|
| 942 | { | 
|---|
| 943 | int ret; | 
|---|
| 944 | trace_rdev_tdls_oper(wiphy: &rdev->wiphy, netdev: dev, peer, oper); | 
|---|
| 945 | ret = rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); | 
|---|
| 946 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 947 | return ret; | 
|---|
| 948 | } | 
|---|
| 949 |  | 
|---|
| 950 | static inline int rdev_probe_client(struct cfg80211_registered_device *rdev, | 
|---|
| 951 | struct net_device *dev, const u8 *peer, | 
|---|
| 952 | u64 *cookie) | 
|---|
| 953 | { | 
|---|
| 954 | int ret; | 
|---|
| 955 | trace_rdev_probe_client(wiphy: &rdev->wiphy, netdev: dev, peer); | 
|---|
| 956 | ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); | 
|---|
| 957 | trace_rdev_return_int_cookie(wiphy: &rdev->wiphy, ret, cookie: *cookie); | 
|---|
| 958 | return ret; | 
|---|
| 959 | } | 
|---|
| 960 |  | 
|---|
| 961 | static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev, | 
|---|
| 962 | struct net_device *dev, u16 noack_map) | 
|---|
| 963 | { | 
|---|
| 964 | int ret; | 
|---|
| 965 | trace_rdev_set_noack_map(wiphy: &rdev->wiphy, netdev: dev, noack_map); | 
|---|
| 966 | ret = rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); | 
|---|
| 967 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 968 | return ret; | 
|---|
| 969 | } | 
|---|
| 970 |  | 
|---|
| 971 | static inline int | 
|---|
| 972 | rdev_get_channel(struct cfg80211_registered_device *rdev, | 
|---|
| 973 | struct wireless_dev *wdev, | 
|---|
| 974 | unsigned int link_id, | 
|---|
| 975 | struct cfg80211_chan_def *chandef) | 
|---|
| 976 | { | 
|---|
| 977 | int ret; | 
|---|
| 978 |  | 
|---|
| 979 | trace_rdev_get_channel(wiphy: &rdev->wiphy, wdev, link_id); | 
|---|
| 980 | ret = rdev->ops->get_channel(&rdev->wiphy, wdev, link_id, chandef); | 
|---|
| 981 | trace_rdev_return_chandef(wiphy: &rdev->wiphy, ret, chandef); | 
|---|
| 982 |  | 
|---|
| 983 | return ret; | 
|---|
| 984 | } | 
|---|
| 985 |  | 
|---|
| 986 | static inline int rdev_start_p2p_device(struct cfg80211_registered_device *rdev, | 
|---|
| 987 | struct wireless_dev *wdev) | 
|---|
| 988 | { | 
|---|
| 989 | int ret; | 
|---|
| 990 |  | 
|---|
| 991 | trace_rdev_start_p2p_device(wiphy: &rdev->wiphy, wdev); | 
|---|
| 992 | ret = rdev->ops->start_p2p_device(&rdev->wiphy, wdev); | 
|---|
| 993 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 994 | return ret; | 
|---|
| 995 | } | 
|---|
| 996 |  | 
|---|
| 997 | static inline void rdev_stop_p2p_device(struct cfg80211_registered_device *rdev, | 
|---|
| 998 | struct wireless_dev *wdev) | 
|---|
| 999 | { | 
|---|
| 1000 | trace_rdev_stop_p2p_device(wiphy: &rdev->wiphy, wdev); | 
|---|
| 1001 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); | 
|---|
| 1002 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1003 | } | 
|---|
| 1004 |  | 
|---|
| 1005 | static inline int rdev_start_nan(struct cfg80211_registered_device *rdev, | 
|---|
| 1006 | struct wireless_dev *wdev, | 
|---|
| 1007 | struct cfg80211_nan_conf *conf) | 
|---|
| 1008 | { | 
|---|
| 1009 | int ret; | 
|---|
| 1010 |  | 
|---|
| 1011 | trace_rdev_start_nan(wiphy: &rdev->wiphy, wdev, conf); | 
|---|
| 1012 | ret = rdev->ops->start_nan(&rdev->wiphy, wdev, conf); | 
|---|
| 1013 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1014 | return ret; | 
|---|
| 1015 | } | 
|---|
| 1016 |  | 
|---|
| 1017 | static inline void rdev_stop_nan(struct cfg80211_registered_device *rdev, | 
|---|
| 1018 | struct wireless_dev *wdev) | 
|---|
| 1019 | { | 
|---|
| 1020 | trace_rdev_stop_nan(wiphy: &rdev->wiphy, wdev); | 
|---|
| 1021 | rdev->ops->stop_nan(&rdev->wiphy, wdev); | 
|---|
| 1022 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1023 | } | 
|---|
| 1024 |  | 
|---|
| 1025 | static inline int | 
|---|
| 1026 | rdev_add_nan_func(struct cfg80211_registered_device *rdev, | 
|---|
| 1027 | struct wireless_dev *wdev, | 
|---|
| 1028 | struct cfg80211_nan_func *nan_func) | 
|---|
| 1029 | { | 
|---|
| 1030 | int ret; | 
|---|
| 1031 |  | 
|---|
| 1032 | trace_rdev_add_nan_func(wiphy: &rdev->wiphy, wdev, func: nan_func); | 
|---|
| 1033 | ret = rdev->ops->add_nan_func(&rdev->wiphy, wdev, nan_func); | 
|---|
| 1034 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1035 | return ret; | 
|---|
| 1036 | } | 
|---|
| 1037 |  | 
|---|
| 1038 | static inline void rdev_del_nan_func(struct cfg80211_registered_device *rdev, | 
|---|
| 1039 | struct wireless_dev *wdev, u64 cookie) | 
|---|
| 1040 | { | 
|---|
| 1041 | trace_rdev_del_nan_func(wiphy: &rdev->wiphy, wdev, cookie); | 
|---|
| 1042 | rdev->ops->del_nan_func(&rdev->wiphy, wdev, cookie); | 
|---|
| 1043 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1044 | } | 
|---|
| 1045 |  | 
|---|
| 1046 | static inline int | 
|---|
| 1047 | rdev_nan_change_conf(struct cfg80211_registered_device *rdev, | 
|---|
| 1048 | struct wireless_dev *wdev, | 
|---|
| 1049 | struct cfg80211_nan_conf *conf, u32 changes) | 
|---|
| 1050 | { | 
|---|
| 1051 | int ret; | 
|---|
| 1052 |  | 
|---|
| 1053 | trace_rdev_nan_change_conf(wiphy: &rdev->wiphy, wdev, conf, changes); | 
|---|
| 1054 | if (rdev->ops->nan_change_conf) | 
|---|
| 1055 | ret = rdev->ops->nan_change_conf(&rdev->wiphy, wdev, conf, | 
|---|
| 1056 | changes); | 
|---|
| 1057 | else | 
|---|
| 1058 | ret = -EOPNOTSUPP; | 
|---|
| 1059 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1060 | return ret; | 
|---|
| 1061 | } | 
|---|
| 1062 |  | 
|---|
| 1063 | static inline int rdev_set_mac_acl(struct cfg80211_registered_device *rdev, | 
|---|
| 1064 | struct net_device *dev, | 
|---|
| 1065 | struct cfg80211_acl_data *params) | 
|---|
| 1066 | { | 
|---|
| 1067 | int ret; | 
|---|
| 1068 |  | 
|---|
| 1069 | trace_rdev_set_mac_acl(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1070 | ret = rdev->ops->set_mac_acl(&rdev->wiphy, dev, params); | 
|---|
| 1071 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1072 | return ret; | 
|---|
| 1073 | } | 
|---|
| 1074 |  | 
|---|
| 1075 | static inline int rdev_update_ft_ies(struct cfg80211_registered_device *rdev, | 
|---|
| 1076 | struct net_device *dev, | 
|---|
| 1077 | struct cfg80211_update_ft_ies_params *ftie) | 
|---|
| 1078 | { | 
|---|
| 1079 | int ret; | 
|---|
| 1080 |  | 
|---|
| 1081 | trace_rdev_update_ft_ies(wiphy: &rdev->wiphy, netdev: dev, ftie); | 
|---|
| 1082 | ret = rdev->ops->update_ft_ies(&rdev->wiphy, dev, ftie); | 
|---|
| 1083 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1084 | return ret; | 
|---|
| 1085 | } | 
|---|
| 1086 |  | 
|---|
| 1087 | static inline int rdev_crit_proto_start(struct cfg80211_registered_device *rdev, | 
|---|
| 1088 | struct wireless_dev *wdev, | 
|---|
| 1089 | enum nl80211_crit_proto_id protocol, | 
|---|
| 1090 | u16 duration) | 
|---|
| 1091 | { | 
|---|
| 1092 | int ret; | 
|---|
| 1093 |  | 
|---|
| 1094 | trace_rdev_crit_proto_start(wiphy: &rdev->wiphy, wdev, protocol, duration); | 
|---|
| 1095 | ret = rdev->ops->crit_proto_start(&rdev->wiphy, wdev, | 
|---|
| 1096 | protocol, duration); | 
|---|
| 1097 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1098 | return ret; | 
|---|
| 1099 | } | 
|---|
| 1100 |  | 
|---|
| 1101 | static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev, | 
|---|
| 1102 | struct wireless_dev *wdev) | 
|---|
| 1103 | { | 
|---|
| 1104 | trace_rdev_crit_proto_stop(wiphy: &rdev->wiphy, wdev); | 
|---|
| 1105 | rdev->ops->crit_proto_stop(&rdev->wiphy, wdev); | 
|---|
| 1106 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1107 | } | 
|---|
| 1108 |  | 
|---|
| 1109 | static inline int rdev_channel_switch(struct cfg80211_registered_device *rdev, | 
|---|
| 1110 | struct net_device *dev, | 
|---|
| 1111 | struct cfg80211_csa_settings *params) | 
|---|
| 1112 | { | 
|---|
| 1113 | int ret; | 
|---|
| 1114 |  | 
|---|
| 1115 | trace_rdev_channel_switch(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1116 | ret = rdev->ops->channel_switch(&rdev->wiphy, dev, params); | 
|---|
| 1117 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1118 | return ret; | 
|---|
| 1119 | } | 
|---|
| 1120 |  | 
|---|
| 1121 | static inline int rdev_set_qos_map(struct cfg80211_registered_device *rdev, | 
|---|
| 1122 | struct net_device *dev, | 
|---|
| 1123 | struct cfg80211_qos_map *qos_map) | 
|---|
| 1124 | { | 
|---|
| 1125 | int ret = -EOPNOTSUPP; | 
|---|
| 1126 |  | 
|---|
| 1127 | if (rdev->ops->set_qos_map) { | 
|---|
| 1128 | trace_rdev_set_qos_map(wiphy: &rdev->wiphy, netdev: dev, qos_map); | 
|---|
| 1129 | ret = rdev->ops->set_qos_map(&rdev->wiphy, dev, qos_map); | 
|---|
| 1130 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1131 | } | 
|---|
| 1132 |  | 
|---|
| 1133 | return ret; | 
|---|
| 1134 | } | 
|---|
| 1135 |  | 
|---|
| 1136 | static inline int | 
|---|
| 1137 | rdev_set_ap_chanwidth(struct cfg80211_registered_device *rdev, | 
|---|
| 1138 | struct net_device *dev, | 
|---|
| 1139 | unsigned int link_id, | 
|---|
| 1140 | struct cfg80211_chan_def *chandef) | 
|---|
| 1141 | { | 
|---|
| 1142 | int ret; | 
|---|
| 1143 |  | 
|---|
| 1144 | trace_rdev_set_ap_chanwidth(wiphy: &rdev->wiphy, netdev: dev, link_id, chandef); | 
|---|
| 1145 | ret = rdev->ops->set_ap_chanwidth(&rdev->wiphy, dev, link_id, chandef); | 
|---|
| 1146 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1147 |  | 
|---|
| 1148 | return ret; | 
|---|
| 1149 | } | 
|---|
| 1150 |  | 
|---|
| 1151 | static inline int | 
|---|
| 1152 | rdev_add_tx_ts(struct cfg80211_registered_device *rdev, | 
|---|
| 1153 | struct net_device *dev, u8 tsid, const u8 *peer, | 
|---|
| 1154 | u8 user_prio, u16 admitted_time) | 
|---|
| 1155 | { | 
|---|
| 1156 | int ret = -EOPNOTSUPP; | 
|---|
| 1157 |  | 
|---|
| 1158 | trace_rdev_add_tx_ts(wiphy: &rdev->wiphy, netdev: dev, tsid, peer, | 
|---|
| 1159 | user_prio, admitted_time); | 
|---|
| 1160 | if (rdev->ops->add_tx_ts) | 
|---|
| 1161 | ret = rdev->ops->add_tx_ts(&rdev->wiphy, dev, tsid, peer, | 
|---|
| 1162 | user_prio, admitted_time); | 
|---|
| 1163 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1164 |  | 
|---|
| 1165 | return ret; | 
|---|
| 1166 | } | 
|---|
| 1167 |  | 
|---|
| 1168 | static inline int | 
|---|
| 1169 | rdev_del_tx_ts(struct cfg80211_registered_device *rdev, | 
|---|
| 1170 | struct net_device *dev, u8 tsid, const u8 *peer) | 
|---|
| 1171 | { | 
|---|
| 1172 | int ret = -EOPNOTSUPP; | 
|---|
| 1173 |  | 
|---|
| 1174 | trace_rdev_del_tx_ts(wiphy: &rdev->wiphy, netdev: dev, tsid, peer); | 
|---|
| 1175 | if (rdev->ops->del_tx_ts) | 
|---|
| 1176 | ret = rdev->ops->del_tx_ts(&rdev->wiphy, dev, tsid, peer); | 
|---|
| 1177 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1178 |  | 
|---|
| 1179 | return ret; | 
|---|
| 1180 | } | 
|---|
| 1181 |  | 
|---|
| 1182 | static inline int | 
|---|
| 1183 | rdev_tdls_channel_switch(struct cfg80211_registered_device *rdev, | 
|---|
| 1184 | struct net_device *dev, const u8 *addr, | 
|---|
| 1185 | u8 oper_class, struct cfg80211_chan_def *chandef) | 
|---|
| 1186 | { | 
|---|
| 1187 | int ret; | 
|---|
| 1188 |  | 
|---|
| 1189 | trace_rdev_tdls_channel_switch(wiphy: &rdev->wiphy, netdev: dev, addr, oper_class, | 
|---|
| 1190 | chandef); | 
|---|
| 1191 | ret = rdev->ops->tdls_channel_switch(&rdev->wiphy, dev, addr, | 
|---|
| 1192 | oper_class, chandef); | 
|---|
| 1193 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1194 | return ret; | 
|---|
| 1195 | } | 
|---|
| 1196 |  | 
|---|
| 1197 | static inline void | 
|---|
| 1198 | rdev_tdls_cancel_channel_switch(struct cfg80211_registered_device *rdev, | 
|---|
| 1199 | struct net_device *dev, const u8 *addr) | 
|---|
| 1200 | { | 
|---|
| 1201 | trace_rdev_tdls_cancel_channel_switch(wiphy: &rdev->wiphy, netdev: dev, addr); | 
|---|
| 1202 | rdev->ops->tdls_cancel_channel_switch(&rdev->wiphy, dev, addr); | 
|---|
| 1203 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1204 | } | 
|---|
| 1205 |  | 
|---|
| 1206 | static inline int | 
|---|
| 1207 | rdev_start_radar_detection(struct cfg80211_registered_device *rdev, | 
|---|
| 1208 | struct net_device *dev, | 
|---|
| 1209 | struct cfg80211_chan_def *chandef, | 
|---|
| 1210 | u32 cac_time_ms, int link_id) | 
|---|
| 1211 | { | 
|---|
| 1212 | int ret = -EOPNOTSUPP; | 
|---|
| 1213 |  | 
|---|
| 1214 | trace_rdev_start_radar_detection(wiphy: &rdev->wiphy, netdev: dev, chandef, | 
|---|
| 1215 | cac_time_ms, link_id); | 
|---|
| 1216 | if (rdev->ops->start_radar_detection) | 
|---|
| 1217 | ret = rdev->ops->start_radar_detection(&rdev->wiphy, dev, | 
|---|
| 1218 | chandef, cac_time_ms, | 
|---|
| 1219 | link_id); | 
|---|
| 1220 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1221 | return ret; | 
|---|
| 1222 | } | 
|---|
| 1223 |  | 
|---|
| 1224 | static inline void | 
|---|
| 1225 | rdev_end_cac(struct cfg80211_registered_device *rdev, | 
|---|
| 1226 | struct net_device *dev, unsigned int link_id) | 
|---|
| 1227 | { | 
|---|
| 1228 | trace_rdev_end_cac(wiphy: &rdev->wiphy, netdev: dev, link_id); | 
|---|
| 1229 | if (rdev->ops->end_cac) | 
|---|
| 1230 | rdev->ops->end_cac(&rdev->wiphy, dev, link_id); | 
|---|
| 1231 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1232 | } | 
|---|
| 1233 |  | 
|---|
| 1234 | static inline int | 
|---|
| 1235 | rdev_set_mcast_rate(struct cfg80211_registered_device *rdev, | 
|---|
| 1236 | struct net_device *dev, | 
|---|
| 1237 | int mcast_rate[NUM_NL80211_BANDS]) | 
|---|
| 1238 | { | 
|---|
| 1239 | int ret = -EOPNOTSUPP; | 
|---|
| 1240 |  | 
|---|
| 1241 | trace_rdev_set_mcast_rate(wiphy: &rdev->wiphy, netdev: dev, mcast_rate); | 
|---|
| 1242 | if (rdev->ops->set_mcast_rate) | 
|---|
| 1243 | ret = rdev->ops->set_mcast_rate(&rdev->wiphy, dev, mcast_rate); | 
|---|
| 1244 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1245 | return ret; | 
|---|
| 1246 | } | 
|---|
| 1247 |  | 
|---|
| 1248 | static inline int | 
|---|
| 1249 | rdev_set_coalesce(struct cfg80211_registered_device *rdev, | 
|---|
| 1250 | struct cfg80211_coalesce *coalesce) | 
|---|
| 1251 | { | 
|---|
| 1252 | int ret = -EOPNOTSUPP; | 
|---|
| 1253 |  | 
|---|
| 1254 | trace_rdev_set_coalesce(wiphy: &rdev->wiphy, coalesce); | 
|---|
| 1255 | if (rdev->ops->set_coalesce) | 
|---|
| 1256 | ret = rdev->ops->set_coalesce(&rdev->wiphy, coalesce); | 
|---|
| 1257 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1258 | return ret; | 
|---|
| 1259 | } | 
|---|
| 1260 |  | 
|---|
| 1261 | static inline int rdev_set_pmk(struct cfg80211_registered_device *rdev, | 
|---|
| 1262 | struct net_device *dev, | 
|---|
| 1263 | struct cfg80211_pmk_conf *pmk_conf) | 
|---|
| 1264 | { | 
|---|
| 1265 | int ret = -EOPNOTSUPP; | 
|---|
| 1266 |  | 
|---|
| 1267 | trace_rdev_set_pmk(wiphy: &rdev->wiphy, netdev: dev, pmk_conf); | 
|---|
| 1268 | if (rdev->ops->set_pmk) | 
|---|
| 1269 | ret = rdev->ops->set_pmk(&rdev->wiphy, dev, pmk_conf); | 
|---|
| 1270 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1271 | return ret; | 
|---|
| 1272 | } | 
|---|
| 1273 |  | 
|---|
| 1274 | static inline int rdev_del_pmk(struct cfg80211_registered_device *rdev, | 
|---|
| 1275 | struct net_device *dev, const u8 *aa) | 
|---|
| 1276 | { | 
|---|
| 1277 | int ret = -EOPNOTSUPP; | 
|---|
| 1278 |  | 
|---|
| 1279 | trace_rdev_del_pmk(wiphy: &rdev->wiphy, netdev: dev, aa); | 
|---|
| 1280 | if (rdev->ops->del_pmk) | 
|---|
| 1281 | ret = rdev->ops->del_pmk(&rdev->wiphy, dev, aa); | 
|---|
| 1282 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1283 | return ret; | 
|---|
| 1284 | } | 
|---|
| 1285 |  | 
|---|
| 1286 | static inline int | 
|---|
| 1287 | rdev_external_auth(struct cfg80211_registered_device *rdev, | 
|---|
| 1288 | struct net_device *dev, | 
|---|
| 1289 | struct cfg80211_external_auth_params *params) | 
|---|
| 1290 | { | 
|---|
| 1291 | int ret = -EOPNOTSUPP; | 
|---|
| 1292 |  | 
|---|
| 1293 | trace_rdev_external_auth(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1294 | if (rdev->ops->external_auth) | 
|---|
| 1295 | ret = rdev->ops->external_auth(&rdev->wiphy, dev, params); | 
|---|
| 1296 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1297 | return ret; | 
|---|
| 1298 | } | 
|---|
| 1299 |  | 
|---|
| 1300 | static inline int | 
|---|
| 1301 | rdev_get_ftm_responder_stats(struct cfg80211_registered_device *rdev, | 
|---|
| 1302 | struct net_device *dev, | 
|---|
| 1303 | struct cfg80211_ftm_responder_stats *ftm_stats) | 
|---|
| 1304 | { | 
|---|
| 1305 | int ret = -EOPNOTSUPP; | 
|---|
| 1306 |  | 
|---|
| 1307 | trace_rdev_get_ftm_responder_stats(wiphy: &rdev->wiphy, netdev: dev, ftm_stats); | 
|---|
| 1308 | if (rdev->ops->get_ftm_responder_stats) | 
|---|
| 1309 | ret = rdev->ops->get_ftm_responder_stats(&rdev->wiphy, dev, | 
|---|
| 1310 | ftm_stats); | 
|---|
| 1311 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1312 | return ret; | 
|---|
| 1313 | } | 
|---|
| 1314 |  | 
|---|
| 1315 | static inline int | 
|---|
| 1316 | rdev_start_pmsr(struct cfg80211_registered_device *rdev, | 
|---|
| 1317 | struct wireless_dev *wdev, | 
|---|
| 1318 | struct cfg80211_pmsr_request *request) | 
|---|
| 1319 | { | 
|---|
| 1320 | int ret = -EOPNOTSUPP; | 
|---|
| 1321 |  | 
|---|
| 1322 | trace_rdev_start_pmsr(wiphy: &rdev->wiphy, wdev, cookie: request->cookie); | 
|---|
| 1323 | if (rdev->ops->start_pmsr) | 
|---|
| 1324 | ret = rdev->ops->start_pmsr(&rdev->wiphy, wdev, request); | 
|---|
| 1325 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1326 | return ret; | 
|---|
| 1327 | } | 
|---|
| 1328 |  | 
|---|
| 1329 | static inline void | 
|---|
| 1330 | rdev_abort_pmsr(struct cfg80211_registered_device *rdev, | 
|---|
| 1331 | struct wireless_dev *wdev, | 
|---|
| 1332 | struct cfg80211_pmsr_request *request) | 
|---|
| 1333 | { | 
|---|
| 1334 | trace_rdev_abort_pmsr(wiphy: &rdev->wiphy, wdev, cookie: request->cookie); | 
|---|
| 1335 | if (rdev->ops->abort_pmsr) | 
|---|
| 1336 | rdev->ops->abort_pmsr(&rdev->wiphy, wdev, request); | 
|---|
| 1337 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1338 | } | 
|---|
| 1339 |  | 
|---|
| 1340 | static inline int rdev_update_owe_info(struct cfg80211_registered_device *rdev, | 
|---|
| 1341 | struct net_device *dev, | 
|---|
| 1342 | struct cfg80211_update_owe_info *oweinfo) | 
|---|
| 1343 | { | 
|---|
| 1344 | int ret = -EOPNOTSUPP; | 
|---|
| 1345 |  | 
|---|
| 1346 | trace_rdev_update_owe_info(wiphy: &rdev->wiphy, netdev: dev, owe_info: oweinfo); | 
|---|
| 1347 | if (rdev->ops->update_owe_info) | 
|---|
| 1348 | ret = rdev->ops->update_owe_info(&rdev->wiphy, dev, oweinfo); | 
|---|
| 1349 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1350 | return ret; | 
|---|
| 1351 | } | 
|---|
| 1352 |  | 
|---|
| 1353 | static inline int | 
|---|
| 1354 | rdev_probe_mesh_link(struct cfg80211_registered_device *rdev, | 
|---|
| 1355 | struct net_device *dev, const u8 *dest, | 
|---|
| 1356 | const void *buf, size_t len) | 
|---|
| 1357 | { | 
|---|
| 1358 | int ret; | 
|---|
| 1359 |  | 
|---|
| 1360 | trace_rdev_probe_mesh_link(wiphy: &rdev->wiphy, netdev: dev, dest, buf, len); | 
|---|
| 1361 | ret = rdev->ops->probe_mesh_link(&rdev->wiphy, dev, buf, len); | 
|---|
| 1362 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1363 | return ret; | 
|---|
| 1364 | } | 
|---|
| 1365 |  | 
|---|
| 1366 | static inline int rdev_set_tid_config(struct cfg80211_registered_device *rdev, | 
|---|
| 1367 | struct net_device *dev, | 
|---|
| 1368 | struct cfg80211_tid_config *tid_conf) | 
|---|
| 1369 | { | 
|---|
| 1370 | int ret; | 
|---|
| 1371 |  | 
|---|
| 1372 | trace_rdev_set_tid_config(wiphy: &rdev->wiphy, netdev: dev, tid_conf); | 
|---|
| 1373 | ret = rdev->ops->set_tid_config(&rdev->wiphy, dev, tid_conf); | 
|---|
| 1374 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1375 | return ret; | 
|---|
| 1376 | } | 
|---|
| 1377 |  | 
|---|
| 1378 | static inline int rdev_reset_tid_config(struct cfg80211_registered_device *rdev, | 
|---|
| 1379 | struct net_device *dev, const u8 *peer, | 
|---|
| 1380 | u8 tids) | 
|---|
| 1381 | { | 
|---|
| 1382 | int ret; | 
|---|
| 1383 |  | 
|---|
| 1384 | trace_rdev_reset_tid_config(wiphy: &rdev->wiphy, netdev: dev, peer, tids); | 
|---|
| 1385 | ret = rdev->ops->reset_tid_config(&rdev->wiphy, dev, peer, tids); | 
|---|
| 1386 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1387 | return ret; | 
|---|
| 1388 | } | 
|---|
| 1389 |  | 
|---|
| 1390 | static inline int rdev_set_sar_specs(struct cfg80211_registered_device *rdev, | 
|---|
| 1391 | struct cfg80211_sar_specs *sar) | 
|---|
| 1392 | { | 
|---|
| 1393 | int ret; | 
|---|
| 1394 |  | 
|---|
| 1395 | trace_rdev_set_sar_specs(wiphy: &rdev->wiphy, sar); | 
|---|
| 1396 | ret = rdev->ops->set_sar_specs(&rdev->wiphy, sar); | 
|---|
| 1397 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1398 |  | 
|---|
| 1399 | return ret; | 
|---|
| 1400 | } | 
|---|
| 1401 |  | 
|---|
| 1402 | static inline int rdev_color_change(struct cfg80211_registered_device *rdev, | 
|---|
| 1403 | struct net_device *dev, | 
|---|
| 1404 | struct cfg80211_color_change_settings *params) | 
|---|
| 1405 | { | 
|---|
| 1406 | int ret; | 
|---|
| 1407 |  | 
|---|
| 1408 | trace_rdev_color_change(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1409 | ret = rdev->ops->color_change(&rdev->wiphy, dev, params); | 
|---|
| 1410 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1411 |  | 
|---|
| 1412 | return ret; | 
|---|
| 1413 | } | 
|---|
| 1414 |  | 
|---|
| 1415 | static inline int | 
|---|
| 1416 | rdev_set_fils_aad(struct cfg80211_registered_device *rdev, | 
|---|
| 1417 | struct net_device *dev, struct cfg80211_fils_aad *fils_aad) | 
|---|
| 1418 | { | 
|---|
| 1419 | int ret = -EOPNOTSUPP; | 
|---|
| 1420 |  | 
|---|
| 1421 | trace_rdev_set_fils_aad(wiphy: &rdev->wiphy, netdev: dev, fils_aad); | 
|---|
| 1422 | if (rdev->ops->set_fils_aad) | 
|---|
| 1423 | ret = rdev->ops->set_fils_aad(&rdev->wiphy, dev, fils_aad); | 
|---|
| 1424 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1425 |  | 
|---|
| 1426 | return ret; | 
|---|
| 1427 | } | 
|---|
| 1428 |  | 
|---|
| 1429 | static inline int | 
|---|
| 1430 | rdev_set_radar_background(struct cfg80211_registered_device *rdev, | 
|---|
| 1431 | struct cfg80211_chan_def *chandef) | 
|---|
| 1432 | { | 
|---|
| 1433 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1434 | int ret = -EOPNOTSUPP; | 
|---|
| 1435 |  | 
|---|
| 1436 | trace_rdev_set_radar_background(wiphy, chandef); | 
|---|
| 1437 | if (rdev->ops->set_radar_background) | 
|---|
| 1438 | ret = rdev->ops->set_radar_background(wiphy, chandef); | 
|---|
| 1439 | trace_rdev_return_int(wiphy, ret); | 
|---|
| 1440 |  | 
|---|
| 1441 | return ret; | 
|---|
| 1442 | } | 
|---|
| 1443 |  | 
|---|
| 1444 | static inline int | 
|---|
| 1445 | rdev_add_intf_link(struct cfg80211_registered_device *rdev, | 
|---|
| 1446 | struct wireless_dev *wdev, | 
|---|
| 1447 | unsigned int link_id) | 
|---|
| 1448 | { | 
|---|
| 1449 | int ret = 0; | 
|---|
| 1450 |  | 
|---|
| 1451 | trace_rdev_add_intf_link(wiphy: &rdev->wiphy, wdev, link_id); | 
|---|
| 1452 | if (rdev->ops->add_intf_link) | 
|---|
| 1453 | ret = rdev->ops->add_intf_link(&rdev->wiphy, wdev, link_id); | 
|---|
| 1454 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1455 |  | 
|---|
| 1456 | return ret; | 
|---|
| 1457 | } | 
|---|
| 1458 |  | 
|---|
| 1459 | static inline void | 
|---|
| 1460 | rdev_del_intf_link(struct cfg80211_registered_device *rdev, | 
|---|
| 1461 | struct wireless_dev *wdev, | 
|---|
| 1462 | unsigned int link_id) | 
|---|
| 1463 | { | 
|---|
| 1464 | trace_rdev_del_intf_link(wiphy: &rdev->wiphy, wdev, link_id); | 
|---|
| 1465 | if (rdev->ops->del_intf_link) | 
|---|
| 1466 | rdev->ops->del_intf_link(&rdev->wiphy, wdev, link_id); | 
|---|
| 1467 | trace_rdev_return_void(wiphy: &rdev->wiphy); | 
|---|
| 1468 | } | 
|---|
| 1469 |  | 
|---|
| 1470 | static inline int | 
|---|
| 1471 | rdev_add_link_station(struct cfg80211_registered_device *rdev, | 
|---|
| 1472 | struct net_device *dev, | 
|---|
| 1473 | struct link_station_parameters *params) | 
|---|
| 1474 | { | 
|---|
| 1475 | int ret = -EOPNOTSUPP; | 
|---|
| 1476 |  | 
|---|
| 1477 | trace_rdev_add_link_station(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1478 | if (rdev->ops->add_link_station) | 
|---|
| 1479 | ret = rdev->ops->add_link_station(&rdev->wiphy, dev, params); | 
|---|
| 1480 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1481 | return ret; | 
|---|
| 1482 | } | 
|---|
| 1483 |  | 
|---|
| 1484 | static inline int | 
|---|
| 1485 | rdev_mod_link_station(struct cfg80211_registered_device *rdev, | 
|---|
| 1486 | struct net_device *dev, | 
|---|
| 1487 | struct link_station_parameters *params) | 
|---|
| 1488 | { | 
|---|
| 1489 | int ret = -EOPNOTSUPP; | 
|---|
| 1490 |  | 
|---|
| 1491 | trace_rdev_mod_link_station(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1492 | if (rdev->ops->mod_link_station) | 
|---|
| 1493 | ret = rdev->ops->mod_link_station(&rdev->wiphy, dev, params); | 
|---|
| 1494 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1495 | return ret; | 
|---|
| 1496 | } | 
|---|
| 1497 |  | 
|---|
| 1498 | static inline int | 
|---|
| 1499 | rdev_del_link_station(struct cfg80211_registered_device *rdev, | 
|---|
| 1500 | struct net_device *dev, | 
|---|
| 1501 | struct link_station_del_parameters *params) | 
|---|
| 1502 | { | 
|---|
| 1503 | int ret = -EOPNOTSUPP; | 
|---|
| 1504 |  | 
|---|
| 1505 | trace_rdev_del_link_station(wiphy: &rdev->wiphy, netdev: dev, params); | 
|---|
| 1506 | if (rdev->ops->del_link_station) | 
|---|
| 1507 | ret = rdev->ops->del_link_station(&rdev->wiphy, dev, params); | 
|---|
| 1508 | trace_rdev_return_int(wiphy: &rdev->wiphy, ret); | 
|---|
| 1509 | return ret; | 
|---|
| 1510 | } | 
|---|
| 1511 |  | 
|---|
| 1512 | static inline int | 
|---|
| 1513 | rdev_set_hw_timestamp(struct cfg80211_registered_device *rdev, | 
|---|
| 1514 | struct net_device *dev, | 
|---|
| 1515 | struct cfg80211_set_hw_timestamp *hwts) | 
|---|
| 1516 | { | 
|---|
| 1517 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1518 | int ret = -EOPNOTSUPP; | 
|---|
| 1519 |  | 
|---|
| 1520 | trace_rdev_set_hw_timestamp(wiphy, netdev: dev, hwts); | 
|---|
| 1521 | if (rdev->ops->set_hw_timestamp) | 
|---|
| 1522 | ret = rdev->ops->set_hw_timestamp(wiphy, dev, hwts); | 
|---|
| 1523 | trace_rdev_return_int(wiphy, ret); | 
|---|
| 1524 |  | 
|---|
| 1525 | return ret; | 
|---|
| 1526 | } | 
|---|
| 1527 |  | 
|---|
| 1528 | static inline int | 
|---|
| 1529 | rdev_set_ttlm(struct cfg80211_registered_device *rdev, | 
|---|
| 1530 | struct net_device *dev, | 
|---|
| 1531 | struct cfg80211_ttlm_params *params) | 
|---|
| 1532 | { | 
|---|
| 1533 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1534 | int ret = -EOPNOTSUPP; | 
|---|
| 1535 |  | 
|---|
| 1536 | trace_rdev_set_ttlm(wiphy, netdev: dev, params); | 
|---|
| 1537 | if (rdev->ops->set_ttlm) | 
|---|
| 1538 | ret = rdev->ops->set_ttlm(wiphy, dev, params); | 
|---|
| 1539 | trace_rdev_return_int(wiphy, ret); | 
|---|
| 1540 |  | 
|---|
| 1541 | return ret; | 
|---|
| 1542 | } | 
|---|
| 1543 |  | 
|---|
| 1544 | static inline u32 | 
|---|
| 1545 | rdev_get_radio_mask(struct cfg80211_registered_device *rdev, | 
|---|
| 1546 | struct net_device *dev) | 
|---|
| 1547 | { | 
|---|
| 1548 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1549 |  | 
|---|
| 1550 | if (!rdev->ops->get_radio_mask) | 
|---|
| 1551 | return 0; | 
|---|
| 1552 |  | 
|---|
| 1553 | return rdev->ops->get_radio_mask(wiphy, dev); | 
|---|
| 1554 | } | 
|---|
| 1555 |  | 
|---|
| 1556 | static inline int | 
|---|
| 1557 | rdev_assoc_ml_reconf(struct cfg80211_registered_device *rdev, | 
|---|
| 1558 | struct net_device *dev, | 
|---|
| 1559 | struct cfg80211_ml_reconf_req *req) | 
|---|
| 1560 | { | 
|---|
| 1561 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1562 | int ret = -EOPNOTSUPP; | 
|---|
| 1563 |  | 
|---|
| 1564 | trace_rdev_assoc_ml_reconf(wiphy, netdev: dev, req); | 
|---|
| 1565 | if (rdev->ops->assoc_ml_reconf) | 
|---|
| 1566 | ret = rdev->ops->assoc_ml_reconf(wiphy, dev, req); | 
|---|
| 1567 | trace_rdev_return_int(wiphy, ret); | 
|---|
| 1568 |  | 
|---|
| 1569 | return ret; | 
|---|
| 1570 | } | 
|---|
| 1571 |  | 
|---|
| 1572 | static inline int | 
|---|
| 1573 | rdev_set_epcs(struct cfg80211_registered_device *rdev, | 
|---|
| 1574 | struct net_device *dev, bool val) | 
|---|
| 1575 | { | 
|---|
| 1576 | struct wiphy *wiphy = &rdev->wiphy; | 
|---|
| 1577 | int ret = -EOPNOTSUPP; | 
|---|
| 1578 |  | 
|---|
| 1579 | trace_rdev_set_epcs(wiphy, netdev: dev, val); | 
|---|
| 1580 | if (rdev->ops->set_epcs) | 
|---|
| 1581 | ret = rdev->ops->set_epcs(wiphy, dev, val); | 
|---|
| 1582 | trace_rdev_return_int(wiphy, ret); | 
|---|
| 1583 |  | 
|---|
| 1584 | return ret; | 
|---|
| 1585 | } | 
|---|
| 1586 |  | 
|---|
| 1587 | #endif /* __CFG80211_RDEV_OPS */ | 
|---|
| 1588 |  | 
|---|