Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-11 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160609]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: error: assignment from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
   drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^~
   drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^~
   cc1: some warnings being treated as errors

vim +1618 drivers/net/wireless/ath/ath6kl/wmi.c

  1612  struct wmi_txe_notify_cmd *cmd;
  1613  
  1614  skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
  1615  if (!skb)
  1616  return -ENOMEM;
  1617  
> 1618  cmd = (struct wmi_set_antenna_cmd *) skb->data;
  1619  cmd->tx_ant = cpu_to_le32(tx_ant);
  1620  cmd->rx_ant = cpu_to_le32(rx_ant);
  1621  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-11 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160609]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: error: assignment from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
   drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^~
   drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^~
   cc1: some warnings being treated as errors

vim +1618 drivers/net/wireless/ath/ath6kl/wmi.c

  1612  struct wmi_txe_notify_cmd *cmd;
  1613  
  1614  skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
  1615  if (!skb)
  1616  return -ENOMEM;
  1617  
> 1618  cmd = (struct wmi_set_antenna_cmd *) skb->data;
  1619  cmd->tx_ant = cpu_to_le32(tx_ant);
  1620  cmd->rx_ant = cpu_to_le32(rx_ant);
  1621  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-11 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160609]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: openrisc-allmodconfig (attached as .config)
compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/cfg80211.c: In function 'ath6kl_set_antenna':
>> drivers/net/wireless/ath/ath6kl/cfg80211.c:3253:2: error: implicit 
>> declaration of function 'ath6kl_wmi_set_antenna'
--
   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
   drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: warning: assignment from 
incompatible pointer type
>> drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'tx_ant'
>> drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'rx_ant'

vim +/ath6kl_wmi_set_antenna +3253 drivers/net/wireless/ath/ath6kl/cfg80211.c

  3247  if (!tx_ant || !rx_ant)
  3248  return -EINVAL;
  3249  
  3250  ar->hw.tx_ant = tx_ant;
  3251  ar->hw.rx_ant = rx_ant;
  3252  
> 3253  return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
  3254  tx_ant, rx_ant);
  3255  }
  3256  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-11 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160609]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: openrisc-allmodconfig (attached as .config)
compiler: or32-linux-gcc (GCC) 4.5.1-or32-1.0rc1
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/cfg80211.c: In function 'ath6kl_set_antenna':
>> drivers/net/wireless/ath/ath6kl/cfg80211.c:3253:2: error: implicit 
>> declaration of function 'ath6kl_wmi_set_antenna'
--
   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
   drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: warning: assignment from 
incompatible pointer type
>> drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'tx_ant'
>> drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'rx_ant'

vim +/ath6kl_wmi_set_antenna +3253 drivers/net/wireless/ath/ath6kl/cfg80211.c

  3247  if (!tx_ant || !rx_ant)
  3248  return -EINVAL;
  3249  
  3250  ar->hw.tx_ant = tx_ant;
  3251  ar->hw.rx_ant = rx_ant;
  3252  
> 3253  return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
  3254  tx_ant, rx_ant);
  3255  }
  3256  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Hello Julian,

It was an assumption on my part that the firmware supports a SET
function. I realize it was premature to do so. I am sending another
patch to convert the ath6kl_set_antenna() to a NO-OP. This will take
care of the kernel warning, but would not fire any commands to
firmware. I hope this solution is acceptable.

Thanks,
Prasun

On Thu, Jun 9, 2016 at 5:35 AM, Julian Calaby  wrote:
> Hi Prasun,
>
> On Thu, Jun 9, 2016 at 1:20 AM, Prasun Maiti  wrote:
>> I am not sure it works fine. Like ath6kl driver send another cmd to
>> firmare, I have just filled up the cmd buffer with "tx_ant", and
>> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
>> buffer to firmware.
>> I have resend the patch as there are some errors in the previous patch.
>> Let me know if any modifications are needed?
>
> Let me ask the question in another way: how do you know that the
> command WMI_SET_ANTENNA_CMDID exists, has that number, takes arguments
> in that format and works?
>
> Thanks,
>
> Julian Calaby
>
>
>> On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
>>> Prasun Maiti  writes:
>>>
 No. I did not any test for that case.
 This driver create a new wiphy for use with cfg80211 through
 "wiphy_new_nm" api, but in this api, I found that more warnings for
 inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
 !ops->get_antenna);"
 So, warning comes during creation of a new wiphy. That's why It is needed.
>>>
>>> I'm confused. Are you really saying that you added a new firmware
>>> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
>>> way? How do you know that it works then?
>>>
>>> --
>>> Kalle Valo
>>
>>
>>
>> --
>> Thanks,
>> Prasun
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Julian Calaby
>
> Email: julian.cal...@gmail.com
> Profile: http://www.google.com/profiles/julian.calaby/



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Hello Julian,

It was an assumption on my part that the firmware supports a SET
function. I realize it was premature to do so. I am sending another
patch to convert the ath6kl_set_antenna() to a NO-OP. This will take
care of the kernel warning, but would not fire any commands to
firmware. I hope this solution is acceptable.

Thanks,
Prasun

