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