net driver fixes
Subsystems (5)
PATCH 1/1 net driver fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
Documentation/networking/driver.txt | 5 +- drivers/net/3c515.c | 60 +++++---- drivers/net/Kconfig | 3 - drivers/net/atl1/atl1_main.c | 8 +- drivers/net/bonding/bond_alb.c | 23 ++-- drivers/net/bonding/bond_main.c | 64 +++++++--- drivers/net/bonding/bond_sysfs.c | 66 ++++----- drivers/net/bonding/bonding.h | 4 +- drivers/net/cpmac.c | 2 +- drivers/net/dl2k.c | 215 +++++++++++++++--------------- drivers/net/dl2k.h | 157 +--------------------- drivers/net/ipg.c | 36 ++---- drivers/net/pcmcia/3c574_cs.c | 31 +++-- drivers/net/s2io.c | 17 ++- drivers/net/sky2.c | 24 +++- drivers/net/wan/dscc4.c | 94 +++++++------ drivers/net/wan/lmc/lmc_media.c | 12 +-- drivers/net/wan/sbni.h | 12 ++- drivers/net/wireless/b43/rfkill.c | 11 +- drivers/net/wireless/hostap/hostap_plx.c | 6 +- drivers/net/wireless/ipw2200.c | 2 +- drivers/net/wireless/libertas/if_sdio.c | 4 + drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +- drivers/net/wireless/rt2x00/rt2x00usb.c | 11 ++- 24 files changed, 387 insertions(+), 482 deletions(-)
Al Viro (9):
dscc4 endian fixes
wan/lmc bitfields fixes
sbni endian fixes
3c574, 3c515 bitfields abuse
dl2k: BMCR_t fixes
dl2k: ANAR, ANLPAR fixes
dl2k: BMSR fixes
dl2k: MSCR, MSSR, ESR, PHY_SCR fixes
dl2k: the rest
Francois Romieu (4):
ipg: balance locking in irq handler
ipg: plug Tx completion leak
ipg: fix queue stop condition in the xmit handler
ipg: fix Tx completion irq request
Ivo van Doorn (1):
rt2x00: Fix ieee80211 payload alignment
Jason Uhlenkott (1):
e1000e Kconfig: remove ref to nonexistant docs
Jay Cliburn (1):
atl1: fix frame length bug
Jay Vosburgh (7):
bonding: fix locking in sysfs primary/active selection
bonding: fix ASSERT_RTNL that produces spurious warnings
bonding: fix locking during alb failover and slave removal
bonding: release slaves when master removed via sysfs
bonding: Fix up parameter parsing
bonding: fix lock ordering for rtnl and bonding_rwsem
bonding: Don't hold lock when calling rtnl_unlock
Marc Pignat (1):
wireless/libertas support for 88w8385 sdio older revision
Matteo Croce (1):
Replace cpmac fix
Matti Linnanvuori (1):
Documentation: add a guideline for hard_start_xmit method
Randy Dunlap (1):
hostap: section mismatch warning
Sreenivasa Honnur (1):
S2io: Fixed synchronization between scheduling of napi with card reset and close
Stefano Brivio (2):
ipw2200: fix typo in kerneldoc
b43: fix use-after-free rfkill bug
Stephen Hemminger (1):
Revert "sky2: remove check for PCI wakeup setting from BIOS"
Documentation/networking/driver.txt +4 -1
@@ -61,7 +61,10 @@ Transmit path guidelines: 2) Do not forget to update netdev->trans_start to jiffies after each new tx packet is given to the hardware. -3) Do not forget that once you return 0 from your hard_start_xmit +3) A hard_start_xmit method must not modify the shared parts of a + cloned SKB. + +4) Do not forget that once you return 0 from your hard_start_xmit method, it is your driver's responsibility to free up the SKB and in some finite amount of time.
drivers/net/3c515.c +31 -29
116 lines not on this page · raw message
drivers/net/Kconfig +0 -3
@@ -1976,9 +1976,6 @@ config E1000E <http://support.intel.com> - More specific information on configuring the driver is in - <file:Documentation/networking/e1000e.txt>. - To compile this driver as a module, choose M here. The module will be called e1000e.
drivers/net/atl1/atl1_main.c +4 -4
@@ -120,7 +120,7 @@ static int __devinit atl1_sw_init(struct atl1_adapter *adapter)struct atl1_hw *hw = &adapter->hw;struct net_device *netdev = adapter->netdev; - hw->max_frame_size = netdev->mtu +ETH_HLEN +ETH_FCS_LEN ; + hw->max_frame_size = netdev->mtu +ETH_HLEN +ETH_FCS_LEN +VLAN_HLEN ; hw->min_frame_size =ETH_ZLEN +ETH_FCS_LEN ; adapter->wol =0 ;
@@ -688,7 +688,7 @@ static int atl1_change_mtu(struct net_device *netdev, int new_mtu) {struct atl1_adapter *adapter =netdev_priv (netdev);int old_mtu = netdev->mtu; -int max_frame = new_mtu +ETH_HLEN +ETH_FCS_LEN ; +int max_frame = new_mtu +ETH_HLEN +ETH_FCS_LEN +VLAN_HLEN ;if ((max_frame <ETH_ZLEN +ETH_FCS_LEN ) || (max_frame >MAX_JUMBO_FRAME_SIZE )) {
@@ -853,8 +853,8 @@ static u32 atl1_configure(struct atl1_adapter *adapter)/* set Interrupt Clear Timer */ iowrite16 (adapter->ict, hw->hw_addr +REG_CMBDISDMA_TIMER ); -/* set MTU, 4 : VLAN */ -iowrite32 (hw->max_frame_size +4 , hw->hw_addr +REG_MTU ); +/* set max frame size hw will accept */ +iowrite32 (hw->max_frame_size, hw->hw_addr +REG_MTU );/* jumbo size & rrd retirement timer */ value = (((u32) hw->rx_jumbo_th & RXQ_JMBOSZ_TH_MASK)
drivers/net/bonding/bond_alb.c +14 -9
@@ -979,7 +979,7 @@ static void alb_swap_mac_addr(struct bonding *bond, struct slave *slave1, struct/* * Send learning packets after MAC address swap. * -* Called with RTNL and bond->lock held for read. +* Called with RTNL and no other locks */ static void alb_fasten_mac_swap (struct bonding *bond,struct slave *slave1,struct slave *slave2)
@@ -987,6 +987,8 @@ static void alb_fasten_mac_swap(struct bonding *bond, struct slave *slave1,int slaves_state_differ = (SLAVE_IS_OK (slave1) !=SLAVE_IS_OK (slave2));struct slave *disabled_slave =NULL ; +ASSERT_RTNL (); +/* fasten the change in the switch */ if (SLAVE_IS_OK (slave1)) {alb_send_learning_packets (slave1, slave1->dev->dev_addr);
@@ -1031,7 +1033,7 @@ static void alb_fasten_mac_swap(struct bonding *bond, struct slave *slave1,* a slave that has @slave's permanet address as its current address. * We'll make sure that that slave no longer uses @slave's permanent address. * -* Caller must hold bond lock +* Caller must hold RTNL and no other locks */ static void alb_change_hw_addr_on_detach (struct bonding *bond,struct slave *slave) {
@@ -1542,7 +1544,12 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave)return 0 ; } -/* Caller must hold bond lock for write */ +/* +* Remove slave from tlb and rlb hash tables, and fix up MAC addresses +* if necessary. +* +* Caller must hold RTNL and no other locks +*/ void bond_alb_deinit_slave (struct bonding *bond,struct slave *slave) {if (bond->slave_cnt >1 ) {
@@ -1601,9 +1608,6 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slavestruct slave *swap_slave;int i; -if (new_slave) -ASSERT_RTNL (); -if (bond->curr_active_slave == new_slave) {return ; }
@@ -1649,6 +1653,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slavewrite_unlock_bh (&bond->curr_slave_lock);read_unlock (&bond->lock); +ASSERT_RTNL (); +/* curr_active_slave must be set before calling alb_swap_mac_addr */ if (swap_slave) {/* swap mac address */
@@ -1659,12 +1665,11 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave bond->alb_info.rlb_enabled); } -read_lock (&bond->lock); -if (swap_slave) {alb_fasten_mac_swap (bond, swap_slave, new_slave); +read_lock (&bond->lock); }else { -/* fasten bond mac on new current slave */ +read_lock (&bond->lock);alb_send_learning_packets (new_slave, bond->dev->dev_addr); }
drivers/net/bonding/bond_main.c +47 -17
137 lines not on this page · raw message
drivers/net/bonding/bond_sysfs.c +30 -36
200 lines not on this page · raw message
drivers/net/bonding/bonding.h +3 -1
@@ -141,6 +141,8 @@ struct bond_parm_tbl {int mode; }; +#define BOND_MAX_MODENAME_LEN 20 +struct vlan_entry {struct list_head vlan_list;__be32 vlan_ip;
@@ -314,7 +316,7 @@ void bond_mii_monitor(struct work_struct *);void bond_loadbalance_arp_mon (struct work_struct *);void bond_activebackup_arp_mon (struct work_struct *);void bond_set_mode_ops (struct bonding *bond,int mode); -int bond_parse_parm (char *mode_arg,struct bond_parm_tbl *tbl); +int bond_parse_parm (const char *mode_arg,struct bond_parm_tbl *tbl);void bond_select_active_slave (struct bonding *bond);void bond_change_active_slave (struct bonding *bond,struct slave *new_active);void bond_register_arp (struct bonding *);
drivers/net/cpmac.c +1 -1
@@ -459,7 +459,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)return NETDEV_TX_OK ; len =max (skb->len,ETH_ZLEN ); - queue = skb->queue_mapping; + queue =skb_get_queue_mapping (skb);#ifdef CONFIG_NETDEVICES_MULTIQUEUE netif_stop_subqueue (dev, queue);#else
drivers/net/dl2k.c +107 -108
380 lines not on this page · raw message
drivers/net/dl2k.h +2 -155
229 lines not on this page · raw message
drivers/net/ipg.c +12 -24
@@ -857,21 +857,14 @@ static void init_tfdlist(struct net_device *dev)static void ipg_nic_txfree (struct net_device *dev) {struct ipg_nic_private *sp =netdev_priv (dev); -void __iomem *ioaddr = sp->ioaddr; -unsigned int curr; -u64 txd_map; -unsigned int released, pending; - - txd_map = (u64 )sp->txd_map; - curr =ipg_r32 (TFD_LIST_PTR_0 ) - -do_div (txd_map,sizeof (struct ipg_tx )) -1 ; +unsigned int released, pending, dirty;IPG_DEBUG_MSG ("_nic_txfree\n" ); pending = sp->tx_current - sp->tx_dirty; + dirty = sp->tx_dirty %IPG_TFDLIST_LENGTH ;for (released =0 ; released < pending; released++) { -unsigned int dirty = sp->tx_dirty %IPG_TFDLIST_LENGTH ;struct sk_buff *skb = sp->TxBuff[dirty];struct ipg_tx *txfd = sp->txd + dirty;
@@ -882,11 +875,8 @@ static void ipg_nic_txfree(struct net_device *dev)* If the TFDDone bit is set, free the associated * buffer. */ -if (dirty == curr) -break ; - -/* Setup TFDDONE for compatible issue. */ - txfd->tfc |=cpu_to_le64 (IPG_TFC_TFDDONE ); +if (!(txfd->tfc &cpu_to_le64 (IPG_TFC_TFDDONE ))) +break ;/* Free the transmit buffer. */ if (skb) {
@@ -898,6 +888,7 @@ static void ipg_nic_txfree(struct net_device *dev) sp->TxBuff[dirty] =NULL ; } + dirty = (dirty +1 ) %IPG_TFDLIST_LENGTH ; } sp->tx_dirty += released;
@@ -1630,6 +1621,8 @@ static irqreturn_t ipg_interrupt_handler(int irq, void *dev_inst)#ifdef JUMBO_FRAME ipg_nic_rxrestore (dev);#endif +spin_lock (&sp->lock); +/* Get interrupt source information, and acknowledge * some (i.e. TxDMAComplete, RxDMAComplete, RxEarly, * IntRequested, MacControlFrame, LinkEvent) interrupts
@@ -1647,9 +1640,7 @@ static irqreturn_t ipg_interrupt_handler(int irq, void *dev_inst) handled =1 ;if (unlikely (!netif_running (dev))) - goto out; - -spin_lock (&sp->lock); + goto out_unlock;/* If RFDListEnd interrupt, restore all used RFDs. */ if (status &IPG_IS_RFD_LIST_END ) {
@@ -1733,9 +1724,9 @@ out_enable:ipg_w16 (IPG_IE_TX_DMA_COMPLETE |IPG_IE_RX_DMA_COMPLETE |IPG_IE_HOST_ERROR |IPG_IE_INT_REQUESTED |IPG_IE_TX_COMPLETE |IPG_IE_LINK_EVENT |IPG_IE_UPDATE_STATS ,INT_ENABLE ); - +out_unlock:spin_unlock (&sp->lock); -out: +return IRQ_RETVAL (handled); }
@@ -1943,10 +1934,7 @@ static int ipg_nic_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)*/ if (sp->tenmbpsmode) txfd->tfc |=cpu_to_le64 (IPG_TFC_TXINDICATE ); -else if (!((sp->tx_current - sp->tx_dirty +1 ) > -IPG_FRAMESBETWEENTXDMACOMPLETES )) { - txfd->tfc |=cpu_to_le64 (IPG_TFC_TXDMAINDICATE ); - } + txfd->tfc |=cpu_to_le64 (IPG_TFC_TXDMAINDICATE );/* Based on compilation option, determine if FCS is to be * appended to transmit frame by IPG. */
@@ -2003,7 +1991,7 @@ static int ipg_nic_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)ipg_w32 (IPG_DC_TX_DMA_POLL_NOW ,DMA_CTRL );if (sp->tx_current == (sp->tx_dirty +IPG_TFDLIST_LENGTH )) -netif_wake_queue (dev); +netif_stop_queue (dev);spin_unlock_irqrestore (&sp->lock, flags);
drivers/net/pcmcia/3c574_cs.c +17 -14
@@ -187,14 +187,16 @@ enum Window1 {enum Window3 {/* Window 3: MAC/config bits. */ Wn3_Config=0 , Wn3_MAC_Ctrl=6 , Wn3_Options=8 , }; -union wn3_config { -int i; -struct w3_config_fields { -unsigned int ram_size:3 , ram_width:1 , ram_speed:2 , rom_size:2 ; -int pad8:8 ; -unsigned int ram_split:2 , pad18:2 , xcvr:3 , pad21:1 , autoselect:1 ; -int pad24:7 ; - } u; +enum wn3_config { + Ram_size =7 , + Ram_width =8 , + Ram_speed =0x30 , + Rom_size =0xc0 , + Ram_split_shift =16 , + Ram_split =3 << Ram_split_shift, + Xcvr_shift =20 , + Xcvr =7 << Xcvr_shift, + Autoselect =0x1000000 , };enum Window4 {/* Window 4: Xcvr/media bits. */
@@ -342,7 +344,7 @@ static int tc574_config(struct pcmcia_device *link)kio_addr_t ioaddr;__be16 *phys_addr;char *cardname; -union wn3_config config; +__u32 config;DECLARE_MAC_BUF (mac); phys_addr = (__be16 *)dev->dev_addr;
@@ -401,9 +403,9 @@ static int tc574_config(struct pcmcia_device *link)outw (0 <<11 , ioaddr + RunnerRdCtrl);printk (KERN_INFO " ASIC rev %d," , mcr>>3 );EL3WINDOW (3 ); - config.i =inl (ioaddr + Wn3_Config); - lp->default_media = config.u.xcvr; - lp->autoselect = config.u.autoselect; + config =inl (ioaddr + Wn3_Config); + lp->default_media = (config & Xcvr) >> Xcvr_shift; + lp->autoselect = config & Autoselect ?1 :0 ; }init_timer (&lp->media);
@@ -464,8 +466,9 @@ static int tc574_config(struct pcmcia_device *link) dev->name, cardname, dev->base_addr, dev->irq, print_mac(mac, dev->dev_addr));printk (" %dK FIFO split %s Rx:Tx, %sMII interface.\n" , -8 << config.u.ram_size, ram_split[config.u.ram_split], - config.u.autoselect ?"autoselect " :"" ); +8 << config & Ram_size, + ram_split[(config & Ram_split) >> Ram_split_shift], + config & Autoselect ?"autoselect " :"" );return 0 ;
drivers/net/s2io.c +12 -5
@@ -84,7 +84,7 @@#include "s2io.h" #include "s2io-regs.h" -#define DRV_VERSION "2.0.26.10" +#define DRV_VERSION "2.0.26.17"/* S2io Driver name & version. */ static char s2io_driver_name[] ="Neterion" ;
@@ -3848,8 +3848,6 @@ static int s2io_open(struct net_device *dev)netif_carrier_off (dev); sp->last_link_state =0 ; -napi_enable (&sp->napi); -if (sp->config.intr_type ==MSI_X ) {int ret =s2io_enable_msi_x (sp);
@@ -3892,7 +3890,6 @@ static int s2io_open(struct net_device *dev)return 0 ; hw_init_failed: -napi_disable (&sp->napi);if (sp->config.intr_type ==MSI_X ) {if (sp->entries) {kfree (sp->entries);
@@ -3932,7 +3929,6 @@ static int s2io_close(struct net_device *dev)return 0 ;netif_stop_queue (dev); -napi_disable (&sp->napi);/* Reset card, kill tasklet and free Tx and Rx buffers. */ s2io_card_down (sp);
@@ -6796,6 +6792,8 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)struct XENA_dev_config __iomem *bar0 = sp->bar0;unsigned long flags; registeru64 val64 =0 ; +struct config_param *config; + config = &sp->config;if (!is_s2io_card_up (sp))return ;
@@ -6807,6 +6805,10 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io) }clear_bit (__S2IO_STATE_CARD_UP, &sp->state); +/* Disable napi */ +if (config->napi) +napi_disable (&sp->napi); +/* disable Tx and Rx traffic on the NIC */ if (do_io)stop_nic (sp);
@@ -6900,6 +6902,11 @@ static int s2io_card_up(struct s2io_nic * sp)DBG_PRINT (INFO_DBG ,"Buf in ring:%d is %d:\n" , i,atomic_read (&sp->rx_bufs_left[i])); } + +/* Initialise napi */ +if (config->napi) +napi_enable (&sp->napi); +/* Maintain the state prior to the open */ if (sp->promisc_flg) sp->promisc_flg =0 ;
drivers/net/sky2.c +19 -5
@@ -3949,7 +3949,7 @@ static __exit void sky2_debug_cleanup(void)/* Initialize network device */ static __devinit struct net_device *sky2_init_netdev (struct sky2_hw *hw,unsigned port, -int highmem) +int highmem,int wol) {struct sky2_port *sky2;struct net_device *dev =alloc_etherdev (sizeof (*sky2));
@@ -3989,7 +3989,7 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, sky2->speed =-1 ; sky2->advertising =sky2_supported_modes (hw); sky2->rx_csum = (hw->chip_id !=CHIP_ID_YUKON_XL ); - sky2->wol =sky2_wol_supported (hw) &WAKE_MAGIC ; + sky2->wol = wol;spin_lock_init (&sky2->phy_lock); sky2->tx_pending =TX_DEF_PENDING ;
@@ -4086,12 +4086,24 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)return err; } +static int __devinit pci_wake_enabled (struct pci_dev *dev) +{ +int pm =pci_find_capability (dev,PCI_CAP_ID_PM ); +u16 value; + +if (!pm) +return 0 ; +if (pci_read_config_word (dev, pm +PCI_PM_CTRL , &value)) +return 0 ; +return value &PCI_PM_CTRL_PME_ENABLE ; +} +static int __devinit sky2_probe (struct pci_dev *pdev,const struct pci_device_id *ent) {struct net_device *dev;struct sky2_hw *hw; -int err, using_dac =0 ; +int err, using_dac =0 , wol_default; err =pci_enable_device (pdev);if (err) {
@@ -4124,6 +4136,8 @@ static int __devinit sky2_probe(struct pci_dev *pdev, } } + wol_default =pci_wake_enabled (pdev) ?WAKE_MAGIC :0 ; + err = -ENOMEM ; hw =kzalloc (sizeof (*hw),GFP_KERNEL );if (!hw) {
@@ -4167,7 +4181,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,sky2_reset (hw); - dev =sky2_init_netdev (hw,0 , using_dac); + dev =sky2_init_netdev (hw,0 , using_dac, wol_default);if (!dev) { err = -ENOMEM ; goto err_out_free_pci;
@@ -4204,7 +4218,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,if (hw->ports >1 ) {struct net_device *dev1; - dev1 =sky2_init_netdev (hw,1 , using_dac); + dev1 =sky2_init_netdev (hw,1 , using_dac, wol_default);if (!dev1)dev_warn (&pdev->dev,"allocation for second device failed\n" );else if ((err =register_netdev (dev1))) {
drivers/net/wan/dscc4.c +49 -45
251 lines not on this page · raw message
drivers/net/wan/lmc/lmc_media.c +2 -10
@@ -890,16 +890,8 @@ write_av9110 (lmc_softc_t * sc, u_int32_t n, u_int32_t m, u_int32_t v,static void lmc_ssi_watchdog (lmc_softc_t *const sc) { -u_int16_t mii17; -struct ssicsr2 - { -unsigned short dtr:1 , dsr:1 , rts:1 , cable:3 , crc:1 , led0:1 , led1:1 , - led2:1 , led3:1 , fifo:1 , ll:1 , rl:1 , tm:1 , loop:1 ; - }; -struct ssicsr2 *ssicsr; - mii17 =lmc_mii_readreg (sc,0 ,17 ); - ssicsr = (struct ssicsr2 *) &mii17; -if (ssicsr->cable ==7 ) +u_int16_t mii17 =lmc_mii_readreg (sc,0 ,17 ); +if (((mii17 >>3 ) &7 ) ==7 ) {lmc_led_off (sc,LMC_MII16_LED2 ); }
drivers/net/wan/sbni.h +9 -3
@@ -44,9 +44,15 @@ enum {#define PR_RES 0x80struct sbni_csr1 { -unsigned rxl :5 ; -unsigned rate :2 ; - unsigned : 1; +#ifdef __LITTLE_ENDIAN_BITFIELD +u8 rxl :5 ; +u8 rate :2 ; + u8 : 1; +#else + u8 : 1; +u8 rate :2 ; +u8 rxl :5 ; +#endif };/* fields in frame header */
drivers/net/wireless/b43/rfkill.c +6 -5
@@ -138,8 +138,11 @@ void b43_rfkill_init(struct b43_wldev *dev) rfk->rfkill->user_claim_unsupported =1 ; rfk->poll_dev =input_allocate_polled_device (); -if (!rfk->poll_dev) - goto err_free_rfk; +if (!rfk->poll_dev) { +rfkill_free (rfk->rfkill); + goto err_freed_rfk; + } + rfk->poll_dev->private = dev; rfk->poll_dev->poll = b43_rfkill_poll; rfk->poll_dev->poll_interval =1000 ;/* msecs */
@@ -175,8 +178,7 @@ err_unreg_rfk: err_free_polldev:input_free_polled_device (rfk->poll_dev); rfk->poll_dev =NULL ; -err_free_rfk: -rfkill_free (rfk->rfkill); +err_freed_rfk: rfk->rfkill =NULL ; out_error: rfk->registered =0 ;
@@ -195,6 +197,5 @@ void b43_rfkill_exit(struct b43_wldev *dev)rfkill_unregister (rfk->rfkill);input_free_polled_device (rfk->poll_dev); rfk->poll_dev =NULL ; -rfkill_free (rfk->rfkill); rfk->rfkill =NULL ; }
drivers/net/wireless/hostap/hostap_plx.c +3 -3
@@ -608,7 +608,7 @@ static void prism2_plx_remove(struct pci_dev *pdev)MODULE_DEVICE_TABLE (pci, prism2_plx_id_table); -static struct pci_driver prism2_plx_drv_id = { +static struct pci_driver prism2_plx_driver = { .name ="hostap_plx" , .id_table = prism2_plx_id_table, .probe = prism2_plx_probe,
@@ -618,13 +618,13 @@ static struct pci_driver prism2_plx_drv_id = {static int __init init_prism2_plx (void ) { -return pci_register_driver (&prism2_plx_drv_id); +return pci_register_driver (&prism2_plx_driver); } static void __exit exit_prism2_plx(void) { -pci_unregister_driver (&prism2_plx_drv_id); +pci_unregister_driver (&prism2_plx_driver); }
drivers/net/wireless/ipw2200.c +1 -1
@@ -4935,7 +4935,7 @@ static int ipw_queue_reset(struct ipw_priv *priv)/** * Reclaim Tx queue entries no more used by NIC. * -* When FW adwances 'R' index, all entries between old and +* When FW advances 'R' index, all entries between old and * new 'R' index need to be reclaimed. As result, some free space * forms. If there is enough free space (> low mark), wake Tx queue. *
drivers/net/wireless/libertas/if_sdio.c +4 -0
@@ -871,6 +871,10 @@ static int if_sdio_probe(struct sdio_func *func,if (sscanf (func->card->info[i],"ID: %x" , &model) ==1 )break ; +if (!strcmp (func->card->info[i],"IBIS Wireless SDIO Card" )) { + model =4 ; +break ; + } }if (i == func->card->num_info) {
drivers/net/wireless/rt2x00/rt2x00pci.c +1 -1
@@ -149,7 +149,7 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)* The data behind the ieee80211 header must be * aligned on a 4 byte boundary. */ - align =NET_IP_ALIGN + (2 * (header_size %4 ==0 )); + align = header_size %4 ;/* * Allocate the sk_buffer, initialize it and copy
drivers/net/wireless/rt2x00/rt2x00usb.c +9 -2
@@ -245,13 +245,20 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)* Allocate a new sk buffer to replace the current one. * If allocation fails, we should drop the current frame * so we can recycle the existing sk buffer for the new frame. +* As alignment we use 2 and not NET_IP_ALIGN because we need +* to be sure we have 2 bytes room in the head. (NET_IP_ALIGN +* can be 0 on some hardware). We use these 2 bytes for frame +* alignment later, we assume that the chance that +* header_size % 4 == 2 is bigger then header_size % 2 == 0 +* and thus optimize alignment by reserving the 2 bytes in +* advance. */ frame_size = entry->ring->data_size + entry->ring->desc_size; - skb =dev_alloc_skb (frame_size +NET_IP_ALIGN ); + skb =dev_alloc_skb (frame_size +2 );if (!skb) goto skip_entry; -skb_reserve (skb,NET_IP_ALIGN ); +skb_reserve (skb,2 );skb_put (skb, frame_size);/*