On Thu, Jun 9, 2016 at 5:35 AM, Julian Calaby  wrote:
> Hi Prasun,
>
> On Thu, Jun 9, 2016 at 1:20 AM, Prasun Maiti  wrote:
>> I am not sure it works fine. Like ath6kl driver send another cmd to
>> firmare, I have just filled up the cmd buffer with "tx_ant", and
>> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
>> buffer to firmware.
>> I have resend the patch as there are some errors in the previous patch.
>> Let me know if any modifications are needed?
>
> Let me ask the question in another way: how do you know that the
> command WMI_SET_ANTENNA_CMDID exists, has that number, takes arguments
> in that format and works?
>
> Thanks,
>
> Julian Calaby
>
>
>> On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
>>> Prasun Maiti  writes:
>>>
 No. I did not any test for that case.
 This driver create a new wiphy for use with cfg80211 through
 "wiphy_new_nm" api, but in this api, I found that more warnings for
 inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
 !ops->get_antenna);"
 So, warning comes during creation of a new wiphy. That's why It is needed.
>>>
>>> I'm confused. Are you really saying that you added a new firmware
>>> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
>>> way? How do you know that it works then?
>>>
>>> --
>>> Kalle Valo
>>
>>
>>
>> --
>> Thanks,
>> Prasun
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Julian Calaby
>
> Email: julian.cal...@gmail.com
> Profile: http://www.google.com/profiles/julian.calaby/



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Julian Calaby
Hi Prasun,

On Thu, Jun 9, 2016 at 1:20 AM, Prasun Maiti  wrote:
> I am not sure it works fine. Like ath6kl driver send another cmd to
> firmare, I have just filled up the cmd buffer with "tx_ant", and
> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
> buffer to firmware.
> I have resend the patch as there are some errors in the previous patch.
> Let me know if any modifications are needed?

Let me ask the question in another way: how do you know that the
command WMI_SET_ANTENNA_CMDID exists, has that number, takes arguments
in that format and works?

Thanks,

Julian Calaby


> On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
>> Prasun Maiti  writes:
>>
>>> No. I did not any test for that case.
>>> This driver create a new wiphy for use with cfg80211 through
>>> "wiphy_new_nm" api, but in this api, I found that more warnings for
>>> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
>>> !ops->get_antenna);"
>>> So, warning comes during creation of a new wiphy. That's why It is needed.
>>
>> I'm confused. Are you really saying that you added a new firmware
>> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
>> way? How do you know that it works then?
>>
>> --
>> Kalle Valo
>
>
>
> --
> Thanks,
> Prasun
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Julian Calaby
Hi Prasun,

On Thu, Jun 9, 2016 at 1:20 AM, Prasun Maiti  wrote:
> I am not sure it works fine. Like ath6kl driver send another cmd to
> firmare, I have just filled up the cmd buffer with "tx_ant", and
> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
> buffer to firmware.
> I have resend the patch as there are some errors in the previous patch.
> Let me know if any modifications are needed?

Let me ask the question in another way: how do you know that the
command WMI_SET_ANTENNA_CMDID exists, has that number, takes arguments
in that format and works?

Thanks,

Julian Calaby


> On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
>> Prasun Maiti  writes:
>>
>>> No. I did not any test for that case.
>>> This driver create a new wiphy for use with cfg80211 through
>>> "wiphy_new_nm" api, but in this api, I found that more warnings for
>>> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
>>> !ops->get_antenna);"
>>> So, warning comes during creation of a new wiphy. That's why It is needed.
>>
>> I'm confused. Are you really saying that you added a new firmware
>> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
>> way? How do you know that it works then?
>>
>> --
>> Kalle Valo
>
>
>
> --
> Thanks,
> Prasun
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Ben Greear

On 06/08/2016 08:56 AM, Prasun Maiti wrote:

Please help me how to test this one?? It will be great to me if you help me.


I do not have time or interest, sorry.  You basically need access to
firmware source to do any useful development on this driver in my opinion,
and I do not have access to that source.

Why are you so concerned about the warning anyway?

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:21 PM, Ben Greear  wrote:

On 06/08/2016 08:46 AM, Prasun Maiti wrote:


Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?



In my experience, ath6kl has very fragile and buggy firmware, so I would
not add any new API to it unless you have tested this thoroughly.

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle 
wrote:


Prasun Maiti  writes:


I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware. I have resend the patch as there are some errors
in the previous patch. Let me know if any modifications are needed?



I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

--
Kalle Valo








--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com








--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com



Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Ben Greear

On 06/08/2016 08:56 AM, Prasun Maiti wrote:

Please help me how to test this one?? It will be great to me if you help me.


I do not have time or interest, sorry.  You basically need access to
firmware source to do any useful development on this driver in my opinion,
and I do not have access to that source.

Why are you so concerned about the warning anyway?

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:21 PM, Ben Greear  wrote:

On 06/08/2016 08:46 AM, Prasun Maiti wrote:


Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?



In my experience, ath6kl has very fragile and buggy firmware, so I would
not add any new API to it unless you have tested this thoroughly.

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle 
wrote:


Prasun Maiti  writes:


I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware. I have resend the patch as there are some errors
in the previous patch. Let me know if any modifications are needed?



I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

--
Kalle Valo








--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com








--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com



Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Please help me how to test this one?? It will be great to me if you help me.

