All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yeoh Chun-Yeow <yeohchunyeow@gmail.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Vu Hai NGUYEN <vh.nguyen@actiasodielec.fr>,
	Patrick CARNEIRO RODRIGUEZ <p.carneiro@actiasodielec.fr>,
	Ben Greear <greearb@candelatech.com>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	Avery Pennarun <apenwarr@gmail.com>
Subject: Re: [PATCH] ath10k: support get/set antenna configurations.
Date: Thu, 15 May 2014 12:04:43 +0800	[thread overview]
Message-ID: <CAEFj9861oYh=RDOxSgLev0L713dQnzez+1ja5duufAdhTJ4jKA@mail.gmail.com> (raw)
In-Reply-To: <87mwekh7ds.fsf@kamboji.qca.qualcomm.com>

Sorry for all the noise. The patch is indeed working.

I have verified that the number of spatial streams are reduced
accordingly if you reduce the tx chainmask.

----
Chun-Yeow

On Wed, May 14, 2014 at 8:28 PM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Avery Pennarun <apenwarr@gmail.com> writes:
>
>> On Tue, May 13, 2014 at 2:15 PM, Ben Greear <greearb@candelatech.com> wrote:
>>> On 05/13/2014 11:10 AM, Kalle Valo wrote:
>>>>> --- a/drivers/net/wireless/ath/ath10k/wmi.c
>>>>> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
>>>>> @@ -2558,6 +2558,8 @@ static int ath10k_wmi_main_cmd_init(struct ath10k *ar)
>>>>>      config.ast_skid_limit = __cpu_to_le32(TARGET_AST_SKID_LIMIT);
>>>>>      config.tx_chain_mask = __cpu_to_le32(TARGET_TX_CHAIN_MASK);
>>>>>      config.rx_chain_mask = __cpu_to_le32(TARGET_RX_CHAIN_MASK);
>>>>> +    ar->supp_tx_chainmask = TARGET_TX_CHAIN_MASK;
>>>>> +    ar->supp_rx_chainmask = TARGET_RX_CHAIN_MASK;
>>>>>      config.rx_timeout_pri_vo = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI);
>>>>>      config.rx_timeout_pri_vi = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI);
>>>>>      config.rx_timeout_pri_be = __cpu_to_le32(TARGET_RX_TIMEOUT_LO_PRI);
>>>>> @@ -2652,6 +2654,9 @@ static int ath10k_wmi_10x_cmd_init(struct ath10k *ar)
>>>>>      config.ast_skid_limit = __cpu_to_le32(TARGET_10X_AST_SKID_LIMIT);
>>>>>      config.tx_chain_mask = __cpu_to_le32(TARGET_10X_TX_CHAIN_MASK);
>>>>>      config.rx_chain_mask = __cpu_to_le32(TARGET_10X_RX_CHAIN_MASK);
>>>>> +    /* TODO:  Have to deal with 2x2 chips if/when the come out. */
>>>>> +    ar->supp_tx_chainmask = TARGET_10X_TX_CHAIN_MASK;
>>>>> +    ar->supp_rx_chainmask = TARGET_10X_RX_CHAIN_MASK;
>>>>>      config.rx_timeout_pri_vo = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI);
>>>>>      config.rx_timeout_pri_vi = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI);
>>>>>      config.rx_timeout_pri_be = __cpu_to_le32(TARGET_10X_RX_TIMEOUT_LO_PRI);
>>>>
>>>> This initialisation looks out of place as we these variables have
>>>> nothing to do with the actual WMI_INIT_CMDID command. And besides, they
>>>> would get overwritten every time we start the firmware. Is that on
>>>> purpose?
>>>>
>>>> I think we should find more approriate place, for example
>>>> ath10k_mac_register() would be one to look at.
>>>
>>> It doesn't hurt that they are over-written, but probably it
>>> can be done better.
>>
>> As far as I can see, supp_{tx,rx}_chainmask are effectively constants.
>>  So it kind of makes sense to me to initialize them here with a bunch
>> of other constants.  cfg_{tx,rx}_chainmask do not seem to be
>> initialized ever (so I guess they default to zero, and we don't change
>> the antenna mask unless they are set).  I think this looks safe.
>
> The purpose of ath10k_wmi_main_cmd_init() to initiatialise 'struct
> wmi_init_cmd' and send it to the firmware, it should not do anything
> else. Initialisation of the fields in question do not belong to that
> function, that kind of higher level logic should be the responsibility
> of mac.c.
>
> My idea here is that wmi.c is implementening WMI as a protocol, and
> mac.c then just uses wmi.c as protocol abstraction mac.c. The exception
> we have are the WMI event handling and that's just to keep the code
> simple.
>
>>> I'm knee deep in other bugs though...maybe Avery has time to
>>> address this.
>>
>> I'll respin the patch with the other suggested changed.  If you guys
>> think the supp_{tx,rx}_chainmask stuff should be moved elsewhere, let
>> me know where and I can make another one :)
>
> I want to keep the architecture of ath10k clean and that's why I really
> would prefer to have this somewhere else than in wmi.c.
>
> BTW, please also CC linux-wireless when submitting ath10k patches. I
> have documented the process here:
>
> http://wireless.kernel.org/en/users/Drivers/ath10k/sources#Submitting_patches
>
> --
> Kalle Valo
>
> _______________________________________________
> ath10k mailing list
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2014-05-15  4:05 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 16:18 [PATCH v2 2/2] ath10k: support get/set antenna configurations greearb
2014-05-08 16:18 ` greearb
2014-05-12 15:43 ` RE : " Vu Hai NGUYEN
2014-05-12 16:17   ` Ben Greear
2014-05-13  0:49     ` Avery Pennarun
2014-05-13  3:36       ` Ben Greear
2014-05-13 13:08         ` ath10k: set channel by command "iw" not from hostapd and DFS support of firmware-2.bin_10.1.467.2-1 Vu Hai NGUYEN
2014-05-14  9:32           ` Matti Laakso
2014-05-14 11:56             ` RE : " Vu Hai NGUYEN
2014-05-15  8:02               ` Matti Laakso
2014-05-15 10:41                 ` RE : " Vu Hai NGUYEN
2014-05-15 11:11                   ` Janusz Dziedzic
2014-05-15 13:36                     ` RE : " Vu Hai NGUYEN
2014-05-15 16:08                       ` Vu Hai NGUYEN
2014-05-16  6:52                         ` Janusz Dziedzic
2014-05-16  7:01                           ` RE : " Vu Hai NGUYEN
2014-05-16  7:35                             ` Janusz Dziedzic
2014-05-16  7:46                               ` Bartosz Markowski
2014-05-16  8:03                                 ` RE : " Vu Hai NGUYEN
2014-05-16  8:13                                   ` Bartosz Markowski
2014-05-16  9:41                                     ` RE : " Vu Hai NGUYEN
2014-05-16 11:39                                       ` Janusz Dziedzic
2014-05-16 11:50                                         ` Janusz Dziedzic
2014-05-16 13:17                                           ` RE : RE " Vu Hai NGUYEN
2014-05-16 17:40                                             ` Janusz Dziedzic
2014-05-19  9:39                                               ` Vu Hai NGUYEN
2014-05-19 10:42                                                 ` Janusz Dziedzic
2014-05-16 13:00                               ` RE : RE : RE : RE : " Kalle Valo
2014-05-16 14:03                                 ` Janusz Dziedzic
2014-05-16 14:12                                   ` Kalle Valo
2014-05-16  7:41                             ` Matti Laakso
2014-05-15  7:07           ` ath10k: firmware crash in station mode Vu Hai NGUYEN
2014-05-15  7:53             ` Janusz Dziedzic
2014-05-15 10:57             ` Michal Kazior
2014-05-15 13:27               ` RE : " Vu Hai NGUYEN
2014-05-19  6:59                 ` Michal Kazior
2014-05-19  9:47                   ` RE : " Vu Hai NGUYEN
2014-05-19 12:51                     ` Michal Kazior
2014-05-20  6:44                       ` ath10k: firmware crash in station mode & problem DFS Vu Hai NGUYEN
2014-05-20  8:15                         ` RE : " Vu Hai NGUYEN
2014-05-20 17:59                           ` Janusz Dziedzic
2014-05-21  9:43                             ` RE : " Vu Hai NGUYEN
2014-05-21 14:03                               ` Janusz Dziedzic
2014-05-22  7:54                                 ` RE : " Vu Hai NGUYEN
2014-05-22  8:06                                   ` Vu Hai NGUYEN
2014-05-22 12:18                                     ` Janusz Dziedzic
2014-05-22 12:25                                       ` Janusz Dziedzic
2014-05-22 14:40                                         ` RE : " Vu Hai NGUYEN
2014-05-22 14:45                                           ` Vu Hai NGUYEN
2014-05-22 16:44                                           ` RE : " Kalle Valo
     [not found]                                             ` <EE97821C81277E459BEA5C6384C6F241012F109978E8@srvexch01.SODIELEC.local>
     [not found]                                               ` <EE97821C81277E459BEA5C6384C6F241012F109978E9@srvexch01.SODIELEC.local>
2014-05-23  7:40                                                 ` Kalle Valo
2014-05-23  7:52                                                 ` RE : " Vu Hai NGUYEN
2014-05-26  8:34                                                   ` Janusz Dziedzic
2014-05-26 13:45                                                     ` Vu Hai NGUYEN
     [not found]                                                       ` <CAFED-j=i5uhjqaJYL+dm_ui48EFeHG3isHYSSSo=+3gk-Wa5YQ@mail.gmail.com>
