From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <Larry.Finger@lwfinger.net>, <linux-wireless@vger.kernel.org>
Subject: [PATCH v2 01/17] rtlwifi: add halmac structure to wifi.h
Date: Tue, 3 Apr 2018 15:53:16 +0800 [thread overview]
Message-ID: <20180403075332.3344-2-pkshih@realtek.com> (raw)
In-Reply-To: <20180403075332.3344-1-pkshih@realtek.com>
From: Ping-Ke Shih <pkshih@realtek.com>
Add structure and ops to interact with halmac and other modules.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtlwifi/wifi.h | 58 +++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index d27e33960e77..c8542b87cc2b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -2305,6 +2305,13 @@ struct rtl_hal_ops {
u16 (*get_available_desc)(struct ieee80211_hw *hw, u8 q_idx);
void (*c2h_content_parsing)(struct ieee80211_hw *hw, u8 tag, u8 len,
u8 *val);
+ /* ops for halmac cb */
+ bool (*halmac_cb_init_mac_register)(struct rtl_priv *rtlpriv);
+ bool (*halmac_cb_init_bb_rf_register)(struct rtl_priv *rtlpriv);
+ bool (*halmac_cb_write_data_rsvd_page)(struct rtl_priv *rtlpriv,
+ u8 *buf, u32 size);
+ bool (*halmac_cb_write_data_h2c)(struct rtl_priv *rtlpriv, u8 *buf,
+ u32 size);
};
struct rtl_intf_ops {
@@ -2687,6 +2694,54 @@ struct rtl_btc_ops {
bool (*btc_is_bt_lps_on)(struct rtl_priv *rtlpriv);
};
+struct rtl_halmac_ops {
+ int (*halmac_init_adapter)(struct rtl_priv *rtlpriv);
+ int (*halmac_deinit_adapter)(struct rtl_priv *rtlpriv);
+ int (*halmac_init_hal)(struct rtl_priv *rtlpriv);
+ int (*halmac_deinit_hal)(struct rtl_priv *rtlpriv);
+ int (*halmac_poweron)(struct rtl_priv *rtlpriv);
+ int (*halmac_poweroff)(struct rtl_priv *rtlpriv);
+
+ int (*halmac_phy_power_switch)(struct rtl_priv *rtlpriv, u8 enable);
+ int (*halmac_set_mac_address)(struct rtl_priv *rtlpriv, u8 hwport,
+ u8 *addr);
+ int (*halmac_set_bssid)(struct rtl_priv *rtlpriv, u8 hwport, u8 *addr);
+
+ int (*halmac_get_physical_efuse_size)(struct rtl_priv *rtlpriv,
+ u32 *size);
+ int (*halmac_read_physical_efuse_map)(struct rtl_priv *rtlpriv,
+ u8 *map, u32 size);
+ int (*halmac_get_logical_efuse_size)(struct rtl_priv *rtlpriv,
+ u32 *size);
+ int (*halmac_read_logical_efuse_map)(struct rtl_priv *rtlpriv, u8 *map,
+ u32 size);
+
+ int (*halmac_set_bandwidth)(struct rtl_priv *rtlpriv, u8 channel,
+ u8 pri_ch_idx, u8 bw);
+
+ int (*halmac_c2h_handle)(struct rtl_priv *rtlpriv, u8 *c2h, u32 size);
+
+ int (*halmac_chk_txdesc)(struct rtl_priv *rtlpriv, u8 *txdesc,
+ u32 size);
+ int (*halmac_iqk)(struct rtl_priv *rtlpriv, u8 clear, u8 segment);
+};
+
+struct rtl_halmac_indicator {
+ struct completion *comp;
+ u32 wait_ms;
+
+ u8 *buffer;
+ u32 buf_size;
+ u32 ret_size;
+ u32 status;
+};
+
+struct rtl_halmac {
+ const struct rtl_halmac_ops *ops;
+ void *internal; /* internal context of halmac, i.e. PHALMAC_ADAPTER */
+ struct rtl_halmac_indicator *indicator; /* size=10 */
+};
+
struct proxim {
bool proxim_on;
@@ -2792,6 +2847,9 @@ struct rtl_priv {
/*for bt coexist use*/
struct bt_coexist_info btcoexist;
+ /* halmac for newer ICs */
+ struct rtl_halmac halmac;
+
/* separate 92ee from other ICs,
* 92ee use new trx flow.
*/
--
2.15.1
next prev parent reply other threads:[~2018-04-03 7:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 7:53 [PATCH v2 00/17] rtlwifi: halmac: Add new module halmac pkshih
2018-04-03 7:53 ` pkshih [this message]
2018-04-03 7:53 ` [PATCH v2 02/17] rtlwifi: add debug ID COMP_HALMAC pkshih
2018-04-03 7:53 ` [PATCH v2 03/17] rtlwifi: add dmdef.h to share with driver and other modules pkshih
2018-04-03 7:53 ` [PATCH v2 04/17] rtlwifi: halmac: add main definition used by halmac pkshih
2018-04-03 7:53 ` [PATCH v2 05/17] rtlwifi: halmac: describe number and size of chip functions pkshih
2018-04-03 7:53 ` [PATCH v2 07/17] rtlwifi: halmac: add definition of TX/RX descriptor pkshih
2018-04-03 7:53 ` [PATCH v2 08/17] rtlwifi: halmac: add GPIO pin/pinmux definitions pkshih
2018-04-03 7:53 ` [PATCH v2 09/17] rtlwifi: halmac: add power sequence to turn on/off wifi card pkshih
2018-04-03 7:53 ` [PATCH v2 10/17] rtlwifi: halmac: access efuse through halmac helper functions pkshih
2018-04-03 7:53 ` [PATCH v2 11/17] rtlwifi: halmac: add files to implement halmac ops pkshih
2018-04-03 7:53 ` [PATCH v2 12/17] rtlwifi: halmac: add halmac init/deinit functions pkshih
2018-04-03 7:53 ` [PATCH v2 13/17] rtlwifi: halmac: add firmware related functions and definitions pkshih
2018-04-03 7:53 ` [PATCH v2 14/17] rtlwifi: halmac: add bus interface commands pkshih
2018-04-03 7:53 ` [PATCH v2 15/17] rtlwifi: halmac: add to control WiFi mac functions and registers pkshih
2018-04-03 7:53 ` [PATCH v2 16/17] rtlwifi: halmac: add to support BB and RF functions pkshih
2018-04-03 7:53 ` [PATCH v2 17/17] rtlwifi: add halmac to Makefile and Kconfig pkshih
2018-04-24 17:12 ` [PATCH v2 00/17] rtlwifi: halmac: Add new module halmac Kalle Valo
2018-04-25 2:26 ` Pkshih
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=20180403075332.3344-2-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=Larry.Finger@lwfinger.net \
--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;
as well as URLs for NNTP newsgroup(s).