> 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];
> struct cfg80211_registered_device *rdev;
> struct wireless_dev *wdev;
> + unsigned int wp_idx = 0;
> + unsigned int if_idx;
> + static struct dump_interface_context static_ctx;
> + struct dump_interface_context *ctx = cb->args[0];
> +
> + if (!ctx) {
> + int ret;
> +
> + static_ctx.wp_start = 0;
> + static_ctx.if_start = 0;
> + static_ctx.filter_wiphy = -1;
> +
> + ret = nl80211_dump_interface_parse(skb, cb,
> + &static_ctx.filte
> r_wiphy);
> + if (ret)
> + return ret;
> +
> + ctx = &static_ctx;
> + cb->args[0] = ctx;
You can't do this, multiple applications are allowed to dump at the
same time. I think I'll take your previous patch and adjust it a bit.
johannes