Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 1 | #ifndef __CFG80211_RDEV_OPS |
| 2 | #define __CFG80211_RDEV_OPS |
| 3 | |
| 4 | #include <linux/rtnetlink.h> |
| 5 | #include <net/cfg80211.h> |
| 6 | #include "core.h" |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 7 | #include "trace.h" |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 8 | |
Stanislaw Gruszka | 8125696 | 2013-02-28 10:55:25 +0100 | [diff] [blame] | 9 | static inline int rdev_suspend(struct cfg80211_registered_device *rdev, |
| 10 | struct cfg80211_wowlan *wowlan) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 11 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 12 | int ret; |
Stanislaw Gruszka | 8125696 | 2013-02-28 10:55:25 +0100 | [diff] [blame] | 13 | trace_rdev_suspend(&rdev->wiphy, wowlan); |
| 14 | ret = rdev->ops->suspend(&rdev->wiphy, wowlan); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 15 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 16 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | static inline int rdev_resume(struct cfg80211_registered_device *rdev) |
| 20 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 21 | int ret; |
| 22 | trace_rdev_resume(&rdev->wiphy); |
| 23 | ret = rdev->ops->resume(&rdev->wiphy); |
| 24 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 25 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev, |
| 29 | bool enabled) |
| 30 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 31 | trace_rdev_set_wakeup(&rdev->wiphy, enabled); |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 32 | rdev->ops->set_wakeup(&rdev->wiphy, enabled); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 33 | trace_rdev_return_void(&rdev->wiphy); |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | static inline struct wireless_dev |
| 37 | *rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name, |
Tom Gundersen | 6bab2e19 | 2015-03-18 11:13:39 +0100 | [diff] [blame] | 38 | unsigned char name_assign_type, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 39 | enum nl80211_iftype type, u32 *flags, |
| 40 | struct vif_params *params) |
| 41 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 42 | struct wireless_dev *ret; |
| 43 | trace_rdev_add_virtual_intf(&rdev->wiphy, name, type); |
Tom Gundersen | 6bab2e19 | 2015-03-18 11:13:39 +0100 | [diff] [blame] | 44 | ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, name_assign_type, |
| 45 | type, flags, params); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 46 | trace_rdev_return_wdev(&rdev->wiphy, ret); |
| 47 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | static inline int |
| 51 | rdev_del_virtual_intf(struct cfg80211_registered_device *rdev, |
| 52 | struct wireless_dev *wdev) |
| 53 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 54 | int ret; |
| 55 | trace_rdev_del_virtual_intf(&rdev->wiphy, wdev); |
| 56 | ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); |
| 57 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 58 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | static inline int |
| 62 | rdev_change_virtual_intf(struct cfg80211_registered_device *rdev, |
| 63 | struct net_device *dev, enum nl80211_iftype type, |
| 64 | u32 *flags, struct vif_params *params) |
| 65 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 66 | int ret; |
| 67 | trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type); |
| 68 | ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, |
| 69 | params); |
| 70 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 71 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | static inline int rdev_add_key(struct cfg80211_registered_device *rdev, |
| 75 | struct net_device *netdev, u8 key_index, |
| 76 | bool pairwise, const u8 *mac_addr, |
| 77 | struct key_params *params) |
| 78 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 79 | int ret; |
| 80 | trace_rdev_add_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); |
| 81 | ret = rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 82 | mac_addr, params); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 83 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 84 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | static inline int |
| 88 | rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, |
| 89 | u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, |
| 90 | void (*callback)(void *cookie, struct key_params*)) |
| 91 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 92 | int ret; |
| 93 | trace_rdev_get_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); |
| 94 | ret = rdev->ops->get_key(&rdev->wiphy, netdev, key_index, pairwise, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 95 | mac_addr, cookie, callback); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 96 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 97 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | static inline int rdev_del_key(struct cfg80211_registered_device *rdev, |
| 101 | struct net_device *netdev, u8 key_index, |
| 102 | bool pairwise, const u8 *mac_addr) |
| 103 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 104 | int ret; |
| 105 | trace_rdev_del_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); |
| 106 | ret = rdev->ops->del_key(&rdev->wiphy, netdev, key_index, pairwise, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 107 | mac_addr); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 108 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 109 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | static inline int |
| 113 | rdev_set_default_key(struct cfg80211_registered_device *rdev, |
| 114 | struct net_device *netdev, u8 key_index, bool unicast, |
| 115 | bool multicast) |
| 116 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 117 | int ret; |
| 118 | trace_rdev_set_default_key(&rdev->wiphy, netdev, key_index, |
| 119 | unicast, multicast); |
| 120 | ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 121 | unicast, multicast); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 122 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 123 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | static inline int |
| 127 | rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev, |
| 128 | struct net_device *netdev, u8 key_index) |
| 129 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 130 | int ret; |
| 131 | trace_rdev_set_default_mgmt_key(&rdev->wiphy, netdev, key_index); |
| 132 | ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 133 | key_index); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 134 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 135 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, |
| 139 | struct net_device *dev, |
| 140 | struct cfg80211_ap_settings *settings) |
| 141 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 142 | int ret; |
| 143 | trace_rdev_start_ap(&rdev->wiphy, dev, settings); |
| 144 | ret = rdev->ops->start_ap(&rdev->wiphy, dev, settings); |
| 145 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 146 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, |
| 150 | struct net_device *dev, |
| 151 | struct cfg80211_beacon_data *info) |
| 152 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 153 | int ret; |
| 154 | trace_rdev_change_beacon(&rdev->wiphy, dev, info); |
| 155 | ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info); |
| 156 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 157 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev, |
| 161 | struct net_device *dev) |
| 162 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 163 | int ret; |
| 164 | trace_rdev_stop_ap(&rdev->wiphy, dev); |
| 165 | ret = rdev->ops->stop_ap(&rdev->wiphy, dev); |
| 166 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 167 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | static inline int rdev_add_station(struct cfg80211_registered_device *rdev, |
| 171 | struct net_device *dev, u8 *mac, |
| 172 | struct station_parameters *params) |
| 173 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 174 | int ret; |
| 175 | trace_rdev_add_station(&rdev->wiphy, dev, mac, params); |
| 176 | ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params); |
| 177 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 178 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 179 | } |
| 180 | |
| 181 | static inline int rdev_del_station(struct cfg80211_registered_device *rdev, |
Jouni Malinen | 89c771e | 2014-10-10 20:52:40 +0300 | [diff] [blame] | 182 | struct net_device *dev, |
| 183 | struct station_del_parameters *params) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 184 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 185 | int ret; |
Jouni Malinen | 89c771e | 2014-10-10 20:52:40 +0300 | [diff] [blame] | 186 | trace_rdev_del_station(&rdev->wiphy, dev, params); |
| 187 | ret = rdev->ops->del_station(&rdev->wiphy, dev, params); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 188 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 189 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 190 | } |
| 191 | |
| 192 | static inline int rdev_change_station(struct cfg80211_registered_device *rdev, |
| 193 | struct net_device *dev, u8 *mac, |
| 194 | struct station_parameters *params) |
| 195 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 196 | int ret; |
| 197 | trace_rdev_change_station(&rdev->wiphy, dev, mac, params); |
| 198 | ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params); |
| 199 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 200 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | static inline int rdev_get_station(struct cfg80211_registered_device *rdev, |
Antonio Quartulli | 7406353 | 2014-05-19 21:53:21 +0200 | [diff] [blame] | 204 | struct net_device *dev, const u8 *mac, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 205 | struct station_info *sinfo) |
| 206 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 207 | int ret; |
| 208 | trace_rdev_get_station(&rdev->wiphy, dev, mac); |
| 209 | ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); |
| 210 | trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); |
| 211 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | static inline int rdev_dump_station(struct cfg80211_registered_device *rdev, |
| 215 | struct net_device *dev, int idx, u8 *mac, |
| 216 | struct station_info *sinfo) |
| 217 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 218 | int ret; |
| 219 | trace_rdev_dump_station(&rdev->wiphy, dev, idx, mac); |
| 220 | ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); |
| 221 | trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); |
| 222 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev, |
| 226 | struct net_device *dev, u8 *dst, u8 *next_hop) |
| 227 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 228 | int ret; |
| 229 | trace_rdev_add_mpath(&rdev->wiphy, dev, dst, next_hop); |
| 230 | ret = rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); |
| 231 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 232 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev, |
| 236 | struct net_device *dev, u8 *dst) |
| 237 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 238 | int ret; |
| 239 | trace_rdev_del_mpath(&rdev->wiphy, dev, dst); |
| 240 | ret = rdev->ops->del_mpath(&rdev->wiphy, dev, dst); |
| 241 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 242 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev, |
| 246 | struct net_device *dev, u8 *dst, |
| 247 | u8 *next_hop) |
| 248 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 249 | int ret; |
| 250 | trace_rdev_change_mpath(&rdev->wiphy, dev, dst, next_hop); |
| 251 | ret = rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); |
| 252 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 253 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev, |
| 257 | struct net_device *dev, u8 *dst, u8 *next_hop, |
| 258 | struct mpath_info *pinfo) |
| 259 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 260 | int ret; |
| 261 | trace_rdev_get_mpath(&rdev->wiphy, dev, dst, next_hop); |
| 262 | ret = rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); |
| 263 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); |
| 264 | return ret; |
| 265 | |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 266 | } |
| 267 | |
Henning Rogge | 66be7d2 | 2014-09-12 08:58:49 +0200 | [diff] [blame] | 268 | static inline int rdev_get_mpp(struct cfg80211_registered_device *rdev, |
| 269 | struct net_device *dev, u8 *dst, u8 *mpp, |
| 270 | struct mpath_info *pinfo) |
| 271 | { |
| 272 | int ret; |
| 273 | |
| 274 | trace_rdev_get_mpp(&rdev->wiphy, dev, dst, mpp); |
| 275 | ret = rdev->ops->get_mpp(&rdev->wiphy, dev, dst, mpp, pinfo); |
| 276 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); |
| 277 | return ret; |
| 278 | } |
| 279 | |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 280 | static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, |
| 281 | struct net_device *dev, int idx, u8 *dst, |
| 282 | u8 *next_hop, struct mpath_info *pinfo) |
| 283 | |
| 284 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 285 | int ret; |
| 286 | trace_rdev_dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop); |
| 287 | ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, |
Henning Rogge | 66be7d2 | 2014-09-12 08:58:49 +0200 | [diff] [blame] | 288 | pinfo); |
| 289 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); |
| 290 | return ret; |
| 291 | } |
| 292 | |
| 293 | static inline int rdev_dump_mpp(struct cfg80211_registered_device *rdev, |
| 294 | struct net_device *dev, int idx, u8 *dst, |
| 295 | u8 *mpp, struct mpath_info *pinfo) |
| 296 | |
| 297 | { |
| 298 | int ret; |
| 299 | |
| 300 | trace_rdev_dump_mpp(&rdev->wiphy, dev, idx, dst, mpp); |
| 301 | ret = rdev->ops->dump_mpp(&rdev->wiphy, dev, idx, dst, mpp, pinfo); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 302 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); |
| 303 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 304 | } |
| 305 | |
| 306 | static inline int |
| 307 | rdev_get_mesh_config(struct cfg80211_registered_device *rdev, |
| 308 | struct net_device *dev, struct mesh_config *conf) |
| 309 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 310 | int ret; |
| 311 | trace_rdev_get_mesh_config(&rdev->wiphy, dev); |
| 312 | ret = rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); |
| 313 | trace_rdev_return_int_mesh_config(&rdev->wiphy, ret, conf); |
| 314 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 315 | } |
| 316 | |
| 317 | static inline int |
| 318 | rdev_update_mesh_config(struct cfg80211_registered_device *rdev, |
| 319 | struct net_device *dev, u32 mask, |
| 320 | const struct mesh_config *nconf) |
| 321 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 322 | int ret; |
| 323 | trace_rdev_update_mesh_config(&rdev->wiphy, dev, mask, nconf); |
| 324 | ret = rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); |
| 325 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 326 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 327 | } |
| 328 | |
| 329 | static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, |
| 330 | struct net_device *dev, |
| 331 | const struct mesh_config *conf, |
| 332 | const struct mesh_setup *setup) |
| 333 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 334 | int ret; |
| 335 | trace_rdev_join_mesh(&rdev->wiphy, dev, conf, setup); |
| 336 | ret = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); |
| 337 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 338 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 339 | } |
| 340 | |
| 341 | |
| 342 | static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev, |
| 343 | struct net_device *dev) |
| 344 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 345 | int ret; |
| 346 | trace_rdev_leave_mesh(&rdev->wiphy, dev); |
| 347 | ret = rdev->ops->leave_mesh(&rdev->wiphy, dev); |
| 348 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 349 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 350 | } |
| 351 | |
Rostislav Lisovy | 6e0bd6c | 2014-11-03 10:33:18 +0100 | [diff] [blame] | 352 | static inline int rdev_join_ocb(struct cfg80211_registered_device *rdev, |
| 353 | struct net_device *dev, |
| 354 | struct ocb_setup *setup) |
| 355 | { |
| 356 | int ret; |
| 357 | trace_rdev_join_ocb(&rdev->wiphy, dev, setup); |
| 358 | ret = rdev->ops->join_ocb(&rdev->wiphy, dev, setup); |
| 359 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 360 | return ret; |
| 361 | } |
| 362 | |
| 363 | static inline int rdev_leave_ocb(struct cfg80211_registered_device *rdev, |
| 364 | struct net_device *dev) |
| 365 | { |
| 366 | int ret; |
| 367 | trace_rdev_leave_ocb(&rdev->wiphy, dev); |
| 368 | ret = rdev->ops->leave_ocb(&rdev->wiphy, dev); |
| 369 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 370 | return ret; |
| 371 | } |
| 372 | |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 373 | static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, |
| 374 | struct net_device *dev, |
| 375 | struct bss_parameters *params) |
| 376 | |
| 377 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 378 | int ret; |
| 379 | trace_rdev_change_bss(&rdev->wiphy, dev, params); |
| 380 | ret = rdev->ops->change_bss(&rdev->wiphy, dev, params); |
| 381 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 382 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 383 | } |
| 384 | |
| 385 | static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, |
| 386 | struct net_device *dev, |
| 387 | struct ieee80211_txq_params *params) |
| 388 | |
| 389 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 390 | int ret; |
| 391 | trace_rdev_set_txq_params(&rdev->wiphy, dev, params); |
| 392 | ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params); |
| 393 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 394 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 395 | } |
| 396 | |
| 397 | static inline int |
| 398 | rdev_libertas_set_mesh_channel(struct cfg80211_registered_device *rdev, |
| 399 | struct net_device *dev, |
| 400 | struct ieee80211_channel *chan) |
| 401 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 402 | int ret; |
| 403 | trace_rdev_libertas_set_mesh_channel(&rdev->wiphy, dev, chan); |
| 404 | ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); |
| 405 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 406 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 407 | } |
| 408 | |
| 409 | static inline int |
| 410 | rdev_set_monitor_channel(struct cfg80211_registered_device *rdev, |
Johannes Berg | 683b6d3 | 2012-11-08 21:25:48 +0100 | [diff] [blame] | 411 | struct cfg80211_chan_def *chandef) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 412 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 413 | int ret; |
Johannes Berg | 683b6d3 | 2012-11-08 21:25:48 +0100 | [diff] [blame] | 414 | trace_rdev_set_monitor_channel(&rdev->wiphy, chandef); |
| 415 | ret = rdev->ops->set_monitor_channel(&rdev->wiphy, chandef); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 416 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 417 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 418 | } |
| 419 | |
| 420 | static inline int rdev_scan(struct cfg80211_registered_device *rdev, |
| 421 | struct cfg80211_scan_request *request) |
| 422 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 423 | int ret; |
| 424 | trace_rdev_scan(&rdev->wiphy, request); |
| 425 | ret = rdev->ops->scan(&rdev->wiphy, request); |
| 426 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 427 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 428 | } |
| 429 | |
| 430 | static inline int rdev_auth(struct cfg80211_registered_device *rdev, |
| 431 | struct net_device *dev, |
| 432 | struct cfg80211_auth_request *req) |
| 433 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 434 | int ret; |
| 435 | trace_rdev_auth(&rdev->wiphy, dev, req); |
| 436 | ret = rdev->ops->auth(&rdev->wiphy, dev, req); |
| 437 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 438 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 439 | } |
| 440 | |
| 441 | static inline int rdev_assoc(struct cfg80211_registered_device *rdev, |
| 442 | struct net_device *dev, |
| 443 | struct cfg80211_assoc_request *req) |
| 444 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 445 | int ret; |
| 446 | trace_rdev_assoc(&rdev->wiphy, dev, req); |
| 447 | ret = rdev->ops->assoc(&rdev->wiphy, dev, req); |
| 448 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 449 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 450 | } |
| 451 | |
| 452 | static inline int rdev_deauth(struct cfg80211_registered_device *rdev, |
| 453 | struct net_device *dev, |
| 454 | struct cfg80211_deauth_request *req) |
| 455 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 456 | int ret; |
| 457 | trace_rdev_deauth(&rdev->wiphy, dev, req); |
| 458 | ret = rdev->ops->deauth(&rdev->wiphy, dev, req); |
| 459 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 460 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | static inline int rdev_disassoc(struct cfg80211_registered_device *rdev, |
| 464 | struct net_device *dev, |
| 465 | struct cfg80211_disassoc_request *req) |
| 466 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 467 | int ret; |
| 468 | trace_rdev_disassoc(&rdev->wiphy, dev, req); |
| 469 | ret = rdev->ops->disassoc(&rdev->wiphy, dev, req); |
| 470 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 471 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 472 | } |
| 473 | |
| 474 | static inline int rdev_connect(struct cfg80211_registered_device *rdev, |
| 475 | struct net_device *dev, |
| 476 | struct cfg80211_connect_params *sme) |
| 477 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 478 | int ret; |
| 479 | trace_rdev_connect(&rdev->wiphy, dev, sme); |
| 480 | ret = rdev->ops->connect(&rdev->wiphy, dev, sme); |
| 481 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 482 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 483 | } |
| 484 | |
| 485 | static inline int rdev_disconnect(struct cfg80211_registered_device *rdev, |
| 486 | struct net_device *dev, u16 reason_code) |
| 487 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 488 | int ret; |
| 489 | trace_rdev_disconnect(&rdev->wiphy, dev, reason_code); |
| 490 | ret = rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); |
| 491 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 492 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 493 | } |
| 494 | |
| 495 | static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev, |
| 496 | struct net_device *dev, |
| 497 | struct cfg80211_ibss_params *params) |
| 498 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 499 | int ret; |
| 500 | trace_rdev_join_ibss(&rdev->wiphy, dev, params); |
| 501 | ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params); |
| 502 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 503 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 504 | } |
| 505 | |
| 506 | static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev, |
| 507 | struct net_device *dev) |
| 508 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 509 | int ret; |
| 510 | trace_rdev_leave_ibss(&rdev->wiphy, dev); |
| 511 | ret = rdev->ops->leave_ibss(&rdev->wiphy, dev); |
| 512 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 513 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 514 | } |
| 515 | |
| 516 | static inline int |
| 517 | rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) |
| 518 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 519 | int ret; |
| 520 | trace_rdev_set_wiphy_params(&rdev->wiphy, changed); |
| 521 | ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); |
| 522 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 523 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 524 | } |
| 525 | |
| 526 | static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 527 | struct wireless_dev *wdev, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 528 | enum nl80211_tx_power_setting type, int mbm) |
| 529 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 530 | int ret; |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 531 | trace_rdev_set_tx_power(&rdev->wiphy, wdev, type, mbm); |
| 532 | ret = rdev->ops->set_tx_power(&rdev->wiphy, wdev, type, mbm); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 533 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 534 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 535 | } |
| 536 | |
| 537 | static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 538 | struct wireless_dev *wdev, int *dbm) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 539 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 540 | int ret; |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 541 | trace_rdev_get_tx_power(&rdev->wiphy, wdev); |
| 542 | ret = rdev->ops->get_tx_power(&rdev->wiphy, wdev, dbm); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 543 | trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm); |
| 544 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 545 | } |
| 546 | |
| 547 | static inline int rdev_set_wds_peer(struct cfg80211_registered_device *rdev, |
| 548 | struct net_device *dev, const u8 *addr) |
| 549 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 550 | int ret; |
| 551 | trace_rdev_set_wds_peer(&rdev->wiphy, dev, addr); |
| 552 | ret = rdev->ops->set_wds_peer(&rdev->wiphy, dev, addr); |
| 553 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 554 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 555 | } |
| 556 | |
| 557 | static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) |
| 558 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 559 | trace_rdev_rfkill_poll(&rdev->wiphy); |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 560 | rdev->ops->rfkill_poll(&rdev->wiphy); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 561 | trace_rdev_return_void(&rdev->wiphy); |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 562 | } |
| 563 | |
| 564 | |
| 565 | #ifdef CONFIG_NL80211_TESTMODE |
| 566 | static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev, |
David Spinadel | fc73f11 | 2013-07-31 18:04:15 +0300 | [diff] [blame] | 567 | struct wireless_dev *wdev, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 568 | void *data, int len) |
| 569 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 570 | int ret; |
David Spinadel | fc73f11 | 2013-07-31 18:04:15 +0300 | [diff] [blame] | 571 | trace_rdev_testmode_cmd(&rdev->wiphy, wdev); |
| 572 | ret = rdev->ops->testmode_cmd(&rdev->wiphy, wdev, data, len); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 573 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 574 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 575 | } |
| 576 | |
| 577 | static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, |
| 578 | struct sk_buff *skb, |
| 579 | struct netlink_callback *cb, void *data, |
| 580 | int len) |
| 581 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 582 | int ret; |
| 583 | trace_rdev_testmode_dump(&rdev->wiphy); |
| 584 | ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len); |
| 585 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 586 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 587 | } |
| 588 | #endif |
| 589 | |
| 590 | static inline int |
| 591 | rdev_set_bitrate_mask(struct cfg80211_registered_device *rdev, |
| 592 | struct net_device *dev, const u8 *peer, |
| 593 | const struct cfg80211_bitrate_mask *mask) |
| 594 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 595 | int ret; |
| 596 | trace_rdev_set_bitrate_mask(&rdev->wiphy, dev, peer, mask); |
| 597 | ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask); |
| 598 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 599 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 600 | } |
| 601 | |
| 602 | static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev, |
| 603 | struct net_device *netdev, int idx, |
| 604 | struct survey_info *info) |
| 605 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 606 | int ret; |
| 607 | trace_rdev_dump_survey(&rdev->wiphy, netdev, idx); |
| 608 | ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); |
| 609 | if (ret < 0) |
| 610 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 611 | else |
| 612 | trace_rdev_return_int_survey_info(&rdev->wiphy, ret, info); |
| 613 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 614 | } |
| 615 | |
| 616 | static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev, |
| 617 | struct net_device *netdev, |
| 618 | struct cfg80211_pmksa *pmksa) |
| 619 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 620 | int ret; |
| 621 | trace_rdev_set_pmksa(&rdev->wiphy, netdev, pmksa); |
| 622 | ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); |
| 623 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 624 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 625 | } |
| 626 | |
| 627 | static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev, |
| 628 | struct net_device *netdev, |
| 629 | struct cfg80211_pmksa *pmksa) |
| 630 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 631 | int ret; |
| 632 | trace_rdev_del_pmksa(&rdev->wiphy, netdev, pmksa); |
| 633 | ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); |
| 634 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 635 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 636 | } |
| 637 | |
| 638 | static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev, |
| 639 | struct net_device *netdev) |
| 640 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 641 | int ret; |
| 642 | trace_rdev_flush_pmksa(&rdev->wiphy, netdev); |
| 643 | ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev); |
| 644 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 645 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 646 | } |
| 647 | |
| 648 | static inline int |
| 649 | rdev_remain_on_channel(struct cfg80211_registered_device *rdev, |
| 650 | struct wireless_dev *wdev, |
| 651 | struct ieee80211_channel *chan, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 652 | unsigned int duration, u64 *cookie) |
| 653 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 654 | int ret; |
Johannes Berg | 42d97a5 | 2012-11-08 18:31:02 +0100 | [diff] [blame] | 655 | trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 656 | ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, |
Johannes Berg | 42d97a5 | 2012-11-08 18:31:02 +0100 | [diff] [blame] | 657 | duration, cookie); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 658 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); |
| 659 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 660 | } |
| 661 | |
| 662 | static inline int |
| 663 | rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, |
| 664 | struct wireless_dev *wdev, u64 cookie) |
| 665 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 666 | int ret; |
| 667 | trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); |
| 668 | ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); |
| 669 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 670 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 671 | } |
| 672 | |
| 673 | static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, |
| 674 | struct wireless_dev *wdev, |
Andrei Otcheretianski | b176e62 | 2013-11-18 19:06:49 +0200 | [diff] [blame] | 675 | struct cfg80211_mgmt_tx_params *params, |
| 676 | u64 *cookie) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 677 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 678 | int ret; |
Andrei Otcheretianski | b176e62 | 2013-11-18 19:06:49 +0200 | [diff] [blame] | 679 | trace_rdev_mgmt_tx(&rdev->wiphy, wdev, params); |
| 680 | ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 681 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); |
| 682 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 683 | } |
| 684 | |
| 685 | static inline int |
| 686 | rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, |
| 687 | struct wireless_dev *wdev, u64 cookie) |
| 688 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 689 | int ret; |
| 690 | trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); |
| 691 | ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); |
| 692 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 693 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev, |
| 697 | struct net_device *dev, bool enabled, |
| 698 | int timeout) |
| 699 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 700 | int ret; |
| 701 | trace_rdev_set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); |
| 702 | ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); |
| 703 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 704 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 705 | } |
| 706 | |
| 707 | static inline int |
| 708 | rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev, |
| 709 | struct net_device *dev, s32 rssi_thold, u32 rssi_hyst) |
| 710 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 711 | int ret; |
| 712 | trace_rdev_set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, |
| 713 | rssi_hyst); |
| 714 | ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, |
| 715 | rssi_hyst); |
| 716 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 717 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 718 | } |
| 719 | |
| 720 | static inline int |
| 721 | rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev, |
| 722 | struct net_device *dev, u32 rate, u32 pkts, u32 intvl) |
| 723 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 724 | int ret; |
| 725 | trace_rdev_set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, intvl); |
| 726 | ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 727 | intvl); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 728 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 729 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 730 | } |
| 731 | |
| 732 | static inline void |
| 733 | rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev, |
| 734 | struct wireless_dev *wdev, u16 frame_type, bool reg) |
| 735 | { |
Johannes Berg | 33d8783 | 2015-06-23 17:47:05 +0200 | [diff] [blame] | 736 | might_sleep(); |
| 737 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 738 | trace_rdev_mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); |
| 739 | rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); |
| 740 | trace_rdev_return_void(&rdev->wiphy); |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 741 | } |
| 742 | |
| 743 | static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, |
| 744 | u32 tx_ant, u32 rx_ant) |
| 745 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 746 | int ret; |
| 747 | trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant); |
| 748 | ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); |
| 749 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 750 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 751 | } |
| 752 | |
| 753 | static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, |
| 754 | u32 *tx_ant, u32 *rx_ant) |
| 755 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 756 | int ret; |
| 757 | trace_rdev_get_antenna(&rdev->wiphy); |
| 758 | ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); |
| 759 | if (ret) |
| 760 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 761 | else |
| 762 | trace_rdev_return_int_tx_rx(&rdev->wiphy, ret, *tx_ant, |
| 763 | *rx_ant); |
| 764 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 765 | } |
| 766 | |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 767 | static inline int |
| 768 | rdev_sched_scan_start(struct cfg80211_registered_device *rdev, |
| 769 | struct net_device *dev, |
| 770 | struct cfg80211_sched_scan_request *request) |
| 771 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 772 | int ret; |
| 773 | trace_rdev_sched_scan_start(&rdev->wiphy, dev, request); |
| 774 | ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); |
| 775 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 776 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 777 | } |
| 778 | |
| 779 | static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev, |
| 780 | struct net_device *dev) |
| 781 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 782 | int ret; |
| 783 | trace_rdev_sched_scan_stop(&rdev->wiphy, dev); |
| 784 | ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev); |
| 785 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 786 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 787 | } |
| 788 | |
| 789 | static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev, |
| 790 | struct net_device *dev, |
| 791 | struct cfg80211_gtk_rekey_data *data) |
| 792 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 793 | int ret; |
| 794 | trace_rdev_set_rekey_data(&rdev->wiphy, dev); |
| 795 | ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); |
| 796 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 797 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 798 | } |
| 799 | |
| 800 | static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, |
| 801 | struct net_device *dev, u8 *peer, |
| 802 | u8 action_code, u8 dialog_token, |
Sunil Dutt Undekari | df942e7 | 2014-02-20 16:22:09 +0530 | [diff] [blame] | 803 | u16 status_code, u32 peer_capability, |
Arik Nemtsov | 31fa97c | 2014-06-11 17:18:21 +0300 | [diff] [blame] | 804 | bool initiator, const u8 *buf, size_t len) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 805 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 806 | int ret; |
| 807 | trace_rdev_tdls_mgmt(&rdev->wiphy, dev, peer, action_code, |
Sunil Dutt Undekari | df942e7 | 2014-02-20 16:22:09 +0530 | [diff] [blame] | 808 | dialog_token, status_code, peer_capability, |
Arik Nemtsov | 31fa97c | 2014-06-11 17:18:21 +0300 | [diff] [blame] | 809 | initiator, buf, len); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 810 | ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code, |
Sunil Dutt Undekari | df942e7 | 2014-02-20 16:22:09 +0530 | [diff] [blame] | 811 | dialog_token, status_code, peer_capability, |
Arik Nemtsov | 31fa97c | 2014-06-11 17:18:21 +0300 | [diff] [blame] | 812 | initiator, buf, len); |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 813 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 814 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 815 | } |
| 816 | |
| 817 | static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev, |
| 818 | struct net_device *dev, u8 *peer, |
| 819 | enum nl80211_tdls_operation oper) |
| 820 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 821 | int ret; |
| 822 | trace_rdev_tdls_oper(&rdev->wiphy, dev, peer, oper); |
| 823 | ret = rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); |
| 824 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 825 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 826 | } |
| 827 | |
| 828 | static inline int rdev_probe_client(struct cfg80211_registered_device *rdev, |
| 829 | struct net_device *dev, const u8 *peer, |
| 830 | u64 *cookie) |
| 831 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 832 | int ret; |
| 833 | trace_rdev_probe_client(&rdev->wiphy, dev, peer); |
| 834 | ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); |
| 835 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); |
| 836 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 837 | } |
| 838 | |
| 839 | static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev, |
| 840 | struct net_device *dev, u16 noack_map) |
| 841 | { |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 842 | int ret; |
| 843 | trace_rdev_set_noack_map(&rdev->wiphy, dev, noack_map); |
| 844 | ret = rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); |
| 845 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 846 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 847 | } |
| 848 | |
| 849 | static inline int |
Johannes Berg | 683b6d3 | 2012-11-08 21:25:48 +0100 | [diff] [blame] | 850 | rdev_get_channel(struct cfg80211_registered_device *rdev, |
| 851 | struct wireless_dev *wdev, |
| 852 | struct cfg80211_chan_def *chandef) |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 853 | { |
Johannes Berg | 683b6d3 | 2012-11-08 21:25:48 +0100 | [diff] [blame] | 854 | int ret; |
| 855 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 856 | trace_rdev_get_channel(&rdev->wiphy, wdev); |
Johannes Berg | 683b6d3 | 2012-11-08 21:25:48 +0100 | [diff] [blame] | 857 | ret = rdev->ops->get_channel(&rdev->wiphy, wdev, chandef); |
| 858 | trace_rdev_return_chandef(&rdev->wiphy, ret, chandef); |
| 859 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 860 | return ret; |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 861 | } |
| 862 | |
Johannes Berg | eeb126e | 2012-10-23 15:16:50 +0200 | [diff] [blame] | 863 | static inline int rdev_start_p2p_device(struct cfg80211_registered_device *rdev, |
| 864 | struct wireless_dev *wdev) |
| 865 | { |
| 866 | int ret; |
| 867 | |
| 868 | trace_rdev_start_p2p_device(&rdev->wiphy, wdev); |
| 869 | ret = rdev->ops->start_p2p_device(&rdev->wiphy, wdev); |
| 870 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 871 | return ret; |
| 872 | } |
| 873 | |
| 874 | static inline void rdev_stop_p2p_device(struct cfg80211_registered_device *rdev, |
| 875 | struct wireless_dev *wdev) |
| 876 | { |
| 877 | trace_rdev_stop_p2p_device(&rdev->wiphy, wdev); |
| 878 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); |
| 879 | trace_rdev_return_void(&rdev->wiphy); |
Arend van Spriel | 5de1798 | 2013-04-18 15:49:00 +0200 | [diff] [blame] | 880 | } |
Vasanthakumar Thiagarajan | 77765ea | 2013-01-18 11:18:45 +0530 | [diff] [blame] | 881 | |
| 882 | static inline int rdev_set_mac_acl(struct cfg80211_registered_device *rdev, |
| 883 | struct net_device *dev, |
| 884 | struct cfg80211_acl_data *params) |
| 885 | { |
| 886 | int ret; |
| 887 | |
| 888 | trace_rdev_set_mac_acl(&rdev->wiphy, dev, params); |
| 889 | ret = rdev->ops->set_mac_acl(&rdev->wiphy, dev, params); |
| 890 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 891 | return ret; |
| 892 | } |
Jouni Malinen | 355199e | 2013-02-27 17:14:27 +0200 | [diff] [blame] | 893 | |
| 894 | static inline int rdev_update_ft_ies(struct cfg80211_registered_device *rdev, |
| 895 | struct net_device *dev, |
| 896 | struct cfg80211_update_ft_ies_params *ftie) |
| 897 | { |
| 898 | int ret; |
| 899 | |
| 900 | trace_rdev_update_ft_ies(&rdev->wiphy, dev, ftie); |
| 901 | ret = rdev->ops->update_ft_ies(&rdev->wiphy, dev, ftie); |
| 902 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 903 | return ret; |
| 904 | } |
| 905 | |
Arend van Spriel | 5de1798 | 2013-04-18 15:49:00 +0200 | [diff] [blame] | 906 | static inline int rdev_crit_proto_start(struct cfg80211_registered_device *rdev, |
| 907 | struct wireless_dev *wdev, |
| 908 | enum nl80211_crit_proto_id protocol, |
| 909 | u16 duration) |
| 910 | { |
| 911 | int ret; |
| 912 | |
| 913 | trace_rdev_crit_proto_start(&rdev->wiphy, wdev, protocol, duration); |
| 914 | ret = rdev->ops->crit_proto_start(&rdev->wiphy, wdev, |
| 915 | protocol, duration); |
| 916 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 917 | return ret; |
| 918 | } |
| 919 | |
| 920 | static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev, |
| 921 | struct wireless_dev *wdev) |
| 922 | { |
| 923 | trace_rdev_crit_proto_stop(&rdev->wiphy, wdev); |
| 924 | rdev->ops->crit_proto_stop(&rdev->wiphy, wdev); |
| 925 | trace_rdev_return_void(&rdev->wiphy); |
| 926 | } |
| 927 | |
Simon Wunderlich | 16ef1fe | 2013-07-11 16:09:05 +0200 | [diff] [blame] | 928 | static inline int rdev_channel_switch(struct cfg80211_registered_device *rdev, |
| 929 | struct net_device *dev, |
| 930 | struct cfg80211_csa_settings *params) |
| 931 | { |
| 932 | int ret; |
| 933 | |
| 934 | trace_rdev_channel_switch(&rdev->wiphy, dev, params); |
| 935 | ret = rdev->ops->channel_switch(&rdev->wiphy, dev, params); |
| 936 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 937 | return ret; |
| 938 | } |
| 939 | |
Kyeyoon Park | fa9ffc7 | 2013-12-16 23:01:30 -0800 | [diff] [blame] | 940 | static inline int rdev_set_qos_map(struct cfg80211_registered_device *rdev, |
| 941 | struct net_device *dev, |
| 942 | struct cfg80211_qos_map *qos_map) |
| 943 | { |
| 944 | int ret = -EOPNOTSUPP; |
| 945 | |
| 946 | if (rdev->ops->set_qos_map) { |
| 947 | trace_rdev_set_qos_map(&rdev->wiphy, dev, qos_map); |
| 948 | ret = rdev->ops->set_qos_map(&rdev->wiphy, dev, qos_map); |
| 949 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 950 | } |
| 951 | |
| 952 | return ret; |
| 953 | } |
| 954 | |
Jouni Malinen | e16821b | 2014-04-28 11:22:08 +0300 | [diff] [blame] | 955 | static inline int |
| 956 | rdev_set_ap_chanwidth(struct cfg80211_registered_device *rdev, |
| 957 | struct net_device *dev, struct cfg80211_chan_def *chandef) |
| 958 | { |
| 959 | int ret; |
| 960 | |
| 961 | trace_rdev_set_ap_chanwidth(&rdev->wiphy, dev, chandef); |
| 962 | ret = rdev->ops->set_ap_chanwidth(&rdev->wiphy, dev, chandef); |
| 963 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 964 | |
| 965 | return ret; |
| 966 | } |
| 967 | |
Johannes Berg | 960d01a | 2014-09-09 22:55:35 +0300 | [diff] [blame] | 968 | static inline int |
| 969 | rdev_add_tx_ts(struct cfg80211_registered_device *rdev, |
| 970 | struct net_device *dev, u8 tsid, const u8 *peer, |
| 971 | u8 user_prio, u16 admitted_time) |
| 972 | { |
| 973 | int ret = -EOPNOTSUPP; |
| 974 | |
| 975 | trace_rdev_add_tx_ts(&rdev->wiphy, dev, tsid, peer, |
| 976 | user_prio, admitted_time); |
| 977 | if (rdev->ops->add_tx_ts) |
| 978 | ret = rdev->ops->add_tx_ts(&rdev->wiphy, dev, tsid, peer, |
| 979 | user_prio, admitted_time); |
| 980 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 981 | |
| 982 | return ret; |
| 983 | } |
| 984 | |
| 985 | static inline int |
| 986 | rdev_del_tx_ts(struct cfg80211_registered_device *rdev, |
| 987 | struct net_device *dev, u8 tsid, const u8 *peer) |
| 988 | { |
| 989 | int ret = -EOPNOTSUPP; |
| 990 | |
| 991 | trace_rdev_del_tx_ts(&rdev->wiphy, dev, tsid, peer); |
| 992 | if (rdev->ops->del_tx_ts) |
| 993 | ret = rdev->ops->del_tx_ts(&rdev->wiphy, dev, tsid, peer); |
| 994 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 995 | |
| 996 | return ret; |
| 997 | } |
| 998 | |
Arik Nemtsov | 1057d35 | 2014-11-19 12:54:26 +0200 | [diff] [blame] | 999 | static inline int |
| 1000 | rdev_tdls_channel_switch(struct cfg80211_registered_device *rdev, |
| 1001 | struct net_device *dev, const u8 *addr, |
| 1002 | u8 oper_class, struct cfg80211_chan_def *chandef) |
| 1003 | { |
| 1004 | int ret; |
| 1005 | |
| 1006 | trace_rdev_tdls_channel_switch(&rdev->wiphy, dev, addr, oper_class, |
| 1007 | chandef); |
| 1008 | ret = rdev->ops->tdls_channel_switch(&rdev->wiphy, dev, addr, |
| 1009 | oper_class, chandef); |
| 1010 | trace_rdev_return_int(&rdev->wiphy, ret); |
| 1011 | return ret; |
| 1012 | } |
| 1013 | |
| 1014 | static inline void |
| 1015 | rdev_tdls_cancel_channel_switch(struct cfg80211_registered_device *rdev, |
| 1016 | struct net_device *dev, const u8 *addr) |
| 1017 | { |
| 1018 | trace_rdev_tdls_cancel_channel_switch(&rdev->wiphy, dev, addr); |
| 1019 | rdev->ops->tdls_cancel_channel_switch(&rdev->wiphy, dev, addr); |
| 1020 | trace_rdev_return_void(&rdev->wiphy); |
| 1021 | } |
| 1022 | |
Hila Gonen | e35e4d2 | 2012-06-27 17:19:42 +0300 | [diff] [blame] | 1023 | #endif /* __CFG80211_RDEV_OPS */ |