Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197427
b: refs/heads/master
c: 93822ad
h: refs/heads/master
i:
  197425: 5d2d11d
  197423: c5e037f
v: v3
  • Loading branch information
Henk de Groot authored and Greg Kroah-Hartman committed May 14, 2010
1 parent 5e9f361 commit f5a2e13
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 77 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97a0638218fc504d645c45ff03256dc4520efa72
refs/heads/master: 93822ad193f1b1d92422dc3d539456acbe1a85ef
14 changes: 0 additions & 14 deletions trunk/drivers/staging/wlags49_h2/dhf.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,6 @@
/* 12345678901234 */
char signature[14] = "FUPU7D37dhfwci";

/* The binary download function "relocates" the image using constructions like:
fw->identity = (CFG_IDENTITY_STRCT FAR *)((char FAR *)fw->identity + (hcf_32)fw );
under some of the memory models under MSVC 1.52 these constructions degrade to 16-bits pointer arithmetic.
fw->identity is limited, such that adding it to fw, does not need to carry over from offset to segment.
However the segment is not set at all.
As a workaround the PSEUDO_CHARP macro is introduced which is a char pointer except for MSVC 1.52, in
which case we know that a 32-bit quantity is adequate as a pointer.
Note that other platforms may experience comparable problems when using the binary download feature. */
#if defined(_MSC_VER) && _MSC_VER == 800 /* Visual C++ 1.5 */
#define PSEUDO_CHARP hcf_32
#else
#define PSEUDO_CHARP (hcf_8 *)
#endif

/*-----------------------------------------------------------------------------
*
* LTV-records retrieved from the NIC to:
Expand Down
30 changes: 12 additions & 18 deletions trunk/drivers/staging/wlags49_h2/wl_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@
#include <wl_sysfs.h>


/*******************************************************************************
* macro definitions
******************************************************************************/
#define CS_CHECK(fn, ret) do { \
last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; \
} while (0)

/*******************************************************************************
* global definitions
******************************************************************************/
Expand Down Expand Up @@ -305,7 +298,7 @@ void wl_adapter_insert( struct pcmcia_device *link )
{
struct net_device *dev;
int i;
int last_fn, last_ret;
int ret;
/*------------------------------------------------------------------------*/

DBG_FUNC( "wl_adapter_insert" );
Expand All @@ -317,10 +310,17 @@ void wl_adapter_insert( struct pcmcia_device *link )
/* Do we need to allocate an interrupt? */
link->conf.Attributes |= CONF_ENABLE_IRQ;

// CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io));
// CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
// CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
ret = pcmcia_request_io(link, &link->io);
if (ret != 0)
goto failed;

ret = pcmcia_request_irq(link, (void *) wl_isr);
if (ret != 0)
goto failed;

ret = pcmcia_request_configuration(link, &link->conf);
if (ret != 0)
goto failed;

dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
Expand All @@ -330,8 +330,7 @@ void wl_adapter_insert( struct pcmcia_device *link )
printk("%s: register_netdev() failed\n", MODULE_NAME);
goto failed;
}
link->dev_node = &( wl_priv(dev) )->node;
strcpy(( wl_priv(dev) )->node.dev_name, dev->name);

register_wlags_sysfs(dev);

printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
Expand All @@ -343,11 +342,6 @@ void wl_adapter_insert( struct pcmcia_device *link )
DBG_LEAVE( DbgInfo );
return;


cs_failed:
// cs_error( link, last_fn, last_ret );


failed:
wl_adapter_release( link );

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/wlags49_h2/wl_cs.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ int wl_adapter_close(struct net_device *dev);

int wl_adapter_is_open(struct net_device *dev);

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
void cs_error(client_handle_t handle, int func, int ret);
#endif

const char *DbgEvent( int mask );


Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/staging/wlags49_h2/wl_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
******************************************************************************/
#include <linux/version.h>
#ifdef BUS_PCMCIA
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
#include <pcmcia/version.h>
#endif
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
Expand Down Expand Up @@ -866,7 +863,6 @@ struct wl_private
{

#ifdef BUS_PCMCIA
dev_node_t node;
struct pcmcia_device *link;
#endif // BUS_PCMCIA

Expand Down Expand Up @@ -1013,13 +1009,13 @@ extern inline struct wl_private *wl_priv(struct net_device *dev)
* SPARC, due to its weird semantics for save/restore flags. extern
* inline should prevent the kernel from linking or module from
* loading if they are not inlined. */
extern inline void wl_lock(struct wl_private *lp,
static inline void wl_lock(struct wl_private *lp,
unsigned long *flags)
{
spin_lock_irqsave(&lp->slock, *flags);
}

extern inline void wl_unlock(struct wl_private *lp,
static inline void wl_unlock(struct wl_private *lp,
unsigned long *flags)
{
spin_unlock_irqrestore(&lp->slock, *flags);
Expand Down
27 changes: 0 additions & 27 deletions trunk/drivers/staging/wlags49_h2/wl_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,10 @@ static void wl_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
// strncpy(info.fw_version, priv->fw_name,
// sizeof(info.fw_version) - 1);

#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20))
if (dev->dev.parent) {
dev_set_name(dev->dev.parent, "%s", info->bus_info);
//strncpy(info->bus_info, dev->dev.parent->bus_id,
// sizeof(info->bus_info) - 1);
#else
if (dev->class_dev.parent) {
sizeof(info->bus_info) - 1);
#endif
} else {
snprintf(info->bus_info, sizeof(info->bus_info) - 1,
"PCMCIA FIXME");
Expand Down Expand Up @@ -1179,7 +1174,6 @@ void wl_multicast( struct net_device *dev, int num_addrs, void *addrs )

#endif /* NEW_MULTICAST */

#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
static const struct net_device_ops wl_netdev_ops =
{
.ndo_start_xmit = &wl_tx_port0,
Expand All @@ -1199,7 +1193,6 @@ static const struct net_device_ops wl_netdev_ops =
.ndo_poll_controller = wl_poll,
#endif
};
#endif // (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))

/*******************************************************************************
* wl_device_alloc()
Expand Down Expand Up @@ -1253,27 +1246,7 @@ struct net_device * wl_device_alloc( void )
lp->wireless_data.spy_data = &lp->spy_data;
dev->wireless_data = &lp->wireless_data;

#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
dev->netdev_ops = &wl_netdev_ops;
#else
dev->hard_start_xmit = &wl_tx_port0;

dev->set_config = &wl_config;
dev->get_stats = &wl_stats;
dev->set_multicast_list = &wl_multicast;

dev->init = &wl_insert;
dev->open = &wl_adapter_open;
dev->stop = &wl_adapter_close;
dev->do_ioctl = &wl_ioctl;

dev->tx_timeout = &wl_tx_timeout;

#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = wl_poll;
#endif

#endif // (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))

dev->watchdog_timeo = TX_TIMEOUT;

Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/staging/wlags49_h2/wl_wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,10 @@
in the build. */
#ifdef WIRELESS_EXT

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
#define IWE_STREAM_ADD_EVENT(info, buf, end, iwe, len) \
iwe_stream_add_event(buf, end, iwe, len)
#define IWE_STREAM_ADD_POINT(info, buf, end, iwe, msg) \
iwe_stream_add_point(buf, end, iwe, msg)
#else
#define IWE_STREAM_ADD_EVENT(info, buf, end, iwe, len) \
iwe_stream_add_event(info, buf, end, iwe, len)
#define IWE_STREAM_ADD_POINT(info, buf, end, iwe, msg) \
iwe_stream_add_point(info, buf, end, iwe, msg)
#endif



Expand Down

0 comments on commit f5a2e13

Please sign in to comment.