[PATCH 2/4] UBUNTU: SAUCE: Separate Redpine RS9113 WLAN/BT vendor and kernel drivers
Shrirang Bagul
shrirang.bagul at canonical.com
Thu Jan 19 09:11:46 UTC 2017
BugLink: http://bugs.launchpad.net/bugs/1657682
The driver submitted by vendor Redpine for RS9113 WLAN/BT exports same
symbols as their existing old driver in the kernel. This patch tries to
resolve this conflict.
Signed-off-by: Shrirang Bagul <shrirang.bagul at canonical.com>
---
ubuntu/rsi/Kconfig | 18 +++++++++---------
ubuntu/rsi/Makefile | 28 ++++++++++++++--------------
ubuntu/rsi/rsi_91x_hal.c | 2 +-
ubuntu/rsi/rsi_91x_hci.c | 6 +++---
ubuntu/rsi/rsi_91x_mac80211.c | 6 +++---
ubuntu/rsi/rsi_91x_main.c | 6 +++---
ubuntu/rsi/rsi_91x_mgmt.c | 2 +-
ubuntu/rsi/rsi_91x_sdio.c | 4 ++--
ubuntu/rsi/rsi_91x_usb.c | 8 ++++----
ubuntu/rsi/rsi_debugfs.h | 2 +-
ubuntu/rsi/rsi_main.h | 6 +++---
ubuntu/rsi/rsi_usb.h | 2 +-
12 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/ubuntu/rsi/Kconfig b/ubuntu/rsi/Kconfig
index 64798a9..e1a370f 100644
--- a/ubuntu/rsi/Kconfig
+++ b/ubuntu/rsi/Kconfig
@@ -12,40 +12,40 @@ config WLAN_VENDOR_RSI
if WLAN_VENDOR_RSI
-config RSI_91X
+config VEN_RSI_91X
tristate "Redpine Signals Inc 91x WLAN driver support"
depends on MAC80211
---help---
This option enabes support for RSI 1x1 devices.
Select M (recommended), if you have a RSI 1x1 wireless module.
-config RSI_DEBUGFS
+config VEN_RSI_DEBUGFS
bool "Redpine Signals Inc debug support"
- depends on RSI_91X
+ depends on VEN_RSI_91X
default y
---help---
Say Y, if you would like to enable debug support. This option
creates debugfs entries
-config RSI_SDIO
+config VEN_RSI_SDIO
tristate "Redpine Signals SDIO bus support"
- depends on MMC && RSI_91X
+ depends on MMC && VEN_RSI_91X
default m
---help---
This option enables the SDIO bus support in rsi drivers.
Select M (recommended), if you have a RSI 1x1 wireless module.
-config RSI_USB
+config VEN_RSI_USB
tristate "Redpine Signals USB bus support"
- depends on USB && RSI_91X
+ depends on USB && VEN_RSI_91X
default m
---help---
This option enables the USB bus support in rsi drivers.
Select M (recommended), if you have a RSI 1x1 wireless module.
-config RSI_HCI
+config VEN_RSI_HCI
tristate "Redpine Signals HCI support"
- depends on RSI_91X
+ depends on VEN_RSI_91X
default m
---help---
This option enables the HCI support in rsi drivers for BT apps.
diff --git a/ubuntu/rsi/Makefile b/ubuntu/rsi/Makefile
index b4f662d..519db07 100644
--- a/ubuntu/rsi/Makefile
+++ b/ubuntu/rsi/Makefile
@@ -1,15 +1,15 @@
-rsi_91x-y += rsi_91x_main.o
-rsi_91x-y += rsi_91x_core.o
-rsi_91x-y += rsi_91x_mac80211.o
-rsi_91x-y += rsi_91x_mgmt.o
-rsi_91x-y += rsi_91x_hal.o
-rsi_91x-y += rsi_91x_ps.o
-rsi_91x-$(CONFIG_RSI_DEBUGFS) += rsi_91x_debugfs.o
-rsi_91x-$(CONFIG_RSI_HCI) += rsi_91x_hci.o
-rsi_91x-$(CONFIG_RSI_COEX) += rsi_91x_coex.o
+ven_rsi_91x-y += rsi_91x_main.o
+ven_rsi_91x-y += rsi_91x_core.o
+ven_rsi_91x-y += rsi_91x_mac80211.o
+ven_rsi_91x-y += rsi_91x_mgmt.o
+ven_rsi_91x-y += rsi_91x_hal.o
+ven_rsi_91x-y += rsi_91x_ps.o
+ven_rsi_91x-$(CONFIG_VEN_RSI_DEBUGFS) += rsi_91x_debugfs.o
+ven_rsi_91x-$(CONFIG_VEN_RSI_HCI) += rsi_91x_hci.o
+ven_rsi_91x-$(CONFIG_RSI_COEX) += rsi_91x_coex.o
-rsi_usb-y += rsi_91x_usb.o rsi_91x_usb_ops.o
-rsi_sdio-y += rsi_91x_sdio.o rsi_91x_sdio_ops.o
-obj-$(CONFIG_RSI_91X) += rsi_91x.o
-obj-$(CONFIG_RSI_SDIO) += rsi_sdio.o
-obj-$(CONFIG_RSI_USB) += rsi_usb.o
+ven_rsi_usb-y += rsi_91x_usb.o rsi_91x_usb_ops.o
+ven_rsi_sdio-y += rsi_91x_sdio.o rsi_91x_sdio_ops.o
+obj-$(CONFIG_VEN_RSI_91X) += ven_rsi_91x.o
+obj-$(CONFIG_VEN_RSI_SDIO) += ven_rsi_sdio.o
+obj-$(CONFIG_VEN_RSI_USB) += ven_rsi_usb.o
diff --git a/ubuntu/rsi/rsi_91x_hal.c b/ubuntu/rsi/rsi_91x_hal.c
index 077c125..cac5cc8 100644
--- a/ubuntu/rsi/rsi_91x_hal.c
+++ b/ubuntu/rsi/rsi_91x_hal.c
@@ -1086,7 +1086,7 @@ fail:
int rsi_hal_device_init(struct rsi_hw *adapter)
{
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
adapter->priv->coex_mode = 4;
#else
adapter->priv->coex_mode = 1;
diff --git a/ubuntu/rsi/rsi_91x_hci.c b/ubuntu/rsi/rsi_91x_hci.c
index 9524849..e4d9daa 100644
--- a/ubuntu/rsi/rsi_91x_hci.c
+++ b/ubuntu/rsi/rsi_91x_hci.c
@@ -187,7 +187,7 @@ static int rsi_hci_send_pkt(struct hci_dev *hdev, struct sk_buff *skb)
rsi_hex_dump(DATA_RX_ZONE, "TX BT Pkt", skb->data, skb->len);
-#ifdef CONFIG_RSI_COEX
+#ifdef CONFIG_VEN_RSI_COEX
rsi_coex_send_pkt(h_adapter->priv, skb, RSI_BT_Q);
#else
rsi_send_bt_pkt(h_adapter->priv, skb);
@@ -220,7 +220,7 @@ int rsi_hci_recv_pkt(struct rsi_common *common, u8 *pkt)
return 0;
}
-#ifdef CONFIG_RSI_COEX
+#ifdef CONFIG_VEN_RSI_COEX
if (rsi_coex_init(common)) {
rsi_dbg(ERR_ZONE, "Failed to init COEX module\n");
goto err;
@@ -348,7 +348,7 @@ int rsi_genl_recv(struct sk_buff *skb, struct genl_info *info)
memcpy(skb->data, data, len);
bt_cb(skb)->pkt_type = pkttype;
-#ifdef CONFIG_RSI_COEX
+#ifdef CONFIG_VEN_RSI_COEX
return rsi_coex_send_pkt(h_adapter->priv, skb, RSI_BT_Q);
#else
return rsi_send_bt_pkt(h_adapter->priv, skb);
diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
index 9e989a7..000f4c8 100644
--- a/ubuntu/rsi/rsi_91x_mac80211.c
+++ b/ubuntu/rsi/rsi_91x_mac80211.c
@@ -224,7 +224,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
kfree(sband->channels);
}
-#ifdef CONFIG_RSI_DEBUGFS
+#ifdef CONFIG_VEN_RSI_DEBUGFS
rsi_remove_dbgfs(adapter);
kfree(adapter->dfsentry);
#endif
@@ -270,10 +270,10 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw,
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
-#ifndef CONFIG_RSI_HCI
+#ifndef CONFIG_VEN_RSI_HCI
rsi_core_xmit(common, skb);
#else
-#ifndef CONFIG_RSI_COEX
+#ifndef CONFIG_VEN_RSI_COEX
ieee80211_free_txskb(common->priv->hw, skb);
#endif
#endif
diff --git a/ubuntu/rsi/rsi_91x_main.c b/ubuntu/rsi/rsi_91x_main.c
index b701e57..f9ee129 100644
--- a/ubuntu/rsi/rsi_91x_main.c
+++ b/ubuntu/rsi/rsi_91x_main.c
@@ -21,10 +21,10 @@
#include "rsi_mgmt.h"
#include "rsi_common.h"
#include "rsi_hal.h"
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
#include "rsi_hci.h"
#endif
-#ifdef CONFIG_RSI_COEX
+#ifdef CONFIG_VEN_RSI_COEX
#include "rsi_coex.h"
#endif
@@ -191,7 +191,7 @@ int rsi_read_pkt(struct rsi_common *common, u8 *rx_pkt, s32 rcv_pkt_len)
case RSI_WIFI_MGMT_Q:
rsi_mgmt_pkt_recv(common, (frame_desc + offset));
break;
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
case RSI_BT_MGMT_Q:
case RSI_BT_DATA_Q:
rsi_hex_dump(DATA_RX_ZONE,
diff --git a/ubuntu/rsi/rsi_91x_mgmt.c b/ubuntu/rsi/rsi_91x_mgmt.c
index c72d984..c38b12f 100644
--- a/ubuntu/rsi/rsi_91x_mgmt.c
+++ b/ubuntu/rsi/rsi_91x_mgmt.c
@@ -309,7 +309,7 @@ static void rsi_set_default_parameters(struct rsi_common *common)
common->iface_down = true;
common->endpoint = EP_2GHZ_20MHZ;
common->driver_mode = 1; /* End-to-End Mode */
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
common->coex_mode = 4;
common->oper_mode = 4;
#else
diff --git a/ubuntu/rsi/rsi_91x_sdio.c b/ubuntu/rsi/rsi_91x_sdio.c
index fc99d51..0b2a217 100644
--- a/ubuntu/rsi/rsi_91x_sdio.c
+++ b/ubuntu/rsi/rsi_91x_sdio.c
@@ -965,7 +965,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
adapter->determine_event_timeout = rsi_sdio_determine_event_timeout;
adapter->check_hw_queue_status = rsi_sdio_read_buffer_status_register;
-#ifdef CONFIG_RSI_DEBUGFS
+#ifdef CONFIG_VEN_RSI_DEBUGFS
adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
#endif
return status;
@@ -1069,7 +1069,7 @@ static void rsi_disconnect(struct sdio_func *pfunction)
rsi_mac80211_detach(adapter);
mdelay(10);
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
rsi_hci_detach(adapter->priv);
#endif
mdelay(10);
diff --git a/ubuntu/rsi/rsi_91x_usb.c b/ubuntu/rsi/rsi_91x_usb.c
index 5aac3df..907adb8 100644
--- a/ubuntu/rsi/rsi_91x_usb.c
+++ b/ubuntu/rsi/rsi_91x_usb.c
@@ -469,7 +469,7 @@ static void rsi_deinit_usb_interface(struct rsi_hw *adapter)
rsi_kill_thread(&dev->rx_thread);
kfree(dev->rx_cb[0].rx_buffer);
usb_free_urb(dev->rx_cb[0].rx_urb);
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
kfree(dev->rx_cb[1].rx_buffer);
usb_free_urb(dev->rx_cb[1].rx_urb);
#endif
@@ -636,7 +636,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
goto fail_2;
}
-#ifdef CONFIG_RSI_DEBUGFS
+#ifdef CONFIG_VEN_RSI_DEBUGFS
/* In USB, one less than the MAX_DEBUGFS_ENTRIES entries
* is required */
adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES - 1;
@@ -816,7 +816,7 @@ static int rsi_probe(struct usb_interface *pfunction,
if (status)
goto err1;
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
status = rsi_rx_urb_submit(adapter, 2 /* RX_BT_EP */);
if (status)
goto err1;
@@ -849,7 +849,7 @@ static void rsi_disconnect(struct usb_interface *pfunction)
rsi_reset_card(adapter);
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
rsi_hci_detach(adapter->priv);
rsi_dbg(INFO_ZONE, "HCI Detach Done\n");
#endif
diff --git a/ubuntu/rsi/rsi_debugfs.h b/ubuntu/rsi/rsi_debugfs.h
index 580ad3b..7b7e75f 100644
--- a/ubuntu/rsi/rsi_debugfs.h
+++ b/ubuntu/rsi/rsi_debugfs.h
@@ -20,7 +20,7 @@
#include "rsi_main.h"
#include <linux/debugfs.h>
-#ifndef CONFIG_RSI_DEBUGFS
+#ifndef CONFIG_VEN_RSI_DEBUGFS
static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
{
return 0;
diff --git a/ubuntu/rsi/rsi_main.h b/ubuntu/rsi/rsi_main.h
index c94e34f..183b412 100644
--- a/ubuntu/rsi/rsi_main.h
+++ b/ubuntu/rsi/rsi_main.h
@@ -274,11 +274,11 @@ struct rsi_common {
int tx_power;
u8 ant_in_use;
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
void *hci_adapter;
#endif
-#ifdef CONFIG_RSI_COEX
+#ifdef CONFIG_VEN_RSI_COEX
void *coex_cb;
#endif
};
@@ -327,7 +327,7 @@ struct rsi_hw {
struct rsi_ps_info ps_info;
spinlock_t ps_lock;
-#ifdef CONFIG_RSI_DEBUGFS
+#ifdef CONFIG_VEN_RSI_DEBUGFS
struct rsi_debugfs *dfsentry;
u8 num_debugfs_entries;
#endif
diff --git a/ubuntu/rsi/rsi_usb.h b/ubuntu/rsi/rsi_usb.h
index c72637f..a202e70 100644
--- a/ubuntu/rsi/rsi_usb.h
+++ b/ubuntu/rsi/rsi_usb.h
@@ -29,7 +29,7 @@
#define RSI_USB_TX_HEAD_ROOM 128
#define MAX_TX_URBS 1
-#ifdef CONFIG_RSI_HCI
+#ifdef CONFIG_VEN_RSI_HCI
#define MAX_RX_URBS 2
#else
#define MAX_RX_URBS 1
--
2.9.3
More information about the kernel-team
mailing list