bpf: fix arraymap NULL deref and missing overflow and zero size checks
[deliverable/linux.git] / net / wireless / rdev-ops.h
index f6d457d6a558a63cea2787b921af8c2ec66e9843..1b3864cd50cadb714ca16afbb660ffeab4703c0b 100644 (file)
@@ -178,11 +178,12 @@ static inline int rdev_add_station(struct cfg80211_registered_device *rdev,
 }
 
 static inline int rdev_del_station(struct cfg80211_registered_device *rdev,
-                                  struct net_device *dev, u8 *mac)
+                                  struct net_device *dev,
+                                  struct station_del_parameters *params)
 {
        int ret;
-       trace_rdev_del_station(&rdev->wiphy, dev, mac);
-       ret = rdev->ops->del_station(&rdev->wiphy, dev, mac);
+       trace_rdev_del_station(&rdev->wiphy, dev, params);
+       ret = rdev->ops->del_station(&rdev->wiphy, dev, params);
        trace_rdev_return_int(&rdev->wiphy, ret);
        return ret;
 }
@@ -263,6 +264,18 @@ static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev,
 
 }
 
+static inline int rdev_get_mpp(struct cfg80211_registered_device *rdev,
+                              struct net_device *dev, u8 *dst, u8 *mpp,
+                              struct mpath_info *pinfo)
+{
+       int ret;
+
+       trace_rdev_get_mpp(&rdev->wiphy, dev, dst, mpp);
+       ret = rdev->ops->get_mpp(&rdev->wiphy, dev, dst, mpp, pinfo);
+       trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
+       return ret;
+}
+
 static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev,
                                  struct net_device *dev, int idx, u8 *dst,
                                  u8 *next_hop, struct mpath_info *pinfo)
@@ -271,7 +284,20 @@ static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev,
        int ret;
        trace_rdev_dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop);
        ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop,
-                                    pinfo);
+                                   pinfo);
+       trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
+       return ret;
+}
+
+static inline int rdev_dump_mpp(struct cfg80211_registered_device *rdev,
+                               struct net_device *dev, int idx, u8 *dst,
+                               u8 *mpp, struct mpath_info *pinfo)
+
+{
+       int ret;
+
+       trace_rdev_dump_mpp(&rdev->wiphy, dev, idx, dst, mpp);
+       ret = rdev->ops->dump_mpp(&rdev->wiphy, dev, idx, dst, mpp, pinfo);
        trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo);
        return ret;
 }
@@ -322,6 +348,27 @@ static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev,
        return ret;
 }
 
+static inline int rdev_join_ocb(struct cfg80211_registered_device *rdev,
+                               struct net_device *dev,
+                               struct ocb_setup *setup)
+{
+       int ret;
+       trace_rdev_join_ocb(&rdev->wiphy, dev, setup);
+       ret = rdev->ops->join_ocb(&rdev->wiphy, dev, setup);
+       trace_rdev_return_int(&rdev->wiphy, ret);
+       return ret;
+}
+
+static inline int rdev_leave_ocb(struct cfg80211_registered_device *rdev,
+                                struct net_device *dev)
+{
+       int ret;
+       trace_rdev_leave_ocb(&rdev->wiphy, dev);
+       ret = rdev->ops->leave_ocb(&rdev->wiphy, dev);
+       trace_rdev_return_int(&rdev->wiphy, ret);
+       return ret;
+}
+
 static inline int rdev_change_bss(struct cfg80211_registered_device *rdev,
                                  struct net_device *dev,
                                  struct bss_parameters *params)
This page took 0.025308 seconds and 5 git commands to generate.