From: Siva Rebbagondla <siva8118@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, amitkarwar@gmail.com,
krishna.pedda@redpinesignals.com,
Ganapathiraju Kondraju <ganapathi.kondraju@redpinesignals.com>,
Siva Rebbagondla <siva8118@gmail.com>
Subject: [PATCH 4/8] rsi: change in device init frame sequence for 9116
Date: Wed, 3 Apr 2019 09:43:05 +0530 [thread overview]
Message-ID: <20190403041309.12829-5-siva8118@gmail.com> (raw)
In-Reply-To: <20190403041309.12829-1-siva8118@gmail.com>
Initial frame exchange sequence has been changed for 9116 chip. Getting MAC
address using EEPROM read frame will be once common device configuration is
done and RESET_MAC frame is sending after bootup parameters confirmation is
received, which are different from RS9113 device
Signed-off-by: Siva Rebbagondla <siva8118@gmail.com>
---
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 38 +++++++++++++++++++------
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 844f2fac298f..9eb60a5501a2 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1766,15 +1766,26 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
rsi_dbg(FSM_ZONE, "%s: Boot up params confirm received\n",
__func__);
if (common->fsm_state == FSM_BOOT_PARAMS_SENT) {
- adapter->eeprom.length = (IEEE80211_ADDR_LEN +
- WLAN_MAC_MAGIC_WORD_LEN +
- WLAN_HOST_MODE_LEN);
- adapter->eeprom.offset = WLAN_MAC_EEPROM_ADDR;
- if (rsi_eeprom_read(common)) {
- common->fsm_state = FSM_CARD_NOT_READY;
- goto out;
+ if (adapter->device_model == RSI_DEV_9116) {
+ common->band = NL80211_BAND_5GHZ;
+ common->num_supp_bands = 2;
+
+ if (rsi_send_reset_mac(common))
+ goto out;
+ else
+ common->fsm_state = FSM_RESET_MAC_SENT;
+ } else {
+ adapter->eeprom.length =
+ (IEEE80211_ADDR_LEN +
+ WLAN_MAC_MAGIC_WORD_LEN +
+ WLAN_HOST_MODE_LEN);
+ adapter->eeprom.offset = WLAN_MAC_EEPROM_ADDR;
+ if (rsi_eeprom_read(common)) {
+ common->fsm_state = FSM_CARD_NOT_READY;
+ goto out;
+ }
+ common->fsm_state = FSM_EEPROM_READ_MAC_ADDR;
}
- common->fsm_state = FSM_EEPROM_READ_MAC_ADDR;
} else {
rsi_dbg(INFO_ZONE,
"%s: Received bootup params cfm in %d state\n",
@@ -1936,6 +1947,17 @@ int rsi_handle_card_ready(struct rsi_common *common, u8 *msg)
case FSM_COMMON_DEV_PARAMS_SENT:
rsi_dbg(INIT_ZONE, "Card ready indication from WLAN HAL\n");
+ if (common->priv->device_model == RSI_DEV_9116) {
+ if (msg[16] != MAGIC_WORD) {
+ rsi_dbg(FSM_ZONE,
+ "%s: [EEPROM_READ] Invalid token\n",
+ __func__);
+ common->fsm_state = FSM_CARD_NOT_READY;
+ return -EINVAL;
+ }
+ memcpy(common->mac_addr, &msg[20], ETH_ALEN);
+ rsi_dbg(INIT_ZONE, "MAC Addr %pM", common->mac_addr);
+ }
/* Get usb buffer status register address */
common->priv->usb_buffer_status_reg = *(u32 *)&msg[8];
rsi_dbg(INFO_ZONE, "USB buffer status register = %x\n",
--
2.17.1
next prev parent reply other threads:[~2019-04-03 4:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 4:13 [PATCH 0/8] rsi: driver changes for new 9116 chipset Siva Rebbagondla
2019-04-03 4:13 ` [PATCH 1/8] rsi: add new device model for 9116 Siva Rebbagondla
2019-04-25 16:45 ` Kalle Valo
2019-04-03 4:13 ` [PATCH 2/8] rsi: move common part of firmware load to separate function Siva Rebbagondla
2019-04-03 4:13 ` [PATCH 3/8] rsi: add firmware loading for 9116 device Siva Rebbagondla
2019-04-03 4:13 ` Siva Rebbagondla [this message]
2019-04-03 4:13 ` [PATCH 5/8] rsi: new bootup parameters for 9116 Siva Rebbagondla
2019-04-03 4:13 ` [PATCH 6/8] rsi: send new tx command frame wlan9116 features Siva Rebbagondla
2019-04-03 4:13 ` [PATCH 7/8] rsi: reset device changes for 9116 Siva Rebbagondla
2019-04-03 4:13 ` [PATCH 8/8] rsi: miscallaneous changes for 9116 and common Siva Rebbagondla
2024-02-23 10:24 ` Johannes Berg
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=20190403041309.12829-5-siva8118@gmail.com \
--to=siva8118@gmail.com \
--cc=amitkarwar@gmail.com \
--cc=ganapathi.kondraju@redpinesignals.com \
--cc=krishna.pedda@redpinesignals.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox