Commit 5867572a authored by Shrirang Bagul's avatar Shrirang Bagul Committed by Luis Henriques

UBUNTU: SAUCE: Separate Redpine RS9113 WLAN/BT vendor and kernel drivers

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: default avatarShrirang Bagul <shrirang.bagul@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent fa147b26
...@@ -12,40 +12,40 @@ config WLAN_VENDOR_RSI ...@@ -12,40 +12,40 @@ config WLAN_VENDOR_RSI
if WLAN_VENDOR_RSI if WLAN_VENDOR_RSI
config RSI_91X config VEN_RSI_91X
tristate "Redpine Signals Inc 91x WLAN driver support" tristate "Redpine Signals Inc 91x WLAN driver support"
depends on MAC80211 depends on MAC80211
---help--- ---help---
This option enabes support for RSI 1x1 devices. This option enabes support for RSI 1x1 devices.
Select M (recommended), if you have a RSI 1x1 wireless module. Select M (recommended), if you have a RSI 1x1 wireless module.
config RSI_DEBUGFS config VEN_RSI_DEBUGFS
bool "Redpine Signals Inc debug support" bool "Redpine Signals Inc debug support"
depends on RSI_91X depends on VEN_RSI_91X
default y default y
---help--- ---help---
Say Y, if you would like to enable debug support. This option Say Y, if you would like to enable debug support. This option
creates debugfs entries creates debugfs entries
config RSI_SDIO config VEN_RSI_SDIO
tristate "Redpine Signals SDIO bus support" tristate "Redpine Signals SDIO bus support"
depends on MMC && RSI_91X depends on MMC && VEN_RSI_91X
default m default m
---help--- ---help---
This option enables the SDIO bus support in rsi drivers. This option enables the SDIO bus support in rsi drivers.
Select M (recommended), if you have a RSI 1x1 wireless module. Select M (recommended), if you have a RSI 1x1 wireless module.
config RSI_USB config VEN_RSI_USB
tristate "Redpine Signals USB bus support" tristate "Redpine Signals USB bus support"
depends on USB && RSI_91X depends on USB && VEN_RSI_91X
default m default m
---help--- ---help---
This option enables the USB bus support in rsi drivers. This option enables the USB bus support in rsi drivers.
Select M (recommended), if you have a RSI 1x1 wireless module. Select M (recommended), if you have a RSI 1x1 wireless module.
config RSI_HCI config VEN_RSI_HCI
tristate "Redpine Signals HCI support" tristate "Redpine Signals HCI support"
depends on RSI_91X depends on VEN_RSI_91X
default m default m
---help--- ---help---
This option enables the HCI support in rsi drivers for BT apps. This option enables the HCI support in rsi drivers for BT apps.
......
rsi_91x-y += rsi_91x_main.o ven_rsi_91x-y += rsi_91x_main.o
rsi_91x-y += rsi_91x_core.o ven_rsi_91x-y += rsi_91x_core.o
rsi_91x-y += rsi_91x_mac80211.o ven_rsi_91x-y += rsi_91x_mac80211.o
rsi_91x-y += rsi_91x_mgmt.o ven_rsi_91x-y += rsi_91x_mgmt.o
rsi_91x-y += rsi_91x_hal.o ven_rsi_91x-y += rsi_91x_hal.o
rsi_91x-y += rsi_91x_ps.o ven_rsi_91x-y += rsi_91x_ps.o
rsi_91x-$(CONFIG_RSI_DEBUGFS) += rsi_91x_debugfs.o ven_rsi_91x-$(CONFIG_VEN_RSI_DEBUGFS) += rsi_91x_debugfs.o
rsi_91x-$(CONFIG_RSI_HCI) += rsi_91x_hci.o ven_rsi_91x-$(CONFIG_VEN_RSI_HCI) += rsi_91x_hci.o
rsi_91x-$(CONFIG_RSI_COEX) += rsi_91x_coex.o ven_rsi_91x-$(CONFIG_RSI_COEX) += rsi_91x_coex.o
rsi_usb-y += rsi_91x_usb.o rsi_91x_usb_ops.o ven_rsi_usb-y += rsi_91x_usb.o rsi_91x_usb_ops.o
rsi_sdio-y += rsi_91x_sdio.o rsi_91x_sdio_ops.o ven_rsi_sdio-y += rsi_91x_sdio.o rsi_91x_sdio_ops.o
obj-$(CONFIG_RSI_91X) += rsi_91x.o obj-$(CONFIG_VEN_RSI_91X) += ven_rsi_91x.o
obj-$(CONFIG_RSI_SDIO) += rsi_sdio.o obj-$(CONFIG_VEN_RSI_SDIO) += ven_rsi_sdio.o
obj-$(CONFIG_RSI_USB) += rsi_usb.o obj-$(CONFIG_VEN_RSI_USB) += ven_rsi_usb.o
...@@ -1086,7 +1086,7 @@ int rsi_load_9113_firmware(struct rsi_hw *adapter) ...@@ -1086,7 +1086,7 @@ int rsi_load_9113_firmware(struct rsi_hw *adapter)
int rsi_hal_device_init(struct rsi_hw *adapter) int rsi_hal_device_init(struct rsi_hw *adapter)
{ {
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
adapter->priv->coex_mode = 4; adapter->priv->coex_mode = 4;
#else #else
adapter->priv->coex_mode = 1; adapter->priv->coex_mode = 1;
......
...@@ -187,7 +187,7 @@ static int rsi_hci_send_pkt(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -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); 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); rsi_coex_send_pkt(h_adapter->priv, skb, RSI_BT_Q);
#else #else
rsi_send_bt_pkt(h_adapter->priv, skb); rsi_send_bt_pkt(h_adapter->priv, skb);
...@@ -220,7 +220,7 @@ int rsi_hci_recv_pkt(struct rsi_common *common, u8 *pkt) ...@@ -220,7 +220,7 @@ int rsi_hci_recv_pkt(struct rsi_common *common, u8 *pkt)
return 0; return 0;
} }
#ifdef CONFIG_RSI_COEX #ifdef CONFIG_VEN_RSI_COEX
if (rsi_coex_init(common)) { if (rsi_coex_init(common)) {
rsi_dbg(ERR_ZONE, "Failed to init COEX module\n"); rsi_dbg(ERR_ZONE, "Failed to init COEX module\n");
goto err; goto err;
...@@ -348,7 +348,7 @@ int rsi_genl_recv(struct sk_buff *skb, struct genl_info *info) ...@@ -348,7 +348,7 @@ int rsi_genl_recv(struct sk_buff *skb, struct genl_info *info)
memcpy(skb->data, data, len); memcpy(skb->data, data, len);
bt_cb(skb)->pkt_type = pkttype; 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); return rsi_coex_send_pkt(h_adapter->priv, skb, RSI_BT_Q);
#else #else
return rsi_send_bt_pkt(h_adapter->priv, skb); return rsi_send_bt_pkt(h_adapter->priv, skb);
......
...@@ -224,7 +224,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter) ...@@ -224,7 +224,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
kfree(sband->channels); kfree(sband->channels);
} }
#ifdef CONFIG_RSI_DEBUGFS #ifdef CONFIG_VEN_RSI_DEBUGFS
rsi_remove_dbgfs(adapter); rsi_remove_dbgfs(adapter);
kfree(adapter->dfsentry); kfree(adapter->dfsentry);
#endif #endif
...@@ -270,10 +270,10 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw, ...@@ -270,10 +270,10 @@ static void rsi_mac80211_tx(struct ieee80211_hw *hw,
struct rsi_hw *adapter = hw->priv; struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv; struct rsi_common *common = adapter->priv;
#ifndef CONFIG_RSI_HCI #ifndef CONFIG_VEN_RSI_HCI
rsi_core_xmit(common, skb); rsi_core_xmit(common, skb);
#else #else
#ifndef CONFIG_RSI_COEX #ifndef CONFIG_VEN_RSI_COEX
ieee80211_free_txskb(common->priv->hw, skb); ieee80211_free_txskb(common->priv->hw, skb);
#endif #endif
#endif #endif
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#include "rsi_mgmt.h" #include "rsi_mgmt.h"
#include "rsi_common.h" #include "rsi_common.h"
#include "rsi_hal.h" #include "rsi_hal.h"
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
#include "rsi_hci.h" #include "rsi_hci.h"
#endif #endif
#ifdef CONFIG_RSI_COEX #ifdef CONFIG_VEN_RSI_COEX
#include "rsi_coex.h" #include "rsi_coex.h"
#endif #endif
...@@ -191,7 +191,7 @@ int rsi_read_pkt(struct rsi_common *common, u8 *rx_pkt, s32 rcv_pkt_len) ...@@ -191,7 +191,7 @@ int rsi_read_pkt(struct rsi_common *common, u8 *rx_pkt, s32 rcv_pkt_len)
case RSI_WIFI_MGMT_Q: case RSI_WIFI_MGMT_Q:
rsi_mgmt_pkt_recv(common, (frame_desc + offset)); rsi_mgmt_pkt_recv(common, (frame_desc + offset));
break; break;
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
case RSI_BT_MGMT_Q: case RSI_BT_MGMT_Q:
case RSI_BT_DATA_Q: case RSI_BT_DATA_Q:
rsi_hex_dump(DATA_RX_ZONE, rsi_hex_dump(DATA_RX_ZONE,
......
...@@ -309,7 +309,7 @@ static void rsi_set_default_parameters(struct rsi_common *common) ...@@ -309,7 +309,7 @@ static void rsi_set_default_parameters(struct rsi_common *common)
common->iface_down = true; common->iface_down = true;
common->endpoint = EP_2GHZ_20MHZ; common->endpoint = EP_2GHZ_20MHZ;
common->driver_mode = 1; /* End-to-End Mode */ common->driver_mode = 1; /* End-to-End Mode */
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
common->coex_mode = 4; common->coex_mode = 4;
common->oper_mode = 4; common->oper_mode = 4;
#else #else
......
...@@ -965,7 +965,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter, ...@@ -965,7 +965,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
adapter->determine_event_timeout = rsi_sdio_determine_event_timeout; adapter->determine_event_timeout = rsi_sdio_determine_event_timeout;
adapter->check_hw_queue_status = rsi_sdio_read_buffer_status_register; 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; adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
#endif #endif
return status; return status;
...@@ -1069,7 +1069,7 @@ static void rsi_disconnect(struct sdio_func *pfunction) ...@@ -1069,7 +1069,7 @@ static void rsi_disconnect(struct sdio_func *pfunction)
rsi_mac80211_detach(adapter); rsi_mac80211_detach(adapter);
mdelay(10); mdelay(10);
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
rsi_hci_detach(adapter->priv); rsi_hci_detach(adapter->priv);
#endif #endif
mdelay(10); mdelay(10);
......
...@@ -469,7 +469,7 @@ static void rsi_deinit_usb_interface(struct rsi_hw *adapter) ...@@ -469,7 +469,7 @@ static void rsi_deinit_usb_interface(struct rsi_hw *adapter)
rsi_kill_thread(&dev->rx_thread); rsi_kill_thread(&dev->rx_thread);
kfree(dev->rx_cb[0].rx_buffer); kfree(dev->rx_cb[0].rx_buffer);
usb_free_urb(dev->rx_cb[0].rx_urb); 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); kfree(dev->rx_cb[1].rx_buffer);
usb_free_urb(dev->rx_cb[1].rx_urb); usb_free_urb(dev->rx_cb[1].rx_urb);
#endif #endif
...@@ -636,7 +636,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter, ...@@ -636,7 +636,7 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
goto fail_2; goto fail_2;
} }
#ifdef CONFIG_RSI_DEBUGFS #ifdef CONFIG_VEN_RSI_DEBUGFS
/* In USB, one less than the MAX_DEBUGFS_ENTRIES entries /* In USB, one less than the MAX_DEBUGFS_ENTRIES entries
* is required */ * is required */
adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES - 1; adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES - 1;
...@@ -816,7 +816,7 @@ static int rsi_probe(struct usb_interface *pfunction, ...@@ -816,7 +816,7 @@ static int rsi_probe(struct usb_interface *pfunction,
if (status) if (status)
goto err1; goto err1;
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
status = rsi_rx_urb_submit(adapter, 2 /* RX_BT_EP */); status = rsi_rx_urb_submit(adapter, 2 /* RX_BT_EP */);
if (status) if (status)
goto err1; goto err1;
...@@ -849,7 +849,7 @@ static void rsi_disconnect(struct usb_interface *pfunction) ...@@ -849,7 +849,7 @@ static void rsi_disconnect(struct usb_interface *pfunction)
rsi_reset_card(adapter); rsi_reset_card(adapter);
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
rsi_hci_detach(adapter->priv); rsi_hci_detach(adapter->priv);
rsi_dbg(INFO_ZONE, "HCI Detach Done\n"); rsi_dbg(INFO_ZONE, "HCI Detach Done\n");
#endif #endif
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "rsi_main.h" #include "rsi_main.h"
#include <linux/debugfs.h> #include <linux/debugfs.h>
#ifndef CONFIG_RSI_DEBUGFS #ifndef CONFIG_VEN_RSI_DEBUGFS
static inline int rsi_init_dbgfs(struct rsi_hw *adapter) static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
{ {
return 0; return 0;
......
...@@ -274,11 +274,11 @@ struct rsi_common { ...@@ -274,11 +274,11 @@ struct rsi_common {
int tx_power; int tx_power;
u8 ant_in_use; u8 ant_in_use;
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
void *hci_adapter; void *hci_adapter;
#endif #endif
#ifdef CONFIG_RSI_COEX #ifdef CONFIG_VEN_RSI_COEX
void *coex_cb; void *coex_cb;
#endif #endif
}; };
...@@ -327,7 +327,7 @@ struct rsi_hw { ...@@ -327,7 +327,7 @@ struct rsi_hw {
struct rsi_ps_info ps_info; struct rsi_ps_info ps_info;
spinlock_t ps_lock; spinlock_t ps_lock;
#ifdef CONFIG_RSI_DEBUGFS #ifdef CONFIG_VEN_RSI_DEBUGFS
struct rsi_debugfs *dfsentry; struct rsi_debugfs *dfsentry;
u8 num_debugfs_entries; u8 num_debugfs_entries;
#endif #endif
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define RSI_USB_TX_HEAD_ROOM 128 #define RSI_USB_TX_HEAD_ROOM 128
#define MAX_TX_URBS 1 #define MAX_TX_URBS 1
#ifdef CONFIG_RSI_HCI #ifdef CONFIG_VEN_RSI_HCI
#define MAX_RX_URBS 2 #define MAX_RX_URBS 2
#else #else
#define MAX_RX_URBS 1 #define MAX_RX_URBS 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment