[PATCH] Don't call libertas_sbi_* functions from hardware-independend files
Holger Schurig
hs4233 at mail.mn-solutions.de
Tue Feb 13 08:25:23 EST 2007
Don't call libertas_sbi_* functions from hardware-independend files.
This is in preparation for the split into lib8xxx.ko / usb8xxx.ko.
Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>
--- libertas-2.6.orig/drivers/net/wireless/libertas/cmd.c
+++ libertas-2.6/drivers/net/wireless/libertas/cmd.c
@@ -1013,7 +1013,7 @@
cmdnode->cmdwaitqwoken = 0;
cmdsize = cpu_to_le16(cmdsize);
- ret = libertas_sbi_host_to_card(priv, MVMS_CMD, (u8 *) cmdptr, cmdsize);
+ ret = priv->host_to_card(priv, MVMS_CMD, (u8 *) cmdptr, cmdsize);
if (ret != 0) {
lbs_pr_debug(1, "DNLD_CMD: Host to Card failed\n");
@@ -1842,7 +1842,7 @@
lbs_dbg_hex("SEND_SLEEPC_CMD: Sleep confirm command", cmdptr, size);
- ret = libertas_sbi_host_to_card(priv, MVMS_CMD, cmdptr, size);
+ ret = priv->host_to_card(priv, MVMS_CMD, cmdptr, size);
priv->wlan_dev.dnld_sent = DNLD_RES_RECEIVED;
spin_lock_irqsave(&adapter->driver_lock, flags);
--- libertas-2.6.orig/drivers/net/wireless/libertas/dev.h
+++ libertas-2.6/drivers/net/wireless/libertas/dev.h
@@ -162,6 +162,9 @@
struct delayed_work assoc_work;
struct workqueue_struct *assoc_thread;
+
+ /** Hardware abstraction */
+ int (*host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
};
/** Association request
@@ -384,7 +387,7 @@
/** FSM variable for 11d support */
u32 enable11d;
- /** MISCELLANEOUS */
+ /** MISCELLANEOUS */
u8 *prdeeprom;
struct wlan_offset_value offsetvalue;
--- libertas-2.6.orig/drivers/net/wireless/libertas/main.c
+++ libertas-2.6/drivers/net/wireless/libertas/main.c
@@ -907,6 +907,7 @@
priv->mesh_open = 0;
priv->infra_open = 0;
priv->mesh_dev = mesh_dev;
+ priv->host_to_card = libertas_sbi_host_to_card;
wlanpriv = priv;
SET_MODULE_OWNER(dev);
--- libertas-2.6.orig/drivers/net/wireless/libertas/tx.c
+++ libertas-2.6/drivers/net/wireless/libertas/tx.c
@@ -132,13 +132,13 @@
lbs_dbg_hex("Tx Data", (u8 *) p802x_hdr, plocaltxpd->tx_packet_length);
memcpy(ptr, p802x_hdr, plocaltxpd->tx_packet_length);
- ret = libertas_sbi_host_to_card(priv, MVMS_DAT,
+ ret = priv->host_to_card(priv, MVMS_DAT,
priv->adapter->tmptxbuf,
plocaltxpd->tx_packet_length +
sizeof(struct txpd));
if (ret) {
- lbs_pr_debug(1, "Tx error: libertas_sbi_host_to_card failed: 0x%X\n", ret);
+ lbs_pr_debug(1, "Tx error: host_to_card failed: 0x%X\n", ret);
goto done;
}
More information about the libertas-dev
mailing list