diff mbox

[v4,1/4] soc: qcom: wcnss_ctrl: Stub wcnss_ctrl API

Message ID 1473200312-22438-1-git-send-email-bjorn.andersson@linaro.org
State Accepted
Commit daa6e41ce2b594e7d622b4cd3978defca1139666
Headers show

Commit Message

Bjorn Andersson Sept. 6, 2016, 10:18 p.m. UTC
Stub the wcnss_ctrl API to allow compile testing wcnss function drivers.

Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---

There are no other pending changes colliding with this, so if Andy is okay with
this it could be merged through Kalle's tree - together with the other patches.

Marcel, with this applied we can drop the depends on QCOM_SMD from the
btqcomsmd driver as well.

Changes since v3:
- Added this patch to allow compile testing without SMD support after patch 2

 include/linux/soc/qcom/wcnss_ctrl.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.5.0

Comments

Bjorn Andersson Sept. 8, 2016, 3:31 p.m. UTC | #1
On Thu, Sep 8, 2016 at 5:16 AM, Kalle Valo <kvalo@codeaurora.org> wrote:
> Bjorn Andersson <bjorn.andersson@linaro.org> writes:

>

>> The wcn36xx wifi driver follows the life cycle of the WLAN_CTRL SMD

>> channel, as such it should be a SMD client. This patch makes this

>> transition, now that we have the necessary frameworks available.

>>

>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

>> ---

>>

>> Changes since v3:

>> - Made msg_header const in wcn36xx_smd_rsp_process()

>>

>> Changes since v2:

>> - Correct the call to the new ieee80211_scan_completed()

>>

>>  drivers/net/wireless/ath/wcn36xx/dxe.c     | 16 +++---

>>  drivers/net/wireless/ath/wcn36xx/main.c    | 79 ++++++++++++++++++++----------

>>  drivers/net/wireless/ath/wcn36xx/smd.c     | 31 +++++-------

>>  drivers/net/wireless/ath/wcn36xx/smd.h     |  5 ++

>>  drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 21 +++-----

>>  5 files changed, 86 insertions(+), 66 deletions(-)

>

> This doesn't compile for me:

>


I thought I mentioned this in the mail, sorry for missing that.

There is a patch for this issue in linux-next already [1] which is
part of [2], which was part of the pull request to arm-soc for
inclusion in v4.9.

[1] https://patchwork.kernel.org/patch/9272457/
[2] https://git.kernel.org/cgit/linux/kernel/git/agross/linux.git/tag/?h=qcom-drivers-for-4.9

Regards,
Bjorn
Bjorn Andersson Sept. 9, 2016, 4:21 a.m. UTC | #2
On Thu 08 Sep 10:35 PDT 2016, Kalle Valo wrote:

> Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> 

> > On Thu, Sep 8, 2016 at 5:16 AM, Kalle Valo <kvalo@codeaurora.org> wrote:

> >> Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> >>

> >>> The wcn36xx wifi driver follows the life cycle of the WLAN_CTRL SMD

> >>> channel, as such it should be a SMD client. This patch makes this

> >>> transition, now that we have the necessary frameworks available.

> >>>

> >>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> >>> ---

> >>>

> >>> Changes since v3:

> >>> - Made msg_header const in wcn36xx_smd_rsp_process()

> >>>

> >>> Changes since v2:

> >>> - Correct the call to the new ieee80211_scan_completed()

> >>>

> >>>  drivers/net/wireless/ath/wcn36xx/dxe.c     | 16 +++---

> >>>  drivers/net/wireless/ath/wcn36xx/main.c    | 79 ++++++++++++++++++++----------

> >>>  drivers/net/wireless/ath/wcn36xx/smd.c     | 31 +++++-------

> >>>  drivers/net/wireless/ath/wcn36xx/smd.h     |  5 ++

> >>>  drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 21 +++-----

> >>>  5 files changed, 86 insertions(+), 66 deletions(-)

> >>

> >> This doesn't compile for me:

> >>

> >

> > I thought I mentioned this in the mail, sorry for missing that.

> 

> Maybe you did and I just forgot, I have a tendency to do that :)

> 

> > There is a patch for this issue in linux-next already [1] which is

> > part of [2], which was part of the pull request to arm-soc for

> > inclusion in v4.9.

> >

> > [1] https://patchwork.kernel.org/patch/9272457/

> > [2] https://git.kernel.org/cgit/linux/kernel/git/agross/linux.git/tag/?h=qcom-drivers-for-4.9

> 

> So the commit in question is:

