On Tuesday 28 February 2006 18:30, Carlos Martin wrote:
> Hi,
>
> There are a couple of differences between this and my previos patch,
> so I'll list them here:
>
> - Separate the patches properly
>
> - This patchset uses the default generic functions and calls the
> appropiate function using a #define, which should be much clearer
> and saves us from having to migrate the whole common.c file.
>
> - We get the proper string for the _debug family of functions.
>
> - acx_ops.issue_cmd takes different functions depending on the debug
> level so we save a few bytes we weren't going to use otherwise. This
> also saves a function call.
>
> - Denis' sense of style has been applied, though some of it doesn't
> apply anymore and some came from me trying to do too many things at
> once which screwed up the format. I hope these are alright.
Thanks, this is nice!
I tried to build it and made some minor fixes to make it work:
* Makefile in wireless/* also needs updating.
* acx_func.h should not have acxpci_ and acxusb_ functions anymore.
Removed some of them and declared them static in pci/usb.c
(but many are left. I wonder how it is going to work at insmod time?)
* Moved acx100/111_s_create_dma_regions to acx_func.h
Keeping extern function decls in .c files is bad thing to do.
* Were missing:
adev->ops.get_txbuf = acxpci_l_get_txbuf;
adev->ops.tx_data = acxpci_l_tx_data;
* fixed adev->ops.alloc_tx = ... indentation (should be tab, not 7 spaces).
Ran entire thing thru scripts/fix_ws.sh
Regarding acxpci_ functions in acx_func.h.
For example, acx111pci_ioctl_info() is called here from ioctl.c:
static int
acx111_ioctl_info(
struct net_device *ndev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra)
{
struct iw_param *vwrq = &wrqu->param;
if (!IS_PCI(ndev2adev(ndev)))
return OK;
return acx111pci_ioctl_info(ndev, info, vwrq, extra);
}
This will reside in acx-common module. But acx111pci_ioctl_info() itself
is in pci.c and will be in acx-pci module and it has no EXPORT decl.
IIRC it won't work. modprobe will fail.
Please find my fixes attached.
I'm sooo lazy I only compile tested it.
--
vda
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/Makefile wireless-2.6.git.acx/drivers/net/wireless/Makefile
--- wireless-2.6.git.cmn/drivers/net/wireless/Makefile Wed Mar 1 07:56:14 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/Makefile Wed Mar 1 12:01:19 2006
@@ -37,7 +37,8 @@ obj-$(CONFIG_PRISM54_USB) += prism54usb/
obj-$(CONFIG_HOSTAP) += hostap/
obj-$(CONFIG_BCM43XX) += bcm43xx/
-obj-$(CONFIG_ACX) += tiacx/
+obj-$(CONFIG_ACX_PCI) += tiacx/
+obj-$(CONFIG_ACX_USB) += tiacx/
# 16-bit wireless PCMCIA client drivers
obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/Changelog wireless-2.6.git.acx/drivers/net/wireless/tiacx/Changelog
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/Changelog Sat Feb 11 14:32:12 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/Changelog Wed Mar 1 12:05:04 2006
@@ -79,7 +79,7 @@ TODO: from Efthym <[EMAIL PROTECTED]>:
* Get rid of circular list of adev's
[20060208]
-* Change the acx_ioctl_{get,set}_encode functions to use
+* Change the acx_ioctl_{get,set}_encode functions to use
the 80211 stack in the kernel, so they become mere wrappers.
[20060206]
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/Makefile wireless-2.6.git.acx/drivers/net/wireless/tiacx/Makefile
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/Makefile Wed Mar 1 11:07:19 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/Makefile Wed Mar 1 12:05:04 2006
@@ -1,13 +1,6 @@
-acx-common-y += wlan.o ioctl.o common.o
-acx-usb-y += usb.o
-acx-pci-y += pci.o
+acx-common-y := wlan.o ioctl.o common.o
+acx-usb-y := usb.o
+acx-pci-y := pci.o
obj-$(CONFIG_ACX_PCI) += acx-common.o acx-pci.o
obj-$(CONFIG_ACX_USB) += acx-common.o acx-usb.o
-
-#obj-$(CONFIG_ACX) += acx.o
-#
-#acx-obj-$(CONFIG_ACX_PCI) += pci.o
-#acx-obj-$(CONFIG_ACX_USB) += usb.o
-#
-#acx-objs := wlan.o ioctl.o common.o $(acx-obj-y)
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/README wireless-2.6.git.acx/drivers/net/wireless/tiacx/README
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/README Fri Feb 3 14:23:11 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/README Wed Mar 1 12:27:48 2006
@@ -10,7 +10,7 @@ grep for '//SM' to see the code added to
Contact:
[email protected]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Bug reports:
@@ -50,12 +50,12 @@ You need to have git and cogito installe
cg-clone rsync://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git wireless-2.6.git
cd wireless-2.6.git
# Get a branch
-cg-branch-add r-softmac-all 'rsync://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git#softmac-all'
-cg-fetch r-softmac-all
+cg-branch-add r-softmac 'rsync://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git#softmac'
+cg-fetch r-softmac
# Switch to it (make it current)
-git-checkout r-softmac-all
+git-checkout r-softmac
# Pull updates from remote master tree
-cg-update r-softmac-all
+cg-update r-softmac
You will have a complete Linux kernel in wireless-2.6.git/.
Replace drivers/net/wireless/tiacx/* by files from this tarball.
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/acx_func.h wireless-2.6.git.acx/drivers/net/wireless/tiacx/acx_func.h
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/acx_func.h Wed Mar 1 11:07:20 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/acx_func.h Wed Mar 1 12:31:08 2006
@@ -417,8 +417,6 @@ void acx_set_status(acx_device_t *adev,
#if ACX_DEBUG
/* We want to log cmd names */
-int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
-int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
#define acx_s_issue_cmd(adev, cmd, param, len) \
(adev)->ops.issue_cmd(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT, #cmd)
@@ -429,15 +427,13 @@ int acxusb_s_issue_cmd_timeo_debug(acx_d
int acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* str);
#define acx_s_configure(adev,pdr,type) \
acx_s_configure_debug(adev,pdr,type,#type)
+
int acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type, const char* str);
#define acx_s_interrogate(adev,pdr,type) \
acx_s_interrogate_debug(adev,pdr,type,#type)
#else
-int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
-int acxusb_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
-
#define acx_s_issue_cmd(adev, cmd, param, len) \
(adev)->ops.issue_cmd(adev, cmd, param, len, ACX_CMD_TIMEOUT_DEFAULT)
@@ -492,39 +488,21 @@ int acxpci_s_upload_radio(acx_device_t *
/***********************************************************************
** Unsorted yet :)
*/
-int acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
-int acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
-
#define acx_s_read_phy_reg(adev, reg, charbuf) \
(adev)->ops.read_phy_reg(adev, reg, charbuf)
-int acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
-int acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
-
#define acx_s_write_phy_reg(adev, reg, value) \
(adev)->ops.write_phy_reg(adev, reg, value)
-tx_t* acxpci_l_alloc_tx(acx_device_t *adev);
-tx_t* acxusb_l_alloc_tx(acx_device_t *adev);
-
#define acx_l_alloc_tx(adev) \
(adev)->ops.alloc_tx(adev)
-void acxusb_l_dealloc_tx(tx_t *tx_opaque);
-void acxpci_l_dealloc_tx(tx_t *tx_opaque);
-
#define acx_l_dealloc_tx(adev, tx_opaque) \
(adev)->ops.dealloc_tx(tx_opaque)
-void* acxpci_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
-void* acxusb_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
-
#define acx_l_get_txbuf(adev, tx_opaque) \
(adev)->ops.get_txbuf(adev, tx_opaque)
-void acxpci_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
-void acxusb_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
-
#define acx_l_tx_data(adev, tx_opaque, len) \
(adev)->ops.tx_data(adev, tx_opaque, len)
@@ -603,6 +581,9 @@ void acx_display_hardware_details(acx_de
int acx_e_change_mtu(struct net_device *ndev, int mtu);
struct net_device_stats* acx_e_get_stats(struct net_device *ndev);
struct iw_statistics* acx_e_get_wireless_stats(struct net_device *ndev);
+
+int acx100_s_create_dma_regions(acx_device_t *);
+int acx111_s_create_dma_regions(acx_device_t *);
int __init acxpci_e_init_module(void);
int __init acxusb_e_init_module(void);
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/common.c wireless-2.6.git.acx/drivers/net/wireless/tiacx/common.c
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/common.c Wed Mar 1 11:07:20 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/common.c Wed Mar 1 12:31:34 2006
@@ -1015,12 +1015,11 @@ acx111_ie_len_dot11[] = {
#if !ACX_DEBUG
int
acx_s_configure(acx_device_t *adev, void *pdr, int type)
-{
#else
int
acx_s_configure_debug(acx_device_t *adev, void *pdr, int type, const char* typestr)
-{
#endif
+{
u16 len;
int res;
@@ -1053,13 +1052,12 @@ acx_s_configure_debug(acx_device_t *adev
#if !ACX_DEBUG
int
acx_s_interrogate(acx_device_t *adev, void *pdr, int type)
-{
#else
int
acx_s_interrogate_debug(acx_device_t *adev, void *pdr, int type,
const char* typestr)
-{
#endif
+{
u16 len;
int res;
@@ -1311,7 +1309,7 @@ acx_s_proc_diag_output(char *buf, acx_de
st -= 2*sizeof(u32);
/* our parsing doesn't quite match this firmware yet,
- * log failure */
+ * log failure */
if (st > st_end)
goto fw_stats_fail;
temp1 = temp2 = 999999999;
@@ -1368,7 +1366,7 @@ acx_s_proc_diag_output(char *buf, acx_de
irq = (fw_stats_irq_t *)st;
partlen = sizeof(fw_stats_irq_t);
st += partlen;
-
+
if (st > st_end)
goto fw_stats_fail;
@@ -1408,7 +1406,7 @@ acx_s_proc_diag_output(char *buf, acx_de
wep = (fw_stats_wep_t *)st;
partlen = sizeof(fw_stats_wep_t);
st += partlen;
-
+
if (
(IS_PCI(adev) && IS_ACX100(adev))
|| (IS_USB(adev) && IS_ACX100(adev))
@@ -1442,7 +1440,7 @@ acx_s_proc_diag_output(char *buf, acx_de
temp2);
part_str = "power";
-
+
if (st == st_end)
goto fw_stats_end;
@@ -1470,7 +1468,7 @@ acx_s_proc_diag_output(char *buf, acx_de
pwr->no_lppd_matching_frame);
part_str = "MIC";
-
+
if (st == st_end)
goto fw_stats_end;
@@ -1487,9 +1485,9 @@ acx_s_proc_diag_output(char *buf, acx_de
part_str,
mic->mic_rx_pkts,
mic->mic_calc_fail);
-
+
part_str = "AES";
-
+
if (st == st_end)
goto fw_stats_end;
@@ -1514,7 +1512,7 @@ acx_s_proc_diag_output(char *buf, acx_de
aes->aes_dec_irq);
part_str = "event";
-
+
if (st == st_end)
goto fw_stats_end;
@@ -1557,7 +1555,7 @@ fw_stats_bigger:
for (; st < st_end; st += 4)
p += sprintf(p,
"UNKN%3d: %u\n", (int)st - (int)fw_stats, *(u32 *)st);
-
+
fw_stats_end:
kfree(fw_stats);
@@ -2151,7 +2149,7 @@ bad:
** Note that this fn messes up heavily with hardware, but we cannot
** lock it (we need to sleep). Not a problem since IRQs can't happen
*/
-static int
+int
acx100_s_create_dma_regions(acx_device_t *adev)
{
acx100_ie_queueconfig_t queueconf;
@@ -2245,7 +2243,7 @@ EXPORT_SYMBOL_GPL(acx100_s_create_dma_re
*/
#define ACX111_PERCENT(percent) ((percent)/5)
-static int
+int
acx111_s_create_dma_regions(acx_device_t *adev)
{
struct acx111_ie_memoryconfig memconf;
@@ -3042,7 +3040,7 @@ _TODO_ieee80211_rx_any(struct ieee80211_
if ((fc & IEEE80211_FCTL_VERS) != 0)
return -EINVAL;
-
+
switch (fc & IEEE80211_FCTL_FTYPE) {
case IEEE80211_FTYPE_MGMT:
ieee80211_rx_mgt(ieee, hdr, stats);
@@ -3166,12 +3164,12 @@ acx_l_softmac_process_rxbuf(acx_device_t
memset(&stats, 0, sizeof(stats));
stats.mac_time = le16_to_cpu(rxbuf->time);
- //stats.rssi =
+ //stats.rssi =
stats.signal = rxbuf->phy_snr;
stats.noise = rxbuf->phy_level;
stats.rate = rxbuf->phy_plcp_signal / 5;
stats.received_channel = adev->channel;
- //stats.control =
+ //stats.control =
stats.mask = 0
| IEEE80211_STATMASK_SIGNAL
| IEEE80211_STATMASK_NOISE
@@ -3452,7 +3450,7 @@ acx_i_ieee80211_start_xmit(struct ieee80
acx_lock(adev, flags);
- for (i = 0; i < txb->nr_frags; i++) {
+ for (i = 0; i < txb->nr_frags; i++) {
tx_t *tx;
void *txbuf;
struct sk_buff *skb = txb->fragments[i];
@@ -3475,7 +3473,7 @@ acx_i_ieee80211_start_xmit(struct ieee80
//ndev->trans_start = jiffies;
//adev->stats.tx_packets++;
//adev->stats.tx_bytes += skb->len;
- }
+ }
rc = 0;
end:
@@ -7492,7 +7490,7 @@ acx_e_ieee80211_set_security(struct net_
adev->ieee->sec.flags |= SEC_ACTIVE_KEY;
} else
adev->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
-
+
} else
adev->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
@@ -7519,7 +7517,7 @@ acx_e_ieee80211_set_security(struct net_
adev->ieee->sec.flags |= SEC_LEVEL;
SET_BIT(adev->set_mask, GETSET_WEP);
}
-
+
acx_unlock(adev, flags);
acx_sem_unlock(adev);
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/pci.c wireless-2.6.git.acx/drivers/net/wireless/tiacx/pci.c
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/pci.c Wed Mar 1 11:07:20 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/pci.c Wed Mar 1 12:05:04 2006
@@ -105,8 +105,17 @@ static int acxpci_e_close(struct net_dev
static void acxpci_s_up(struct net_device *ndev);
static void acxpci_s_down(struct net_device *ndev);
-extern int acx100_s_create_dma_regions(acx_device_t *);
-extern int acx111_s_create_dma_regions(acx_device_t *);
+#if ACX_DEBUG
+static int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
+#else
+static int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
+#endif
+static int acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
+static int acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
+static tx_t* acxpci_l_alloc_tx(acx_device_t *adev);
+static void acxpci_l_dealloc_tx(tx_t *tx_opaque);
+static void* acxpci_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
+static void acxpci_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
#ifdef MODULE_LICENSE
MODULE_LICENSE("Dual MPL/GPL");
@@ -418,7 +427,7 @@ end:
** Messing with rx/tx disabling and enabling here
** (write_reg32(adev, IO_ACX_ENABLE, 0b000000xx)) kills traffic
*/
-int
+static int
acxpci_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
{
int result = NOT_OK;
@@ -459,7 +468,7 @@ fail:
/***********************************************************************
*/
-int
+static int
acxpci_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
{
FN_ENTER;
@@ -1013,8 +1022,8 @@ end:
#undef FUNC
#define FUNC "issue_cmd"
+static int
#if !ACX_DEBUG
-int
acxpci_s_issue_cmd_timeo(
acx_device_t *adev,
unsigned int cmd,
@@ -1023,7 +1032,6 @@ acxpci_s_issue_cmd_timeo(
unsigned cmd_timeout)
{
#else
-int
acxpci_s_issue_cmd_timeo_debug(
acx_device_t *adev,
unsigned cmd,
@@ -1602,22 +1610,24 @@ acxpci_e_probe(struct pci_dev *pdev, con
adev->ieee->sec.enabled = 0;
adev->ieee->sec.auth_mode = WLAN_AUTH_OPEN;
+ if (IS_ACX100(adev)) {
+ adev->ops.create_dma_regions = acx100_s_create_dma_regions;
+ } else {
+ adev->ops.create_dma_regions = acx111_s_create_dma_regions;
+ }
+ adev->ops.delete_dma_regions = acxpci_s_delete_dma_regions;
#if ACX_DEBUG
- adev->ops.issue_cmd = acxpci_s_issue_cmd_timeo_debug;
+ adev->ops.issue_cmd = acxpci_s_issue_cmd_timeo_debug;
#else
- adev->ops.issue_cmd = acxpci_s_issue_cmd_timeo;
+ adev->ops.issue_cmd = acxpci_s_issue_cmd_timeo;
#endif /* ACX_DEBUG */
- adev->ops.alloc_tx = acxpci_l_alloc_tx;
- adev->ops.dealloc_tx = acxpci_l_dealloc_tx;
- adev->ops.delete_dma_regions = acxpci_s_delete_dma_regions;
- adev->ops.write_phy_reg = acxpci_s_write_phy_reg;
- adev->ops.read_phy_reg = acxpci_s_read_phy_reg;
-
- if (IS_ACX100(adev)) {
- adev->ops.create_dma_regions = acx100_s_create_dma_regions;
- } else {
- adev->ops.create_dma_regions = acx111_s_create_dma_regions;
- }
+ adev->ops.alloc_tx = acxpci_l_alloc_tx;
+ adev->ops.dealloc_tx = acxpci_l_dealloc_tx;
+ adev->ops.get_txbuf = acxpci_l_get_txbuf;
+ adev->ops.tx_data = acxpci_l_tx_data;
+ adev->ops.write_phy_reg = acxpci_s_write_phy_reg;
+ adev->ops.read_phy_reg = acxpci_s_read_phy_reg;
+
#ifdef NONESSENTIAL_FEATURES
acx_show_card_eeprom_id(adev);
#endif /* NONESSENTIAL_FEATURES */
@@ -3025,7 +3035,7 @@ acx100pci_ioctl_set_phy_amp_bias(
** after figuring out how many we need and whether we still have
** sufficiently many.
*/
-tx_t*
+static tx_t*
acxpci_l_alloc_tx(acx_device_t *adev)
{
struct txdesc *txdesc;
@@ -3085,7 +3095,7 @@ acxpci_l_dealloc_tx(tx_t *tx_opaque)
/***********************************************************************
*/
-void*
+static void*
acxpci_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
{
return get_txhostdesc(adev, (txdesc_t*)tx_opaque)->data;
@@ -3102,7 +3112,7 @@ acxpci_l_get_txbuf(acx_device_t *adev, t
** pre-allocated tx descrs, properly setting up transfer data and
** CTL_xxx flags according to fragment number.
*/
-void
+static void
acxpci_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int len)
{
txdesc_t *txdesc = (txdesc_t*)tx_opaque;
diff -urp wireless-2.6.git.cmn/drivers/net/wireless/tiacx/usb.c wireless-2.6.git.acx/drivers/net/wireless/tiacx/usb.c
--- wireless-2.6.git.cmn/drivers/net/wireless/tiacx/usb.c Wed Mar 1 11:07:20 2006
+++ wireless-2.6.git.acx/drivers/net/wireless/tiacx/usb.c Wed Mar 1 12:05:04 2006
@@ -123,7 +123,17 @@ static void acxusb_l_poll_rx(acx_device_
static void acxusb_i_tx_timeout(struct net_device *);
-extern int acx100_s_create_dma_regions(acx_device_t *);
+#if ACX_DEBUG
+static int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
+#else
+static int acxusb_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
+#endif
+static int acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf);
+static int acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value);
+static tx_t* acxusb_l_alloc_tx(acx_device_t *adev);
+static void acxusb_l_dealloc_tx(tx_t *tx_opaque);
+static void* acxusb_l_get_txbuf(acx_device_t *adev, tx_t *tx_opaque);
+static void acxusb_l_tx_data(acx_device_t *adev, tx_t *tx_opaque, int len);
/* static void dump_device(struct usb_device *); */
/* static void dump_device_descriptor(struct usb_device_descriptor *); */
@@ -222,7 +232,7 @@ acxusb_unlink_urb(struct urb* urb)
/***********************************************************************
** acxusb_s_read_phy_reg
*/
-int
+static int
acxusb_s_read_phy_reg(acx_device_t *adev, u32 reg, u8 *charbuf)
{
/* mem_read_write_t mem; */
@@ -247,7 +257,7 @@ acxusb_s_read_phy_reg(acx_device_t *adev
/***********************************************************************
*/
-int
+static int
acxusb_s_write_phy_reg(acx_device_t *adev, u32 reg, u8 value)
{
mem_read_write_t mem;
@@ -281,17 +291,15 @@ acxusb_s_write_phy_reg(acx_device_t *ade
#undef FUNC
#define FUNC "issue_cmd"
+static int
#if !ACX_DEBUG
-int
acxusb_s_issue_cmd_timeo(
acx_device_t *adev,
unsigned cmd,
void *buffer,
unsigned buflen,
unsigned timeout)
-{
#else
-int
acxusb_s_issue_cmd_timeo_debug(
acx_device_t *adev,
unsigned cmd,
@@ -299,8 +307,8 @@ acxusb_s_issue_cmd_timeo_debug(
unsigned buflen,
unsigned timeout,
const char* cmdstr)
-{
#endif
+{
/* USB ignores timeout param */
struct usb_device *usbdev;
@@ -898,17 +906,19 @@ acxusb_e_probe(struct usb_interface *int
adev->ieee->sec.encrypt = 0;
adev->ieee->sec.auth_mode = WLAN_AUTH_OPEN;
+ adev->ops.create_dma_regions = acx100_s_create_dma_regions;
+ adev->ops.delete_dma_regions = acxusb_s_delete_dma_regions;
#if ACX_DEBUG
adev->ops.issue_cmd = acxusb_s_issue_cmd_timeo_debug;
#else
- adev->ops.issue_cmd = acxusb_s_issue_cmd_timeo;
+ adev->ops.issue_cmd = acxusb_s_issue_cmd_timeo;
#endif /* ACX_DEBUG */
- adev->ops.alloc_tx = acxusb_l_alloc_tx;
- adev->ops.dealloc_tx = acxusb_l_dealloc_tx;
- adev->ops.delete_dma_regions = acxusb_s_delete_dma_regions;
- adev->ops.write_phy_reg = acxusb_s_write_phy_reg;
- adev->ops.read_phy_reg = acxusb_s_read_phy_reg;
- adev->ops.create_dma_regions = acx100_s_create_dma_regions;
+ adev->ops.alloc_tx = acxusb_l_alloc_tx;
+ adev->ops.dealloc_tx = acxusb_l_dealloc_tx;
+ adev->ops.get_txbuf = acxusb_l_get_txbuf;
+ adev->ops.tx_data = acxusb_l_tx_data;
+ adev->ops.write_phy_reg = acxusb_s_write_phy_reg;
+ adev->ops.read_phy_reg = acxusb_s_read_phy_reg;
/* Check that this is really the hardware we know about.
** If not sure, at least notify the user that he
@@ -1610,7 +1620,7 @@ end_unlock:
** acxusb_l_alloc_tx
** Actually returns a usb_tx_t* ptr
*/
-tx_t*
+static tx_t*
acxusb_l_alloc_tx(acx_device_t *adev)
{
usb_tx_t *tx;
@@ -1648,7 +1658,7 @@ end:
/***************************************************************
** Used if alloc_tx()'ed buffer needs to be cancelled without doing tx
*/
-void
+static void
acxusb_l_dealloc_tx(tx_t *tx_opaque)
{
usb_tx_t* tx = (usb_tx_t*)tx_opaque;
@@ -1658,7 +1668,7 @@ acxusb_l_dealloc_tx(tx_t *tx_opaque)
/***************************************************************
*/
-void*
+static void*
acxusb_l_get_txbuf(acx_device_t *adev, tx_t* tx_opaque)
{
usb_tx_t* tx = (usb_tx_t*)tx_opaque;
@@ -1672,7 +1682,7 @@ acxusb_l_get_txbuf(acx_device_t *adev, t
** Can be called from IRQ (rx -> (AP bridging or mgmt response) -> tx).
** Can be called from acx_i_start_xmit (data frames from net core).
*/
-void
+static void
acxusb_l_tx_data(acx_device_t *adev, tx_t* tx_opaque, int wlanpkt_len)
{
struct usb_device *usbdev;