From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Vu Hai NGUYEN <vh.nguyen@actiasodielec.fr>,
Patrick CARNEIRO RODRIGUEZ <p.carneiro@actiasodielec.fr>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
Avery Pennarun <apenwarr@gmail.com>
Subject: Re: [PATCH] ath10k: support get/set antenna configurations.
Date: Tue, 13 May 2014 11:15:36 -0700 [thread overview]
Message-ID: <53726148.3090503@candelatech.com> (raw)
In-Reply-To: <87y4y5h7mc.fsf@kamboji.qca.qualcomm.com>
On 05/13/2014 11:10 AM, Kalle Valo wrote:
>> +static int __ath10k_set_antenna(struct ath10k *ar, u32 tx_ant, u32 rx_ant)
>> +{
>> + int ret;
>> +
>> + lockdep_assert_held(&ar->conf_mutex);
>> +
>> + ar->cfg_tx_chainmask = tx_ant;
>> + ar->cfg_rx_chainmask = rx_ant;
>> +
>> + if ((ar->state != ATH10K_STATE_ON) &&
>> + (ar->state != ATH10K_STATE_RESTARTED))
>> + return 0;
>
> Should we return an error value instead? Aren't we otherwise cheating by
> claiming that the command was succesful?
I think not..we store the values, and they will be applied when firmware
does come up.
We might should return error if bad bit patterns are set, but to be honest,
aside from trial and error, I'm not sure how to figure those out. Maybe
some internal QCA docs document the allowed configurations?
>> --- 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.
I'm knee deep in other bugs though...maybe Avery has time to
address this.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-05-13 18:15 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 [this message]
2014-05-13 21:03 ` Avery Pennarun
2014-05-14 12:28 ` Kalle Valo
2014-05-15 4:04 ` Yeoh Chun-Yeow
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=53726148.3090503@candelatech.com \
--to=greearb@candelatech.com \
--cc=apenwarr@gmail.com \
--cc=ath10k@lists.infradead.org \
--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.