> 

> soc: qcom: smd: Correct compile stub prototypes

> https://git.kernel.org/cgit/linux/kernel/git/agross/linux.git/commit/?h=qcom-drivers-for-4.9&id=3a1281848830fcb3202cfd7ffe62d19641471d05

> 


Correct

> But that's not obviously in my tree yet, but I should have it after

> 4.9-rc1 is released. I think it's easiest that I wait for that before

> applying these. Do you agree?

> 


Would be nice to have it land sooner rather than later, but I'm okay
with this.

Regards,
Bjorn
Andy Gross Sept. 9, 2016, 4:27 a.m. UTC | #3
On Thu, Sep 08, 2016 at 09:21:59PM -0700, Bjorn Andersson wrote:
> On Thu 08 Sep 10:35 PDT 2016, Kalle Valo wrote:

> 

> > Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> > 

> > > On Thu, Sep 8, 2016 at 5:16 AM, Kalle Valo <kvalo@codeaurora.org> wrote:

> > >> Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> > >>

> > >>> The wcn36xx wifi driver follows the life cycle of the WLAN_CTRL SMD

> > >>> channel, as such it should be a SMD client. This patch makes this

> > >>> transition, now that we have the necessary frameworks available.

> > >>>

> > >>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> > >>> ---

> > >>>

> > >>> Changes since v3:

> > >>> - Made msg_header const in wcn36xx_smd_rsp_process()

> > >>>

> > >>> Changes since v2:

> > >>> - Correct the call to the new ieee80211_scan_completed()

> > >>>

> > >>>  drivers/net/wireless/ath/wcn36xx/dxe.c     | 16 +++---

> > >>>  drivers/net/wireless/ath/wcn36xx/main.c    | 79 ++++++++++++++++++++----------

> > >>>  drivers/net/wireless/ath/wcn36xx/smd.c     | 31 +++++-------

> > >>>  drivers/net/wireless/ath/wcn36xx/smd.h     |  5 ++

> > >>>  drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 21 +++-----

> > >>>  5 files changed, 86 insertions(+), 66 deletions(-)

> > >>

> > >> This doesn't compile for me:

> > >>

> > >

> > > I thought I mentioned this in the mail, sorry for missing that.

> > 

> > Maybe you did and I just forgot, I have a tendency to do that :)

> > 

> > > There is a patch for this issue in linux-next already [1] which is

> > > part of [2], which was part of the pull request to arm-soc for

> > > inclusion in v4.9.

> > >

> > > [1] https://patchwork.kernel.org/patch/9272457/

> > > [2] https://git.kernel.org/cgit/linux/kernel/git/agross/linux.git/tag/?h=qcom-drivers-for-4.9

> > 

> > So the commit in question is:

> > 

> > soc: qcom: smd: Correct compile stub prototypes

> > https://git.kernel.org/cgit/linux/kernel/git/agross/linux.git/commit/?h=qcom-drivers-for-4.9&id=3a1281848830fcb3202cfd7ffe62d19641471d05

> > 

> 

> Correct

> 

> > But that's not obviously in my tree yet, but I should have it after

> > 4.9-rc1 is released. I think it's easiest that I wait for that before

> > applying these. Do you agree?

> > 

> 

> Would be nice to have it land sooner rather than later, but I'm okay

> with this.


We could just treat the tag as immutable.  You can merge the tag in and arm-soc
can as well.  it'll just get nop'd the second time it is taken.  The only
downside is if arm-soc doesn't take my merge request.

Or we can wait till -rc1

Regards,

Andy
diff mbox

Patch

diff --git a/include/linux/soc/qcom/wcnss_ctrl.h b/include/linux/soc/qcom/wcnss_ctrl.h
index a37bc5538f19..eab64976a73b 100644
--- a/include/linux/soc/qcom/wcnss_ctrl.h
+++ b/include/linux/soc/qcom/wcnss_ctrl.h
@@ -3,6 +3,19 @@ 
 
 #include <linux/soc/qcom/smd.h>
 
+#if IS_ENABLED(CONFIG_QCOM_WCNSS_CTRL)
+
 struct qcom_smd_channel *qcom_wcnss_open_channel(void *wcnss, const char *name, qcom_smd_cb_t cb);
 
+#else
+
+static inline struct qcom_smd_channel*
+qcom_wcnss_open_channel(void *wcnss, const char *name, qcom_smd_cb_t cb)
+{
+	WARN_ON(1);
+	return ERR_PTR(-ENXIO);
+}
+
+#endif
+
 #endif