On Wed, Jun 8, 2016 at 9:21 PM, Ben Greear  wrote:
> On 06/08/2016 08:46 AM, Prasun Maiti wrote:
>>
>> Please tell me if I mention that this code is untested in commit log,
>> then could you check the code kindly and also help me to fix this type
>> of warning?
>
>
> In my experience, ath6kl has very fragile and buggy firmware, so I would
> not add any new API to it unless you have tested this thoroughly.
>
> Thanks,
> Ben
>
>>
>> On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle 
>> wrote:
>>>
>>> Prasun Maiti  writes:
>>>
 I am not sure it works fine. Like ath6kl driver send another cmd to
 firmare, I have just filled up the cmd buffer with "tx_ant", and
 "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
 buffer to firmware. I have resend the patch as there are some errors
 in the previous patch. Let me know if any modifications are needed?
>>>
>>>
>>> I don't take untested code. In some special cases it might be ok to send
>>> untested code but even then it needs to be clearly stated in the commit
>>> log that it's untested.
>>>
>>> Please resend once you have tested this, I'm dropping this now.
>>>
>>> --
>>> Kalle Valo
>>
>>
>>
>>
>
>
> --
> Ben Greear 
> Candela Technologies Inc  http://www.candelatech.com
>



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Please help me how to test this one?? It will be great to me if you help me.

On Wed, Jun 8, 2016 at 9:21 PM, Ben Greear  wrote:
> On 06/08/2016 08:46 AM, Prasun Maiti wrote:
>>
>> Please tell me if I mention that this code is untested in commit log,
>> then could you check the code kindly and also help me to fix this type
>> of warning?
>
>
> In my experience, ath6kl has very fragile and buggy firmware, so I would
> not add any new API to it unless you have tested this thoroughly.
>
> Thanks,
> Ben
>
>>
>> On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle 
>> wrote:
>>>
>>> Prasun Maiti  writes:
>>>
 I am not sure it works fine. Like ath6kl driver send another cmd to
 firmare, I have just filled up the cmd buffer with "tx_ant", and
 "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
 buffer to firmware. I have resend the patch as there are some errors
 in the previous patch. Let me know if any modifications are needed?
>>>
>>>
>>> I don't take untested code. In some special cases it might be ok to send
>>> untested code but even then it needs to be clearly stated in the commit
>>> log that it's untested.
>>>
>>> Please resend once you have tested this, I'm dropping this now.
>>>
>>> --
>>> Kalle Valo
>>
>>
>>
>>
>
>
> --
> Ben Greear 
> Candela Technologies Inc  http://www.candelatech.com
>



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Ben Greear

On 06/08/2016 08:46 AM, Prasun Maiti wrote:

Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?


In my experience, ath6kl has very fragile and buggy firmware, so I would
not add any new API to it unless you have tested this thoroughly.

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle  wrote:

Prasun Maiti  writes:


I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware. I have resend the patch as there are some errors
in the previous patch. Let me know if any modifications are needed?


I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

--
Kalle Valo







--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com



Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Ben Greear

On 06/08/2016 08:46 AM, Prasun Maiti wrote:

Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?


In my experience, ath6kl has very fragile and buggy firmware, so I would
not add any new API to it unless you have tested this thoroughly.

Thanks,
Ben



On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle  wrote:

Prasun Maiti  writes:


I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware. I have resend the patch as there are some errors
in the previous patch. Let me know if any modifications are needed?


I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

--
Kalle Valo







--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com



Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?

On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> I am not sure it works fine. Like ath6kl driver send another cmd to
>> firmare, I have just filled up the cmd buffer with "tx_ant", and
>> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
>> buffer to firmware. I have resend the patch as there are some errors
>> in the previous patch. Let me know if any modifications are needed?
>
> I don't take untested code. In some special cases it might be ok to send
> untested code but even then it needs to be clearly stated in the commit
> log that it's untested.
>
> Please resend once you have tested this, I'm dropping this now.
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Please tell me if I mention that this code is untested in commit log,
then could you check the code kindly and also help me to fix this type
of warning?

On Wed, Jun 8, 2016 at 9:00 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> I am not sure it works fine. Like ath6kl driver send another cmd to
>> firmare, I have just filled up the cmd buffer with "tx_ant", and
>> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
>> buffer to firmware. I have resend the patch as there are some errors
>> in the previous patch. Let me know if any modifications are needed?
>
> I don't take untested code. In some special cases it might be ok to send
> untested code but even then it needs to be clearly stated in the commit
> log that it's untested.
>
> Please resend once you have tested this, I'm dropping this now.
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> I am not sure it works fine. Like ath6kl driver send another cmd to
> firmare, I have just filled up the cmd buffer with "tx_ant", and
> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
> buffer to firmware. I have resend the patch as there are some errors
> in the previous patch. Let me know if any modifications are needed?

I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

-- 
Kalle Valo


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> I am not sure it works fine. Like ath6kl driver send another cmd to
> firmare, I have just filled up the cmd buffer with "tx_ant", and
> "rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
> buffer to firmware. I have resend the patch as there are some errors
> in the previous patch. Let me know if any modifications are needed?

I don't take untested code. In some special cases it might be ok to send
untested code but even then it needs to be clearly stated in the commit
log that it's untested.

Please resend once you have tested this, I'm dropping this now.

-- 
Kalle Valo


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware.
I have resend the patch as there are some errors in the previous patch.
Let me know if any modifications are needed?


On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> No. I did not any test for that case.
>> This driver create a new wiphy for use with cfg80211 through
>> "wiphy_new_nm" api, but in this api, I found that more warnings for
>> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
>> !ops->get_antenna);"
>> So, warning comes during creation of a new wiphy. That's why It is needed.
>
> I'm confused. Are you really saying that you added a new firmware
> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
> way? How do you know that it works then?
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
I am not sure it works fine. Like ath6kl driver send another cmd to
firmare, I have just filled up the cmd buffer with "tx_ant", and
"rx_ant" values, then use "ath6kl_wmi_cmd_send()" api to send the cmd
buffer to firmware.
I have resend the patch as there are some errors in the previous patch.
Let me know if any modifications are needed?


On Wed, Jun 8, 2016 at 8:16 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> No. I did not any test for that case.
>> This driver create a new wiphy for use with cfg80211 through
>> "wiphy_new_nm" api, but in this api, I found that more warnings for
>> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
>> !ops->get_antenna);"
>> So, warning comes during creation of a new wiphy. That's why It is needed.
>
> I'm confused. Are you really saying that you added a new firmware
> command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
> way? How do you know that it works then?
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> No. I did not any test for that case.
> This driver create a new wiphy for use with cfg80211 through
> "wiphy_new_nm" api, but in this api, I found that more warnings for
> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
> !ops->get_antenna);"
> So, warning comes during creation of a new wiphy. That's why It is needed.

I'm confused. Are you really saying that you added a new firmware
command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
way? How do you know that it works then?

-- 
Kalle Valo


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> No. I did not any test for that case.
> This driver create a new wiphy for use with cfg80211 through
> "wiphy_new_nm" api, but in this api, I found that more warnings for
> inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
> !ops->get_antenna);"
> So, warning comes during creation of a new wiphy. That's why It is needed.

I'm confused. Are you really saying that you added a new firmware
command (WMI_SET_ANTENNA_CMDID) to ath6kl but you didn't test it in any
way? How do you know that it works then?

-- 
Kalle Valo


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread kbuild test robot
Hi,

[auto build test WARNING on ath6kl/ath-next]
[also build test WARNING on v4.7-rc2 next-20160608]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: warning: assignment from 
>> incompatible pointer type
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
   drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^
   drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^

vim +1618 drivers/net/wireless/ath/ath6kl/wmi.c

  1602  cfg80211_cqm_txe_notify(vif->ndev, vif->bssid, pkts,
  1603  rate, vif->txe_intvl, GFP_KERNEL);
  1604  
  1605  return 0;
  1606  }
  1607  
  1608  int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
  1609u32 tx_ant, u32 rx_ant)
  1610  {
  1611  struct sk_buff *skb;
  1612  struct wmi_txe_notify_cmd *cmd;
  1613  
  1614  skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
  1615  if (!skb)
  1616  return -ENOMEM;
  1617  
> 1618  cmd = (struct wmi_set_antenna_cmd *) skb->data;
  1619  cmd->tx_ant = cpu_to_le32(tx_ant);
  1620  cmd->rx_ant = cpu_to_le32(rx_ant);
  1621  
  1622  return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
  1623  NO_SYNC_WMIFLAG);
  1624  }
  1625  
  1626  int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread kbuild test robot
Hi,

[auto build test WARNING on ath6kl/ath-next]
[also build test WARNING on v4.7-rc2 next-20160608]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-202420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: warning: assignment from 
>> incompatible pointer type
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
   drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^
   drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^

vim +1618 drivers/net/wireless/ath/ath6kl/wmi.c

  1602  cfg80211_cqm_txe_notify(vif->ndev, vif->bssid, pkts,
  1603  rate, vif->txe_intvl, GFP_KERNEL);
  1604  
  1605  return 0;
  1606  }
  1607  
  1608  int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
  1609u32 tx_ant, u32 rx_ant)
  1610  {
  1611  struct sk_buff *skb;
  1612  struct wmi_txe_notify_cmd *cmd;
  1613  
  1614  skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
  1615  if (!skb)
  1616  return -ENOMEM;
  1617  
> 1618  cmd = (struct wmi_set_antenna_cmd *) skb->data;
  1619  cmd->tx_ant = cpu_to_le32(tx_ant);
  1620  cmd->rx_ant = cpu_to_le32(rx_ant);
  1621  
  1622  return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
  1623  NO_SYNC_WMIFLAG);
  1624  }
  1625  
  1626  int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
No. I did not any test for that case.
This driver create a new wiphy for use with cfg80211 through
"wiphy_new_nm" api, but in this api, I found that more warnings for
inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
!ops->get_antenna);"
So, warning comes during creation of a new wiphy. That's why It is needed.

