Hi Johannes,

On 08/11/2016 07:47 AM, Johannes Berg wrote:
On Wed, 2016-08-03 at 17:02 -0500, Denis Kenzior wrote:

+static int nl80211_dump_interface_parse(struct sk_buff *skb,
+                                   struct netlink_callback *cb,
+                                   int *filter_wiphy)

Wrong indentation :)

Sorry :)

Speaking of indentation, can you point me to a doc of the rules I should follow?


  static int nl80211_dump_interface(struct sk_buff *skb, struct
netlink_callback *cb)
  {
        int wp_idx = 0;
        int if_idx = 0;
        int wp_start = cb->args[0];
        int if_start = cb->args[1];
+       int filter_wiphy = cb->args[2];
        struct cfg80211_registered_device *rdev;
        struct wireless_dev *wdev;

+       if (!wp_start && !if_start && !filter_wiphy) {

This seems incorrect - you're setting

+               int ret;
+
+               filter_wiphy = -1;
+
+               ret = nl80211_dump_interface_parse(skb, cb,
&filter_wiphy);

it here, but it can take the value 0, so !filter_wiphy seems wrong?


I can confirm that I sanity checked this patch. Both ATTR_WIPHY, ATTR_WDEV and wildcard dumps seemed to produce expected results.

I noticed you applied this patch. Is there a particular scenario where it goes wrong or did you convince yourself it is correct?

Regards,
-Denis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to