summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rsi/rsi_91x_usb.c
diff options
context:
space:
mode:
authorPrameela Rani Garnepudi <prameela.j04cs@gmail.com>2017-05-16 15:31:14 +0530
committerKalle Valo <kvalo@codeaurora.org>2017-05-24 16:37:51 +0300
commita2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c (patch)
tree005b220b9cf75d1ec1f795da4240cfb788f864dc /drivers/net/wireless/rsi/rsi_91x_usb.c
parent88fa51e1b33c27bba6080f04f218e9d17632aec7 (diff)
downloadtalos-obmc-linux-a2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c.tar.gz
talos-obmc-linux-a2ce952c8e09eb36e3f1da0c2dbe8b41c7b8297c.zip
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_91x_usb.c')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_usb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 31f96f0f6e30..9000e09a4d7d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -392,6 +392,12 @@ static int rsi_usb_host_intf_write_pkt(struct rsi_hw *adapter,
len);
}
+static struct rsi_host_intf_ops usb_host_intf_ops = {
+ .write_pkt = rsi_usb_host_intf_write_pkt,
+ .read_reg_multiple = rsi_usb_read_register_multiple,
+ .write_reg_multiple = rsi_usb_write_register_multiple,
+};
+
/**
* rsi_deinit_usb_interface() - This function deinitializes the usb interface.
* @adapter: Pointer to the adapter structure.
@@ -457,9 +463,10 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
/* Initializing function callbacks */
adapter->rx_urb_submit = rsi_rx_urb_submit;
- adapter->host_intf_write_pkt = rsi_usb_host_intf_write_pkt;
adapter->check_hw_queue_status = rsi_usb_check_queue_status;
adapter->determine_event_timeout = rsi_usb_event_timeout;
+ adapter->rsi_host_intf = RSI_HOST_INTF_USB;
+ adapter->host_intf_ops = &usb_host_intf_ops;
rsi_init_event(&rsi_dev->rx_thread.event);
status = rsi_create_kthread(common, &rsi_dev->rx_thread,
OpenPOWER on IntegriCloud