On Wed, Jun 8, 2016 at 7:53 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> Since add more warnings for inconsistent ops in cfg80211, the wireless
>> core warns if a driver implements a cfg80211 callback but doesn't
>> implements the inverse operation. The ath6kl driver implements a cfg80211
>> .get_antenna operation handler but doesn't have the inverse .set_antenna
>> callback. So, it makes warning.
>>
>> To remove this warning, add .set_antenna callback in ath6kl driver and
>> also send a cmd to firmware with it's values.
>>
>> Signed-off-by: Prasun Maiti 
>
> Did you test this? What hardware and firmware version?
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
No. I did not any test for that case.
This driver create a new wiphy for use with cfg80211 through
"wiphy_new_nm" api, but in this api, I found that more warnings for
inconsistent ops are added there. e.g; "WARN_ON(ops->set_antenna &&
!ops->get_antenna);"
So, warning comes during creation of a new wiphy. That's why It is needed.

On Wed, Jun 8, 2016 at 7:53 PM, Valo, Kalle  wrote:
> Prasun Maiti  writes:
>
>> Since add more warnings for inconsistent ops in cfg80211, the wireless
>> core warns if a driver implements a cfg80211 callback but doesn't
>> implements the inverse operation. The ath6kl driver implements a cfg80211
>> .get_antenna operation handler but doesn't have the inverse .set_antenna
>> callback. So, it makes warning.
>>
>> To remove this warning, add .set_antenna callback in ath6kl driver and
>> also send a cmd to firmware with it's values.
>>
>> Signed-off-by: Prasun Maiti 
>
> Did you test this? What hardware and firmware version?
>
> --
> Kalle Valo



-- 
Thanks,
Prasun


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> Since add more warnings for inconsistent ops in cfg80211, the wireless
> core warns if a driver implements a cfg80211 callback but doesn't
> implements the inverse operation. The ath6kl driver implements a cfg80211
> .get_antenna operation handler but doesn't have the inverse .set_antenna
> callback. So, it makes warning.
>
> To remove this warning, add .set_antenna callback in ath6kl driver and
> also send a cmd to firmware with it's values.
>
> Signed-off-by: Prasun Maiti 

Did you test this? What hardware and firmware version?

-- 
Kalle Valo


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Valo, Kalle
Prasun Maiti  writes:

> Since add more warnings for inconsistent ops in cfg80211, the wireless
> core warns if a driver implements a cfg80211 callback but doesn't
> implements the inverse operation. The ath6kl driver implements a cfg80211
> .get_antenna operation handler but doesn't have the inverse .set_antenna
> callback. So, it makes warning.
>
> To remove this warning, add .set_antenna callback in ath6kl driver and
> also send a cmd to firmware with it's values.
>
> Signed-off-by: Prasun Maiti 

Did you test this? What hardware and firmware version?

-- 
Kalle Valo


[PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Since add more warnings for inconsistent ops in cfg80211, the wireless
core warns if a driver implements a cfg80211 callback but doesn't
implements the inverse operation. The ath6kl driver implements a cfg80211
.get_antenna operation handler but doesn't have the inverse .set_antenna
callback. So, it makes warning.

To remove this warning, add .set_antenna callback in ath6kl driver and
also send a cmd to firmware with it's values.

Signed-off-by: Prasun Maiti 
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 24 
 drivers/net/wireless/ath/ath6kl/wmi.c  | 18 ++
 drivers/net/wireless/ath/ath6kl/wmi.h  |  6 ++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c 
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..0d51228 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3231,6 +3231,29 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct 
wireless_dev *wdev,
wait, buf, len, no_cck);
 }
 
