aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 11:14:49 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:41 -0400
commit9e22cb67d9a8acde7a5af6ed8cd5e74ebd6551b3 (patch)
treee1a90a7eac6af3fdebdf1ac03fd0d38eedce7059 /drivers/net/wireless/libertas
parent1e838bf31c3a24596621026c7d1ca69da068af83 (diff)
[PATCH] libertas: remove if_bootcmd.c
Move the only function in it to if_usb.c, which was its only user anyway. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/Makefile1
-rw-r--r--drivers/net/wireless/libertas/if_bootcmd.c40
-rw-r--r--drivers/net/wireless/libertas/if_usb.c24
-rw-r--r--drivers/net/wireless/libertas/if_usb.h1
4 files changed, 24 insertions, 42 deletions
diff --git a/drivers/net/wireless/libertas/Makefile b/drivers/net/wireless/libertas/Makefile
index 32ed4136b0d4..61e0d6e07901 100644
--- a/drivers/net/wireless/libertas/Makefile
+++ b/drivers/net/wireless/libertas/Makefile
@@ -5,7 +5,6 @@ libertas-objs := main.o fw.o wext.o \
5 debugfs.o \ 5 debugfs.o \
6 ethtool.o assoc.o 6 ethtool.o assoc.o
7 7
8usb8xxx-objs += if_bootcmd.o
9usb8xxx-objs += if_usb.o 8usb8xxx-objs += if_usb.o
10 9
11obj-$(CONFIG_LIBERTAS) += libertas.o 10obj-$(CONFIG_LIBERTAS) += libertas.o
diff --git a/drivers/net/wireless/libertas/if_bootcmd.c b/drivers/net/wireless/libertas/if_bootcmd.c
deleted file mode 100644
index 8bca306ffad9..000000000000
--- a/drivers/net/wireless/libertas/if_bootcmd.c
+++ /dev/null
@@ -1,40 +0,0 @@
1/**
2 * This file contains functions used in USB Boot command
3 * and Boot2/FW update
4 */
5
6#include <linux/delay.h>
7#include <linux/firmware.h>
8#include <linux/netdevice.h>
9#include <linux/usb.h>
10
11#define DRV_NAME "usb8xxx"
12
13#include "defs.h"
14#include "dev.h"
15#include "if_usb.h"
16
17/**
18 * @brief This function issues Boot command to the Boot2 code
19 * @param ivalue 1:Boot from FW by USB-Download
20 * 2:Boot from FW in EEPROM
21 * @return 0
22 */
23int if_usb_issue_boot_command(wlan_private *priv, int ivalue)
24{
25 struct usb_card_rec *cardp = priv->card;
26 struct bootcmdstr sbootcmd;
27 int i;
28
29 /* Prepare command */
30 sbootcmd.u32magicnumber = cpu_to_le32(BOOT_CMD_MAGIC_NUMBER);
31 sbootcmd.u8cmd_tag = ivalue;
32 for (i=0; i<11; i++)
33 sbootcmd.au8dumy[i]=0x00;
34 memcpy(cardp->bulk_out_buffer, &sbootcmd, sizeof(struct bootcmdstr));
35
36 /* Issue command */
37 usb_tx_block(priv, cardp->bulk_out_buffer, sizeof(struct bootcmdstr));
38
39 return 0;
40}
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 998317571ec2..11687b84c596 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -803,6 +803,30 @@ static int if_usb_register_dev(wlan_private * priv)
803 return 0; 803 return 0;
804} 804}
805 805
806/**
807 * @brief This function issues Boot command to the Boot2 code
808 * @param ivalue 1:Boot from FW by USB-Download
809 * 2:Boot from FW in EEPROM
810 * @return 0
811 */
812static int if_usb_issue_boot_command(wlan_private *priv, int ivalue)
813{
814 struct usb_card_rec *cardp = priv->card;
815 struct bootcmdstr sbootcmd;
816 int i;
817
818 /* Prepare command */
819 sbootcmd.u32magicnumber = cpu_to_le32(BOOT_CMD_MAGIC_NUMBER);
820 sbootcmd.u8cmd_tag = ivalue;
821 for (i=0; i<11; i++)
822 sbootcmd.au8dumy[i]=0x00;
823 memcpy(cardp->bulk_out_buffer, &sbootcmd, sizeof(struct bootcmdstr));
824
825 /* Issue command */
826 usb_tx_block(priv, cardp->bulk_out_buffer, sizeof(struct bootcmdstr));
827
828 return 0;
829}
806 830
807 831
808static int if_usb_prog_firmware(wlan_private * priv) 832static int if_usb_prog_firmware(wlan_private * priv)
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h
index 156bb485e1a6..5da8c94ca4c5 100644
--- a/drivers/net/wireless/libertas/if_usb.h
+++ b/drivers/net/wireless/libertas/if_usb.h
@@ -104,6 +104,5 @@ struct fwsyncheader {
104 104
105int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); 105int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb);
106void if_usb_free(struct usb_card_rec *cardp); 106void if_usb_free(struct usb_card_rec *cardp);
107int if_usb_issue_boot_command(wlan_private *priv, int ivalue);
108 107
109#endif 108#endif