2014-05-27  6:50                                                         ` Janusz Dziedzic
2014-05-27  9:21                                                           ` Vu Hai NGUYEN
2014-05-27 16:36                                                           ` Vu Hai NGUYEN
2014-05-28 15:25                                                             ` Vu Hai NGUYEN
2014-05-28 15:49                                                               ` Ben Greear
2014-05-30  9:10                                                                 ` Vu Hai NGUYEN
2014-05-30 14:49                                                                   ` Ben Greear
2014-06-02 16:16                                                                     ` Vu Hai NGUYEN
2014-06-02 16:48                                                                       ` Ben Greear
2014-06-03  6:51                                                                         ` Vu Hai NGUYEN
2014-06-04  4:14                                                                           ` Ben Greear
2014-06-04  9:20                                                                             ` Vu Hai NGUYEN
2014-06-04 16:20                                                                               ` Ben Greear
2014-06-04 21:40                                                                               ` Ben Greear
2014-06-05  8:41                                                                                 ` RE : " Vu Hai NGUYEN
2014-06-05 15:43                                                                                   ` Ben Greear
2014-06-05 17:33                                                                                   ` Ben Greear
2014-06-06  9:05                                                                                     ` RE : " Vu Hai NGUYEN
2014-06-06 15:50                                                                                       ` Ben Greear
2014-06-10  7:15                                                                                         ` Vu Hai NGUYEN
2014-06-10 15:51                                                                                           ` Ben Greear
2014-06-11  7:19                                                                                             ` Vu Hai NGUYEN
2014-06-11 17:05                                                                                               ` Ben Greear
2014-06-12  8:48                                                                                                 ` RE : " Vu Hai NGUYEN
2014-06-12 17:54                                                                                                   ` Ben Greear
2014-06-12 20:22                                                                                                   ` Ben Greear
2014-06-13  8:50                                                                                                     ` Vu Hai NGUYEN
2014-06-13 14:34                                                                                                       ` Ben Greear
2014-06-13 17:04                                                                                                       ` Ben Greear
2014-06-16  7:16                                                                                                         ` Vu Hai NGUYEN
2014-06-16 14:47                                                                                                           ` Ben Greear
2014-06-17  7:25                                                                                                             ` Vu Hai NGUYEN
2014-06-23  9:03                                                                                                               ` Warning message in bridge mode Vu Hai NGUYEN
2014-06-23 21:33                                                                                                                 ` Ben Greear
2014-06-23 21:47                                                                                                                   ` Bruno Antunes
2014-06-24  7:39                                                                                                                     ` RE : " Vu Hai NGUYEN
2014-06-24 15:10                                                                                                                       ` Ben Greear
2014-06-26 14:17                                                                                                                         ` Vu Hai NGUYEN
2014-06-26 14:34                                                                                                                           ` Ben Greear
2014-06-27 15:52                                                                                                                             ` Vu Hai NGUYEN
2014-06-27 15:59                                                                                                                               ` Ben Greear
2014-06-30  8:14                                                                                                                                 ` Vu Hai NGUYEN
2014-06-07  0:28                                                                                       ` RE : RE : RE : RE : RE : ath10k: firmware crash in station mode & problem DFS Ben Greear
2014-05-28 17:19                                                               ` Janusz Dziedzic
2014-05-28 18:40                                                                 ` Janusz Dziedzic
2014-05-30 11:55                                                                   ` Vu Hai NGUYEN
2014-06-02  7:03                                                                     ` Janusz Dziedzic
2014-05-23  7:18                                           ` Michal Kazior
2014-05-23  9:15                       ` RE : RE : ath10k: firmware crash in station mode Yeoh Chun-Yeow
2014-05-23 11:35                         ` RE : " Vu Hai NGUYEN
2014-05-23 14:27                           ` Yeoh Chun-Yeow
2014-05-23 14:55                 ` TR " Vu Hai NGUYEN
2014-05-23 15:36                   ` Yeoh Chun-Yeow
2014-05-23 16:03                     ` Ben Greear
2014-05-24  6:29                       ` Tim Harvey
2014-05-24 16:14                         ` Ben Greear
2014-05-27 19:13                           ` Ben Greear
2014-05-25  7:26                         ` Kalle Valo
2014-05-24  5:49                     ` Tim Harvey
2014-05-24 16:46                       ` Yeoh Chun-Yeow
2014-05-13  0:52     ` [PATCH] ath10k: support get/set antenna configurations Avery Pennarun
2014-05-13 18:10       ` Kalle Valo
2014-05-13 18:15         ` Ben Greear
2014-05-13 21:03           ` Avery Pennarun
2014-05-14 12:28             ` Kalle Valo
2014-05-15  4:04               ` Yeoh Chun-Yeow [this message]
2014-05-15  5:47                 ` Avery Pennarun
2014-05-15  6:51                   ` Yeoh Chun-Yeow
2014-05-15  7:11                 ` Kalle Valo
2014-05-13 21:11       ` [PATCH v3] " Avery Pennarun
2014-05-14  6:20         ` Yeoh Chun-Yeow
2014-05-14  6:21           ` Avery Pennarun
2014-05-14  6:25             ` Yeoh Chun-Yeow
2014-05-14  7:18               ` Avery Pennarun
2014-05-14  7:22                 ` Yeoh Chun-Yeow
2014-05-14  7:33                   ` Yeoh Chun-Yeow
2014-05-16 12:30         ` Kalle Valo
2014-05-16 13:00           ` Ben Greear
2014-05-22 16:56         ` Kalle Valo
2014-05-13 17:50     ` RE : [PATCH v2 2/2] " Kalle Valo

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='CAEFj9861oYh=RDOxSgLev0L713dQnzez+1ja5duufAdhTJ4jKA@mail.gmail.com' \
    --to=yeohchunyeow@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=p.carneiro@actiasodielec.fr \
    --cc=vh.nguyen@actiasodielec.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.