+static int ath6kl_set_antenna(struct wiphy *wiphy,
+   u32 tx_ant, u32 rx_ant)
+{
+   struct ath6kl *ar = wiphy_priv(wiphy);
+   struct ath6kl_vif *vif = NULL;
+
+   vif = ath6kl_vif_first(ar);
+   if (!vif)
+   return -EIO;
+
+   if (!ath6kl_cfg80211_ready(vif))
+   return -EIO;
+
+   if (!tx_ant || !rx_ant)
+   return -EINVAL;
+
+   ar->hw.tx_ant = tx_ant;
+   ar->hw.rx_ant = rx_ant;
+
+   return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
+   tx_ant, rx_ant);
+}
+
 static int ath6kl_get_antenna(struct wiphy *wiphy,
  u32 *tx_ant, u32 *rx_ant)
 {
@@ -3456,6 +3479,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
.mgmt_tx = ath6kl_mgmt_tx,
.mgmt_frame_register = ath6kl_mgmt_frame_register,
+   .set_antenna = ath6kl_set_antenna,
.get_antenna = ath6kl_get_antenna,
.sched_scan_start = ath6kl_cfg80211_sscan_start,
.sched_scan_stop = ath6kl_cfg80211_sscan_stop,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c 
b/drivers/net/wireless/ath/ath6kl/wmi.c
index 631c3a0..300ccc6 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1605,6 +1605,24 @@ static int ath6kl_wmi_txe_notify_event_rx(struct wmi 
*wmi, u8 *datap, int len,
return 0;
 }
 
+int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
+ u32 tx_ant, u32 rx_ant)
+{
+   struct sk_buff *skb;
+   struct wmi_txe_notify_cmd *cmd;
+
+   skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
+   if (!skb)
+   return -ENOMEM;
+
+   cmd = (struct wmi_set_antenna_cmd *) skb->data;
+   cmd->tx_ant = cpu_to_le32(tx_ant);
+   cmd->rx_ant = cpu_to_le32(rx_ant);
+
+   return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
+   NO_SYNC_WMIFLAG);
+}
+
 int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,
  u32 rate, u32 pkts, u32 intvl)
 {
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h 
b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3af464a..f2e65b3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -642,6 +642,7 @@ enum wmi_cmd_id {
WMI_SET_RECOVERY_TEST_PARAMETER_CMDID, /*0xf094*/
 
WMI_ENABLE_SCHED_SCAN_CMDID,
+   WMI_SET_ANTENNA_CMDID,
 };
 
 enum wmi_mgmt_frame_type {
@@ -2312,6 +2313,11 @@ struct wmi_ap_set_apsd_cmd {
u8 enable;
 } __packed;
 
+struct wmi_set_antenna_cmd {
+   __le32 tx_ant;
+   __le32 rx_ant;
+} __packed;
+
 enum wmi_ap_apsd_buffered_traffic_flags {
WMI_AP_APSD_NO_DELIVERY_FRAMES =  0x1,
 };
-- 
1.9.1



[PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Since add more warnings for inconsistent ops in cfg80211, the wireless
core warns if a driver implements a cfg80211 callback but doesn't
implements the inverse operation. The ath6kl driver implements a cfg80211
.get_antenna operation handler but doesn't have the inverse .set_antenna
callback. So, it makes warning.

To remove this warning, add .set_antenna callback in ath6kl driver and
also send a cmd to firmware with it's values.

Signed-off-by: Prasun Maiti 
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 24 
 drivers/net/wireless/ath/ath6kl/wmi.c  | 18 ++
 drivers/net/wireless/ath/ath6kl/wmi.h  |  6 ++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c 
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..0d51228 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3231,6 +3231,29 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct 
wireless_dev *wdev,
wait, buf, len, no_cck);
 }
 
+static int ath6kl_set_antenna(struct wiphy *wiphy,
+   u32 tx_ant, u32 rx_ant)
+{
+   struct ath6kl *ar = wiphy_priv(wiphy);
+   struct ath6kl_vif *vif = NULL;
+
+   vif = ath6kl_vif_first(ar);
+   if (!vif)
+   return -EIO;
+
+   if (!ath6kl_cfg80211_ready(vif))
+   return -EIO;
+
+   if (!tx_ant || !rx_ant)
+   return -EINVAL;
+
+   ar->hw.tx_ant = tx_ant;
+   ar->hw.rx_ant = rx_ant;
+
+   return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
+   tx_ant, rx_ant);
+}
+
 static int ath6kl_get_antenna(struct wiphy *wiphy,
  u32 *tx_ant, u32 *rx_ant)
 {
@@ -3456,6 +3479,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
.mgmt_tx = ath6kl_mgmt_tx,
.mgmt_frame_register = ath6kl_mgmt_frame_register,
+   .set_antenna = ath6kl_set_antenna,
.get_antenna = ath6kl_get_antenna,
.sched_scan_start = ath6kl_cfg80211_sscan_start,
.sched_scan_stop = ath6kl_cfg80211_sscan_stop,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c 
b/drivers/net/wireless/ath/ath6kl/wmi.c
index 631c3a0..300ccc6 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1605,6 +1605,24 @@ static int ath6kl_wmi_txe_notify_event_rx(struct wmi 
*wmi, u8 *datap, int len,
return 0;
 }
 
+int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
+ u32 tx_ant, u32 rx_ant)
+{
+   struct sk_buff *skb;
+   struct wmi_txe_notify_cmd *cmd;
+
+   skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
+   if (!skb)
+   return -ENOMEM;
+
+   cmd = (struct wmi_set_antenna_cmd *) skb->data;
+   cmd->tx_ant = cpu_to_le32(tx_ant);
+   cmd->rx_ant = cpu_to_le32(rx_ant);
+
+   return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
+   NO_SYNC_WMIFLAG);
+}
+
 int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,
  u32 rate, u32 pkts, u32 intvl)
 {
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h 
b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3af464a..f2e65b3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -642,6 +642,7 @@ enum wmi_cmd_id {
WMI_SET_RECOVERY_TEST_PARAMETER_CMDID, /*0xf094*/
 
WMI_ENABLE_SCHED_SCAN_CMDID,
+   WMI_SET_ANTENNA_CMDID,
 };
 
 enum wmi_mgmt_frame_type {
@@ -2312,6 +2313,11 @@ struct wmi_ap_set_apsd_cmd {
u8 enable;
 } __packed;
 
+struct wmi_set_antenna_cmd {
+   __le32 tx_ant;
+   __le32 rx_ant;
+} __packed;
+
 enum wmi_ap_apsd_buffered_traffic_flags {
WMI_AP_APSD_NO_DELIVERY_FRAMES =  0x1,
 };
-- 
1.9.1



Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160608]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-191104
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-randconfig-i0-201623 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/cfg80211.c: In function 'ath6kl_set_antenna':
>> drivers/net/wireless/ath/ath6kl/cfg80211.c:3253:9: error: implicit 
>> declaration of function 'ath6kl_wmi_set_antenna' 
>> [-Werror=implicit-function-declaration]
 return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
^~
   cc1: some warnings being treated as errors
--
   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: error: assignment from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
>> drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^~
>> drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^~
   cc1: some warnings being treated as errors

vim +/ath6kl_wmi_set_antenna +3253 drivers/net/wireless/ath/ath6kl/cfg80211.c

  3247  if (!tx_ant || !rx_ant)
  3248  return -EINVAL;
  3249  
  3250  ar->hw.tx_ant = tx_ant;
  3251  ar->hw.rx_ant = rx_ant;
  3252  
> 3253  return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
  3254  tx_ant, rx_ant);
  3255  }
  3256  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread kbuild test robot
