[PATCH 13/13] mbssid: add nl80211 support

Jouni Malinen j at w1.fi
Thu Apr 7 13:53:10 PDT 2022


On Wed, Mar 02, 2022 at 02:26:34PM -0800, Aloka Dixit wrote:
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> +static int nl80211_mbssid(struct nl_msg *msg,
> +			 struct wpa_driver_ap_params *params)
> +{
> +	struct nlattr *config, *elems;
> +	int ifidx;
> +
> +	config = nla_nest_start(msg, NL80211_ATTR_MBSSID_CONFIG);
> +	if (!config)
> +		goto fail;

"return -1;" would be cleaner in this case.

> +		ifidx = if_nametoindex(params->mbssid_tx_iface);
> +		if (ifidx <= 0)
> +			goto fail;

Same here.

> +		elems = nla_nest_start(msg, NL80211_ATTR_MBSSID_ELEMS);
> +		if (!elems)
> +			goto fail;

and here..

> +	return 0;
> +
> +fail:
> +	return -1;
> +}

> @@ -5439,7 +5491,6 @@ const char * nl80211_iftype_str(enum nl80211_iftype mode)
>  	}
>  }
>  
> -
>  static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,

Unrelated (and undesired) whitespace change should not be here.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list