From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Amitkumar Karwar <amitkarwar@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
marcel@holtmann.org
Cc: linux-wireless@vger.kernel.org,
Amitkumar Karwar <amit.karwar@redpinesignals.com>,
Prameela Rani Garnepudi <prameela.j04cs@gmail.com>,
linux-bluetooth@vger.kernel.org,
Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Subject: Re: [PATCH 7/8] rsi: add module parameter operating mode
Date: Wed, 15 Nov 2017 09:56:31 +0100 [thread overview]
Message-ID: <5A0C013F.2080103@broadcom.com> (raw)
In-Reply-To: <1510730444-3237-8-git-send-email-amitkarwar@gmail.com>
On 11/15/2017 8:20 AM, Amitkumar Karwar wrote:
> From: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
>
> Operating mode determines the support for other protocols.
> This is made as module parameter for better usage.
>
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
> ---
[...]
> -struct rsi_hw *rsi_91x_init(void)
> +struct rsi_hw *rsi_91x_init(u16 oper_mode)
> {
> struct rsi_hw *adapter = NULL;
> struct rsi_common *common = NULL;
> @@ -320,11 +336,34 @@ struct rsi_hw *rsi_91x_init(void)
> spin_lock_init(&adapter->ps_lock);
> timer_setup(&common->roc_timer, rsi_roc_timeout, 0);
> init_completion(&common->wlan_init_completion);
> + common->oper_mode = oper_mode;
> common->init_done = true;
> -
> - common->coex_mode = RSI_DEV_COEX_MODE_WIFI_ALONE;
> - common->oper_mode = RSI_DEV_OPMODE_WIFI_ALONE;
> adapter->device_model = RSI_DEV_9113;
Seems there are definitions for coex_mode....
> +
> + /* Determine coex mode */
> + switch (common->oper_mode) {
> + case DEV_OPMODE_STA_BT_DUAL:
> + case DEV_OPMODE_STA_BT:
> + case DEV_OPMODE_STA_BT_LE:
> + case DEV_OPMODE_BT_ALONE:
> + case DEV_OPMODE_BT_LE_ALONE:
> + case DEV_OPMODE_BT_DUAL:
> + common->coex_mode = 2;
... why use magic values here ?
> + break;
> + case DEV_OPMODE_AP_BT_DUAL:
> + case DEV_OPMODE_AP_BT:
> + common->coex_mode = 4;
> + break;
> + case DEV_OPMODE_WIFI_ALONE:
> + common->coex_mode = 1;
> + break;
> + default:
> + common->oper_mode = 1;
> + common->coex_mode = 1;
> + }
> + rsi_dbg(INFO_ZONE, "%s: oper_mode = %d, coex_mode = %d\n",
> + __func__, common->oper_mode, common->coex_mode);
> +
> if (common->coex_mode > 1) {
> if (rsi_coex_attach(common)) {
> rsi_dbg(ERR_ZONE, "Failed to init coex module\n");
> @@ -359,10 +398,13 @@ void rsi_91x_deinit(struct rsi_hw *adapter)
> for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
> skb_queue_purge(&common->tx_queue[ii]);
>
> - common->init_done = false;
> -
> - if (common->coex_mode > 1)
> + if (common->coex_mode > 1) {
> rsi_coex_detach(common);
> + if (g_proto_ops.bt_ops->detach)
> + g_proto_ops.bt_ops->detach(common->bt_adapter);
> + }
> +
> + common->init_done = false;
Regards,
Arend
next prev parent reply other threads:[~2017-11-15 8:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 7:20 [PATCH 0/8] rsi: add bluetooth and coex support Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 1/8] rsi: add rx control block to handle rx packets in USB Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 2/8] rsi: add bluetooth rx endpoint Amitkumar Karwar
2017-11-15 15:23 ` Marcel Holtmann
2017-11-16 5:12 ` Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 3/8] rsi: add header file rsi_header Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 4/8] rsi: add coex support Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 5/8] Bluetooth: btrsi: add new rsi bluetooth driver Amitkumar Karwar
2017-11-15 15:37 ` Marcel Holtmann
2017-11-16 5:16 ` Amitkumar Karwar
2017-11-29 12:49 ` Amitkumar Karwar
2017-11-29 13:33 ` Marcel Holtmann
2017-11-30 14:23 ` Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 6/8] rsi: handle BT traffic in driver Amitkumar Karwar
2017-11-15 7:20 ` [PATCH 7/8] rsi: add module parameter operating mode Amitkumar Karwar
2017-11-15 8:56 ` Arend van Spriel [this message]
2017-11-15 7:20 ` [PATCH 8/8] rsi: sdio changes to support BT Amitkumar Karwar
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=5A0C013F.2080103@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=amit.karwar@redpinesignals.com \
--cc=amitkarwar@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=prameela.j04cs@gmail.com \
--cc=siva.rebbagondla@redpinesignals.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).