Hi,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.7-rc2 next-20160608]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Prasun-Maiti/Add-set_antenna-callback-in-ath6kl-driver-to-remove-wireless-core-warns/20160608-191104
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: x86_64-randconfig-i0-201623 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath6kl/cfg80211.c: In function 'ath6kl_set_antenna':
>> drivers/net/wireless/ath/ath6kl/cfg80211.c:3253:9: error: implicit 
>> declaration of function 'ath6kl_wmi_set_antenna' 
>> [-Werror=implicit-function-declaration]
 return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
^~
   cc1: some warnings being treated as errors
--
   drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_set_antenna':
>> drivers/net/wireless/ath/ath6kl/wmi.c:1618:6: error: assignment from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 cmd = (struct wmi_set_antenna_cmd *) skb->data;
 ^
>> drivers/net/wireless/ath/ath6kl/wmi.c:1619:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'tx_ant'
 cmd->tx_ant = cpu_to_le32(tx_ant);
^~
>> drivers/net/wireless/ath/ath6kl/wmi.c:1620:5: error: 'struct 
>> wmi_txe_notify_cmd' has no member named 'rx_ant'
 cmd->rx_ant = cpu_to_le32(rx_ant);
^~
   cc1: some warnings being treated as errors

vim +/ath6kl_wmi_set_antenna +3253 drivers/net/wireless/ath/ath6kl/cfg80211.c

  3247  if (!tx_ant || !rx_ant)
  3248  return -EINVAL;
  3249  
  3250  ar->hw.tx_ant = tx_ant;
  3251  ar->hw.rx_ant = rx_ant;
  3252  
> 3253  return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
  3254  tx_ant, rx_ant);
  3255  }
  3256  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


[PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Since add more warnings for inconsistent ops in cfg80211, the wireless
core warns if a driver implements a cfg80211 callback but doesn't
implements the inverse operation. The ath6kl driver implements a cfg80211
.get_antenna operation handler but doesn't have the inverse .set_antenna
callback. So, it makes warning.

To remove this warning, add .set_antenna callback in ath6kl driver and
also send a cmd to firmware with it's values.

Signed-off-by: Prasun Maiti 
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 24 
 drivers/net/wireless/ath/ath6kl/wmi.c  | 18 ++
 drivers/net/wireless/ath/ath6kl/wmi.h  |  6 ++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c 
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..0d51228 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3231,6 +3231,29 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct 
wireless_dev *wdev,
wait, buf, len, no_cck);
 }
 
+static int ath6kl_set_antenna(struct wiphy *wiphy,
+   u32 tx_ant, u32 rx_ant)
+{
+   struct ath6kl *ar = wiphy_priv(wiphy);
+   struct ath6kl_vif *vif = NULL;
+
+   vif = ath6kl_vif_first(ar);
+   if (!vif)
+   return -EIO;
+
+   if (!ath6kl_cfg80211_ready(vif))
+   return -EIO;
+
+   if (!tx_ant || !rx_ant)
+   return -EINVAL;
+
+   ar->hw.tx_ant = tx_ant;
+   ar->hw.rx_ant = rx_ant;
+
+   return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
+   tx_ant, rx_ant);
+}
+
 static int ath6kl_get_antenna(struct wiphy *wiphy,
  u32 *tx_ant, u32 *rx_ant)
 {
@@ -3456,6 +3479,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
.mgmt_tx = ath6kl_mgmt_tx,
.mgmt_frame_register = ath6kl_mgmt_frame_register,
+   .set_antenna = ath6kl_set_antenna,
.get_antenna = ath6kl_get_antenna,
.sched_scan_start = ath6kl_cfg80211_sscan_start,
.sched_scan_stop = ath6kl_cfg80211_sscan_stop,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c 
b/drivers/net/wireless/ath/ath6kl/wmi.c
index 631c3a0..300ccc6 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1605,6 +1605,24 @@ static int ath6kl_wmi_txe_notify_event_rx(struct wmi 
*wmi, u8 *datap, int len,
return 0;
 }
 
+int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
+ u32 tx_ant, u32 rx_ant)
+{
+   struct sk_buff *skb;
+   struct wmi_txe_notify_cmd *cmd;
+
+   skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
+   if (!skb)
+   return -ENOMEM;
+
+   cmd = (struct wmi_set_antenna_cmd *) skb->data;
+   cmd->tx_ant = cpu_to_le32(tx_ant);
+   cmd->rx_ant = cpu_to_le32(rx_ant);
+
+   return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
+   NO_SYNC_WMIFLAG);
+}
+
 int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,
  u32 rate, u32 pkts, u32 intvl)
 {
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h 
b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3af464a..f2e65b3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -642,6 +642,7 @@ enum wmi_cmd_id {
WMI_SET_RECOVERY_TEST_PARAMETER_CMDID, /*0xf094*/
 
WMI_ENABLE_SCHED_SCAN_CMDID,
+   WMI_SET_ANTENNA_CMDID,
 };
 
 enum wmi_mgmt_frame_type {
@@ -2312,6 +2313,11 @@ struct wmi_ap_set_apsd_cmd {
u8 enable;
 } __packed;
 
+struct wmi_set_antenna_cmd {
+   __le32 tx_ant;
+   __le32 rx_ant;
+} __packed;
+
 enum wmi_ap_apsd_buffered_traffic_flags {
WMI_AP_APSD_NO_DELIVERY_FRAMES =  0x1,
 };
-- 
1.9.1



[PATCH] Add .set_antenna callback in ath6kl driver to remove wireless core warns

2016-06-08 Thread Prasun Maiti
Since add more warnings for inconsistent ops in cfg80211, the wireless
core warns if a driver implements a cfg80211 callback but doesn't
implements the inverse operation. The ath6kl driver implements a cfg80211
.get_antenna operation handler but doesn't have the inverse .set_antenna
callback. So, it makes warning.

To remove this warning, add .set_antenna callback in ath6kl driver and
also send a cmd to firmware with it's values.

Signed-off-by: Prasun Maiti 
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 24 
 drivers/net/wireless/ath/ath6kl/wmi.c  | 18 ++
 drivers/net/wireless/ath/ath6kl/wmi.h  |  6 ++
 3 files changed, 48 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c 
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..0d51228 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3231,6 +3231,29 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct 
wireless_dev *wdev,
wait, buf, len, no_cck);
 }
 
