linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend@broadcom.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC 3/3] brcmfmac: update band and regulatory info before wiphy_register()
Date: Mon, 23 Jun 2014 11:37:53 +0200	[thread overview]
Message-ID: <1403516273.4418.11.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1402996581-10764-4-git-send-email-arend@broadcom.com>

I'm not really sure why this code requires the previous patch?

> @@ -5615,35 +5593,51 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
>  	err = wl_init_priv(cfg);
>  	if (err) {
>  		brcmf_err("Failed to init iwm_priv (%d)\n", err);
> -		goto cfg80211_attach_out;
> +		brcmf_free_vif(vif);
> +		goto wiphy_out;
>  	}
>  	ifp->vif = vif;
>  
> +	if (wiphy_is_40mhz_24ghz_disabled(wiphy) == false) {
> +		err = brcmf_enable_bw40_2g(ifp);
> +		if (!err)
> +			err = brcmf_fil_iovar_int_set(ifp, "obss_coex",
> +						      BRCMF_OBSS_COEX_AUTO);
> +	}

This seems to have an effect only on the device, so why not do it after
wiphy_register()?

> +	/* determine d11 io type before updating bands */
> +	err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type);
> +	if (err) {
> +		brcmf_err("Failed to get D11 version (%d)\n", err);
> +		goto priv_out;
> +	}
> +	cfg->d11inf.io_type = (u8)io_type;
> +	brcmu_d11_attach(&cfg->d11inf);
> +
> +	err = brcmf_update_wiphybands(cfg);
> +	if (err)
> +		goto priv_out;
> +
> +	brcmf_dbg(INFO, "Registering custom regulatory\n");
> +	wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
> +	wiphy_apply_custom_regulatory(wiphy, &brcmf_regdom);

The regdomain is also static const so not affected by it.

johannes


  reply	other threads:[~2014-06-23  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17  9:16 [RFC 0/3] brcmfmac: provide band info upon wiphy registration Arend van Spriel
2014-06-17  9:16 ` [RFC 1/3] brcmfmac: move attach and detach functions in wl_cfg80211.c Arend van Spriel
2014-06-17  9:16 ` [RFC 2/3] cfg80211: expose cfg80211_disable_40mhz_24ghz module parameter Arend van Spriel
2014-06-23  9:34   ` Johannes Berg
2014-06-24 17:21     ` Arend van Spriel
2014-06-25 15:57       ` Johannes Berg
2014-06-25 16:50         ` Arend van Spriel
2014-06-17  9:16 ` [RFC 3/3] brcmfmac: update band and regulatory info before wiphy_register() Arend van Spriel
2014-06-23  9:37   ` Johannes Berg [this message]
2014-06-24 17:11     ` Arend van Spriel
2014-06-25 15:55       ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403516273.4418.11.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).