diff options
author | Prameela Rani Garnepudi <prameela.j04cs@gmail.com> | 2017-05-16 13:01:14 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-05-24 16:37:51 +0300 |
commit | a2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c (patch) | |
tree | 005b220b9cf75d1ec1f795da4240cfb788f864dc /drivers/net/wireless/rsi/rsi_main.h | |
parent | 88fa51e1b33c27bba6080f04f218e9d17632aec7 (diff) | |
download | linux-a2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c.tar.xz |
rsi: Add host interface operations as separate structure.
Host interface operations are currently function pointers in rsi_hw
structure. As more host interface operations are going to be introduced,
separate structure is added for these for convenience.
Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_main.h')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_main.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h index 1d5904bc2c74..7fdeda7ae07c 100644 --- a/drivers/net/wireless/rsi/rsi_main.h +++ b/drivers/net/wireless/rsi/rsi_main.h @@ -209,6 +209,11 @@ struct rsi_common { u8 ant_in_use; }; +enum host_intf { + RSI_HOST_INTF_SDIO = 0, + RSI_HOST_INTF_USB +}; + struct rsi_hw { struct rsi_common *priv; struct ieee80211_hw *hw; @@ -219,16 +224,25 @@ struct rsi_hw { struct device *device; u8 sc_nvifs; + enum host_intf rsi_host_intf; #ifdef CONFIG_RSI_DEBUGFS struct rsi_debugfs *dfsentry; u8 num_debugfs_entries; #endif u8 dfs_region; void *rsi_dev; - int (*host_intf_read_pkt)(struct rsi_hw *adapter, u8 *pkt, u32 len); - int (*host_intf_write_pkt)(struct rsi_hw *adapter, u8 *pkt, u32 len); + struct rsi_host_intf_ops *host_intf_ops; int (*check_hw_queue_status)(struct rsi_hw *adapter, u8 q_num); int (*rx_urb_submit)(struct rsi_hw *adapter); int (*determine_event_timeout)(struct rsi_hw *adapter); }; + +struct rsi_host_intf_ops { + int (*read_pkt)(struct rsi_hw *adapter, u8 *pkt, u32 len); + int (*write_pkt)(struct rsi_hw *adapter, u8 *pkt, u32 len); + int (*read_reg_multiple)(struct rsi_hw *adapter, u32 addr, + u8 *data, u16 count); + int (*write_reg_multiple)(struct rsi_hw *adapter, u32 addr, + u8 *data, u16 count); +}; #endif |