+static int ath6kl_set_antenna(struct wiphy *wiphy,
+   u32 tx_ant, u32 rx_ant)
+{
+   struct ath6kl *ar = wiphy_priv(wiphy);
+   struct ath6kl_vif *vif = NULL;
+
+   vif = ath6kl_vif_first(ar);
+   if (!vif)
+   return -EIO;
+
+   if (!ath6kl_cfg80211_ready(vif))
+   return -EIO;
+
+   if (!tx_ant || !rx_ant)
+   return -EINVAL;
+
+   ar->hw.tx_ant = tx_ant;
+   ar->hw.rx_ant = rx_ant;
+
+   return ath6kl_wmi_set_antenna(ar->wmi, vif->fw_vif_idx,
+   tx_ant, rx_ant);
+}
+
 static int ath6kl_get_antenna(struct wiphy *wiphy,
  u32 *tx_ant, u32 *rx_ant)
 {
@@ -3456,6 +3479,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
.mgmt_tx = ath6kl_mgmt_tx,
.mgmt_frame_register = ath6kl_mgmt_frame_register,
+   .set_antenna = ath6kl_set_antenna,
.get_antenna = ath6kl_get_antenna,
.sched_scan_start = ath6kl_cfg80211_sscan_start,
.sched_scan_stop = ath6kl_cfg80211_sscan_stop,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c 
b/drivers/net/wireless/ath/ath6kl/wmi.c
index 631c3a0..300ccc6 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1605,6 +1605,24 @@ static int ath6kl_wmi_txe_notify_event_rx(struct wmi 
*wmi, u8 *datap, int len,
return 0;
 }
 
+int ath6kl_wmi_set_antenna(struct wmi *wmi, u8 idx,
+ u32 tx_ant, u32 rx_ant)
+{
+   struct sk_buff *skb;
+   struct wmi_txe_notify_cmd *cmd;
+
+   skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
+   if (!skb)
+   return -ENOMEM;
+
+   cmd = (struct wmi_set_antenna_cmd *) skb->data;
+   cmd->tx_ant = cpu_to_le32(tx_ant);
+   cmd->rx_ant = cpu_to_le32(rx_ant);
+
+   return ath6kl_wmi_cmd_send(wmi, idx, skb, WMI_SET_ANTENNA_CMDID,
+   NO_SYNC_WMIFLAG);
+}
+
 int ath6kl_wmi_set_txe_notify(struct wmi *wmi, u8 idx,
  u32 rate, u32 pkts, u32 intvl)
 {
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h 
b/drivers/net/wireless/ath/ath6kl/wmi.h
index 3af464a..f2e65b3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -642,6 +642,7 @@ enum wmi_cmd_id {
WMI_SET_RECOVERY_TEST_PARAMETER_CMDID, /*0xf094*/
 
WMI_ENABLE_SCHED_SCAN_CMDID,
+   WMI_SET_ANTENNA_CMDID,
 };
 
 enum wmi_mgmt_frame_type {
@@ -2312,6 +2313,11 @@ struct wmi_ap_set_apsd_cmd {
u8 enable;
 } __packed;
 
+struct wmi_set_antenna_cmd {
+   __le32 tx_ant;
+   __le32 rx_ant;
+} __packed;
+
 enum wmi_ap_apsd_buffered_traffic_flags {
WMI_AP_APSD_NO_DELIVERY_FRAMES =  0x1,
 };
-- 
1.9.1