forked from Minki/linux
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/hp-plus.c drivers/net/wireless/ath5k/base.c drivers/net/wireless/ath9k/recv.c net/wireless/reg.c
This commit is contained in:
commit
5b9ab2ec04
@ -113,7 +113,7 @@ obj-$(CONFIG_EL2) += 3c503.o 8390p.o
|
|||||||
obj-$(CONFIG_NE2000) += ne.o 8390p.o
|
obj-$(CONFIG_NE2000) += ne.o 8390p.o
|
||||||
obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o
|
obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o
|
||||||
obj-$(CONFIG_HPLAN) += hp.o 8390p.o
|
obj-$(CONFIG_HPLAN) += hp.o 8390p.o
|
||||||
obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o
|
obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o
|
||||||
obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
|
obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
|
||||||
obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o
|
obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o
|
||||||
obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o
|
obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o
|
||||||
|
@ -1035,10 +1035,6 @@ MODULE_PARM_DESC(copybreak, "Receive copy threshold");
|
|||||||
* @pdev: the PCI device that received the packet
|
* @pdev: the PCI device that received the packet
|
||||||
* @fl: the SGE free list holding the packet
|
* @fl: the SGE free list holding the packet
|
||||||
* @len: the actual packet length, excluding any SGE padding
|
* @len: the actual packet length, excluding any SGE padding
|
||||||
* @dma_pad: padding at beginning of buffer left by SGE DMA
|
|
||||||
* @skb_pad: padding to be used if the packet is copied
|
|
||||||
* @copy_thres: length threshold under which a packet should be copied
|
|
||||||
* @drop_thres: # of remaining buffers before we start dropping packets
|
|
||||||
*
|
*
|
||||||
* Get the next packet from a free list and complete setup of the
|
* Get the next packet from a free list and complete setup of the
|
||||||
* sk_buff. If the packet is small we make a copy and recycle the
|
* sk_buff. If the packet is small we make a copy and recycle the
|
||||||
|
@ -343,7 +343,6 @@ no_buffers:
|
|||||||
/**
|
/**
|
||||||
* e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers
|
* e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers
|
||||||
* @adapter: address of board private structure
|
* @adapter: address of board private structure
|
||||||
* @rx_ring: pointer to receive ring structure
|
|
||||||
* @cleaned_count: number of buffers to allocate this pass
|
* @cleaned_count: number of buffers to allocate this pass
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -161,14 +161,14 @@ out:
|
|||||||
static const struct net_device_ops hpp_netdev_ops = {
|
static const struct net_device_ops hpp_netdev_ops = {
|
||||||
.ndo_open = hpp_open,
|
.ndo_open = hpp_open,
|
||||||
.ndo_stop = hpp_close,
|
.ndo_stop = hpp_close,
|
||||||
.ndo_start_xmit = ei_start_xmit,
|
.ndo_start_xmit = eip_start_xmit,
|
||||||
.ndo_tx_timeout = ei_tx_timeout,
|
.ndo_tx_timeout = eip_tx_timeout,
|
||||||
.ndo_get_stats = ei_get_stats,
|
.ndo_get_stats = eip_get_stats,
|
||||||
.ndo_set_multicast_list = ei_set_multicast_list,
|
.ndo_set_multicast_list = eip_set_multicast_list,
|
||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
.ndo_change_mtu = eth_change_mtu,
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
.ndo_poll_controller = ei_poll,
|
.ndo_poll_controller = eip_poll,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1975,7 +1975,6 @@ static void igb_configure_rx(struct igb_adapter *adapter)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* igb_free_tx_resources - Free Tx Resources per Queue
|
* igb_free_tx_resources - Free Tx Resources per Queue
|
||||||
* @adapter: board private structure
|
|
||||||
* @tx_ring: Tx descriptor ring for a specific queue
|
* @tx_ring: Tx descriptor ring for a specific queue
|
||||||
*
|
*
|
||||||
* Free all transmit software resources
|
* Free all transmit software resources
|
||||||
@ -2028,7 +2027,6 @@ static void igb_unmap_and_free_tx_resource(struct igb_adapter *adapter,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* igb_clean_tx_ring - Free Tx Buffers
|
* igb_clean_tx_ring - Free Tx Buffers
|
||||||
* @adapter: board private structure
|
|
||||||
* @tx_ring: ring to be cleaned
|
* @tx_ring: ring to be cleaned
|
||||||
**/
|
**/
|
||||||
static void igb_clean_tx_ring(struct igb_ring *tx_ring)
|
static void igb_clean_tx_ring(struct igb_ring *tx_ring)
|
||||||
@ -2075,7 +2073,6 @@ static void igb_clean_all_tx_rings(struct igb_adapter *adapter)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* igb_free_rx_resources - Free Rx Resources
|
* igb_free_rx_resources - Free Rx Resources
|
||||||
* @adapter: board private structure
|
|
||||||
* @rx_ring: ring to clean the resources from
|
* @rx_ring: ring to clean the resources from
|
||||||
*
|
*
|
||||||
* Free all receive software resources
|
* Free all receive software resources
|
||||||
@ -2115,7 +2112,6 @@ static void igb_free_all_rx_resources(struct igb_adapter *adapter)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* igb_clean_rx_ring - Free Rx Buffers per Queue
|
* igb_clean_rx_ring - Free Rx Buffers per Queue
|
||||||
* @adapter: board private structure
|
|
||||||
* @rx_ring: ring to free buffers from
|
* @rx_ring: ring to free buffers from
|
||||||
**/
|
**/
|
||||||
static void igb_clean_rx_ring(struct igb_ring *rx_ring)
|
static void igb_clean_rx_ring(struct igb_ring *rx_ring)
|
||||||
|
@ -1352,7 +1352,6 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
|
|||||||
* ixgbe_intr - legacy mode Interrupt Handler
|
* ixgbe_intr - legacy mode Interrupt Handler
|
||||||
* @irq: interrupt number
|
* @irq: interrupt number
|
||||||
* @data: pointer to a network interface device structure
|
* @data: pointer to a network interface device structure
|
||||||
* @pt_regs: CPU registers structure
|
|
||||||
**/
|
**/
|
||||||
static irqreturn_t ixgbe_intr(int irq, void *data)
|
static irqreturn_t ixgbe_intr(int irq, void *data)
|
||||||
{
|
{
|
||||||
|
@ -778,6 +778,7 @@ static struct pcmcia_device_id axnet_ids[] = {
|
|||||||
PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),
|
PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),
|
||||||
PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),
|
PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),
|
||||||
PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),
|
PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),
|
||||||
|
PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875),
|
||||||
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),
|
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),
|
||||||
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),
|
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),
|
||||||
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),
|
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),
|
||||||
@ -1173,7 +1174,6 @@ static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
* ax_interrupt - handle the interrupts from an 8390
|
* ax_interrupt - handle the interrupts from an 8390
|
||||||
* @irq: interrupt number
|
* @irq: interrupt number
|
||||||
* @dev_id: a pointer to the net_device
|
* @dev_id: a pointer to the net_device
|
||||||
* @regs: unused
|
|
||||||
*
|
*
|
||||||
* Handle the ether interface interrupts. We pull packets from
|
* Handle the ether interface interrupts. We pull packets from
|
||||||
* the 8390 via the card specific functions and fire them at the networking
|
* the 8390 via the card specific functions and fire them at the networking
|
||||||
|
@ -1692,7 +1692,6 @@ static struct pcmcia_device_id pcnet_ids[] = {
|
|||||||
PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8),
|
PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8),
|
||||||
PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76),
|
PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76),
|
||||||
PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e),
|
PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e),
|
||||||
PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875),
|
|
||||||
PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f),
|
PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f),
|
||||||
PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1),
|
PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1),
|
||||||
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
|
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
|
||||||
|
@ -227,8 +227,17 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr)
|
|||||||
if (r)
|
if (r)
|
||||||
return ERR_PTR(r);
|
return ERR_PTR(r);
|
||||||
|
|
||||||
/* If the phy_id is all Fs or all 0s, there is no device there */
|
/* If the phy_id is mostly Fs, there is no device there */
|
||||||
if ((0xffff == phy_id) || (0x00 == phy_id))
|
if ((phy_id & 0x1fffffff) == 0x1fffffff)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Broken hardware is sometimes missing the pull down resistor on the
|
||||||
|
* MDIO line, which results in reads to non-existent devices returning
|
||||||
|
* 0 rather than 0xffff. Catch this here and treat 0 as a non-existent
|
||||||
|
* device as well.
|
||||||
|
*/
|
||||||
|
if (phy_id == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dev = phy_device_create(bus, addr, phy_id);
|
dev = phy_device_create(bus, addr, phy_id);
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
#define MII_VSC8244_IMASK_DUPLEX 0x1000
|
#define MII_VSC8244_IMASK_DUPLEX 0x1000
|
||||||
#define MII_VSC8244_IMASK_MASK 0xf000
|
#define MII_VSC8244_IMASK_MASK 0xf000
|
||||||
|
|
||||||
|
#define MII_VSC8221_IMASK_MASK 0xa000
|
||||||
|
|
||||||
/* Vitesse Interrupt Status Register */
|
/* Vitesse Interrupt Status Register */
|
||||||
#define MII_VSC8244_ISTAT 0x1a
|
#define MII_VSC8244_ISTAT 0x1a
|
||||||
#define MII_VSC8244_ISTAT_STATUS 0x8000
|
#define MII_VSC8244_ISTAT_STATUS 0x8000
|
||||||
@ -49,6 +51,12 @@
|
|||||||
#define MII_VSC8244_AUXCONSTAT_GBIT 0x0010
|
#define MII_VSC8244_AUXCONSTAT_GBIT 0x0010
|
||||||
#define MII_VSC8244_AUXCONSTAT_100 0x0008
|
#define MII_VSC8244_AUXCONSTAT_100 0x0008
|
||||||
|
|
||||||
|
#define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */
|
||||||
|
#define MII_VSC8221_AUXCONSTAT_RESERVED 0x0004
|
||||||
|
|
||||||
|
#define PHY_ID_VSC8244 0x000fc6c0
|
||||||
|
#define PHY_ID_VSC8221 0x000fc550
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Vitesse PHY driver");
|
MODULE_DESCRIPTION("Vitesse PHY driver");
|
||||||
MODULE_AUTHOR("Kriston Carson");
|
MODULE_AUTHOR("Kriston Carson");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
@ -95,13 +103,15 @@ static int vsc824x_ack_interrupt(struct phy_device *phydev)
|
|||||||
return (err < 0) ? err : 0;
|
return (err < 0) ? err : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vsc824x_config_intr(struct phy_device *phydev)
|
static int vsc82xx_config_intr(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||||
err = phy_write(phydev, MII_VSC8244_IMASK,
|
err = phy_write(phydev, MII_VSC8244_IMASK,
|
||||||
MII_VSC8244_IMASK_MASK);
|
phydev->drv->phy_id == PHY_ID_VSC8244 ?
|
||||||
|
MII_VSC8244_IMASK_MASK :
|
||||||
|
MII_VSC8221_IMASK_MASK);
|
||||||
else {
|
else {
|
||||||
/*
|
/*
|
||||||
* The Vitesse PHY cannot clear the interrupt
|
* The Vitesse PHY cannot clear the interrupt
|
||||||
@ -120,7 +130,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
|
|||||||
|
|
||||||
/* Vitesse 824x */
|
/* Vitesse 824x */
|
||||||
static struct phy_driver vsc8244_driver = {
|
static struct phy_driver vsc8244_driver = {
|
||||||
.phy_id = 0x000fc6c0,
|
.phy_id = PHY_ID_VSC8244,
|
||||||
.name = "Vitesse VSC8244",
|
.name = "Vitesse VSC8244",
|
||||||
.phy_id_mask = 0x000fffc0,
|
.phy_id_mask = 0x000fffc0,
|
||||||
.features = PHY_GBIT_FEATURES,
|
.features = PHY_GBIT_FEATURES,
|
||||||
@ -129,19 +139,55 @@ static struct phy_driver vsc8244_driver = {
|
|||||||
.config_aneg = &genphy_config_aneg,
|
.config_aneg = &genphy_config_aneg,
|
||||||
.read_status = &genphy_read_status,
|
.read_status = &genphy_read_status,
|
||||||
.ack_interrupt = &vsc824x_ack_interrupt,
|
.ack_interrupt = &vsc824x_ack_interrupt,
|
||||||
.config_intr = &vsc824x_config_intr,
|
.config_intr = &vsc82xx_config_intr,
|
||||||
.driver = { .owner = THIS_MODULE,},
|
.driver = { .owner = THIS_MODULE,},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init vsc8244_init(void)
|
static int vsc8221_config_init(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
return phy_driver_register(&vsc8244_driver);
|
int err;
|
||||||
|
|
||||||
|
err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
|
||||||
|
MII_VSC8221_AUXCONSTAT_INIT);
|
||||||
|
return err;
|
||||||
|
|
||||||
|
/* Perhaps we should set EXT_CON1 based on the interface?
|
||||||
|
Options are 802.3Z SerDes or SGMII */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit vsc8244_exit(void)
|
/* Vitesse 8221 */
|
||||||
|
static struct phy_driver vsc8221_driver = {
|
||||||
|
.phy_id = PHY_ID_VSC8221,
|
||||||
|
.phy_id_mask = 0x000ffff0,
|
||||||
|
.name = "Vitesse VSC8221",
|
||||||
|
.features = PHY_GBIT_FEATURES,
|
||||||
|
.flags = PHY_HAS_INTERRUPT,
|
||||||
|
.config_init = &vsc8221_config_init,
|
||||||
|
.config_aneg = &genphy_config_aneg,
|
||||||
|
.read_status = &genphy_read_status,
|
||||||
|
.ack_interrupt = &vsc824x_ack_interrupt,
|
||||||
|
.config_intr = &vsc82xx_config_intr,
|
||||||
|
.driver = { .owner = THIS_MODULE,},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init vsc82xx_init(void)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = phy_driver_register(&vsc8244_driver);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
err = phy_driver_register(&vsc8221_driver);
|
||||||
|
if (err < 0)
|
||||||
|
phy_driver_unregister(&vsc8244_driver);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit vsc82xx_exit(void)
|
||||||
{
|
{
|
||||||
phy_driver_unregister(&vsc8244_driver);
|
phy_driver_unregister(&vsc8244_driver);
|
||||||
|
phy_driver_unregister(&vsc8221_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(vsc8244_init);
|
module_init(vsc82xx_init);
|
||||||
module_exit(vsc8244_exit);
|
module_exit(vsc82xx_exit);
|
||||||
|
@ -1634,7 +1634,6 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
|
|||||||
* sis900_interrupt - sis900 interrupt handler
|
* sis900_interrupt - sis900 interrupt handler
|
||||||
* @irq: the irq number
|
* @irq: the irq number
|
||||||
* @dev_instance: the client data object
|
* @dev_instance: the client data object
|
||||||
* @regs: snapshot of processor context
|
|
||||||
*
|
*
|
||||||
* The interrupt handler does all of the Rx thread work,
|
* The interrupt handler does all of the Rx thread work,
|
||||||
* and cleans up after the Tx thread
|
* and cleans up after the Tx thread
|
||||||
|
@ -672,7 +672,6 @@ write_hash:
|
|||||||
/**
|
/**
|
||||||
* spider_net_prepare_tx_descr - fill tx descriptor with skb data
|
* spider_net_prepare_tx_descr - fill tx descriptor with skb data
|
||||||
* @card: card structure
|
* @card: card structure
|
||||||
* @descr: descriptor structure to fill out
|
|
||||||
* @skb: packet to use
|
* @skb: packet to use
|
||||||
*
|
*
|
||||||
* returns 0 on success, <0 on failure.
|
* returns 0 on success, <0 on failure.
|
||||||
@ -867,7 +866,6 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
|
|||||||
/**
|
/**
|
||||||
* spider_net_kick_tx_dma - enables TX DMA processing
|
* spider_net_kick_tx_dma - enables TX DMA processing
|
||||||
* @card: card structure
|
* @card: card structure
|
||||||
* @descr: descriptor address to enable TX processing at
|
|
||||||
*
|
*
|
||||||
* This routine will start the transmit DMA running if
|
* This routine will start the transmit DMA running if
|
||||||
* it is not already running. This routine ned only be
|
* it is not already running. This routine ned only be
|
||||||
@ -1637,7 +1635,6 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg,
|
|||||||
* spider_net_interrupt - interrupt handler for spider_net
|
* spider_net_interrupt - interrupt handler for spider_net
|
||||||
* @irq: interrupt number
|
* @irq: interrupt number
|
||||||
* @ptr: pointer to net_device
|
* @ptr: pointer to net_device
|
||||||
* @regs: PU registers
|
|
||||||
*
|
*
|
||||||
* returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no
|
* returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no
|
||||||
* interrupt found raised by card.
|
* interrupt found raised by card.
|
||||||
@ -2419,7 +2416,6 @@ spider_net_undo_pci_setup(struct spider_net_card *card)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* spider_net_setup_pci_dev - sets up the device in terms of PCI operations
|
* spider_net_setup_pci_dev - sets up the device in terms of PCI operations
|
||||||
* @card: card structure
|
|
||||||
* @pdev: PCI device
|
* @pdev: PCI device
|
||||||
*
|
*
|
||||||
* Returns the card structure or NULL if any errors occur
|
* Returns the card structure or NULL if any errors occur
|
||||||
|
@ -1713,7 +1713,7 @@ static void gem_init_phy(struct gem *gp)
|
|||||||
/* Reset PCS unit. */
|
/* Reset PCS unit. */
|
||||||
val = readl(gp->regs + PCS_MIICTRL);
|
val = readl(gp->regs + PCS_MIICTRL);
|
||||||
val |= PCS_MIICTRL_RST;
|
val |= PCS_MIICTRL_RST;
|
||||||
writeb(val, gp->regs + PCS_MIICTRL);
|
writel(val, gp->regs + PCS_MIICTRL);
|
||||||
|
|
||||||
limit = 32;
|
limit = 32;
|
||||||
while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
|
while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
|
||||||
|
@ -240,7 +240,12 @@ static int ath5k_get_tx_stats(struct ieee80211_hw *hw,
|
|||||||
struct ieee80211_tx_queue_stats *stats);
|
struct ieee80211_tx_queue_stats *stats);
|
||||||
static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
|
static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
|
||||||
static void ath5k_reset_tsf(struct ieee80211_hw *hw);
|
static void ath5k_reset_tsf(struct ieee80211_hw *hw);
|
||||||
static int ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb);
|
static int ath5k_beacon_update(struct ath5k_softc *sc,
|
||||||
|
struct sk_buff *skb);
|
||||||
|
static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
struct ieee80211_bss_conf *bss_conf,
|
||||||
|
u32 changes);
|
||||||
|
|
||||||
static struct ieee80211_ops ath5k_hw_ops = {
|
static struct ieee80211_ops ath5k_hw_ops = {
|
||||||
.tx = ath5k_tx,
|
.tx = ath5k_tx,
|
||||||
@ -257,6 +262,7 @@ static struct ieee80211_ops ath5k_hw_ops = {
|
|||||||
.get_tx_stats = ath5k_get_tx_stats,
|
.get_tx_stats = ath5k_get_tx_stats,
|
||||||
.get_tsf = ath5k_get_tsf,
|
.get_tsf = ath5k_get_tsf,
|
||||||
.reset_tsf = ath5k_reset_tsf,
|
.reset_tsf = ath5k_reset_tsf,
|
||||||
|
.bss_info_changed = ath5k_bss_info_changed,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2961,7 +2967,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
|
|||||||
sc->opmode != NL80211_IFTYPE_MESH_POINT &&
|
sc->opmode != NL80211_IFTYPE_MESH_POINT &&
|
||||||
test_bit(ATH_STAT_PROMISC, sc->status))
|
test_bit(ATH_STAT_PROMISC, sc->status))
|
||||||
rfilt |= AR5K_RX_FILTER_PROM;
|
rfilt |= AR5K_RX_FILTER_PROM;
|
||||||
if (sc->opmode == NL80211_IFTYPE_STATION ||
|
if ((sc->opmode == NL80211_IFTYPE_STATION && sc->assoc) ||
|
||||||
sc->opmode == NL80211_IFTYPE_ADHOC ||
|
sc->opmode == NL80211_IFTYPE_ADHOC ||
|
||||||
sc->opmode == NL80211_IFTYPE_AP)
|
sc->opmode == NL80211_IFTYPE_AP)
|
||||||
rfilt |= AR5K_RX_FILTER_BEACON;
|
rfilt |= AR5K_RX_FILTER_BEACON;
|
||||||
@ -3101,4 +3107,32 @@ ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
static void
|
||||||
|
set_beacon_filter(struct ieee80211_hw *hw, bool enable)
|
||||||
|
{
|
||||||
|
struct ath5k_softc *sc = hw->priv;
|
||||||
|
struct ath5k_hw *ah = sc->ah;
|
||||||
|
u32 rfilt;
|
||||||
|
rfilt = ath5k_hw_get_rx_filter(ah);
|
||||||
|
if (enable)
|
||||||
|
rfilt |= AR5K_RX_FILTER_BEACON;
|
||||||
|
else
|
||||||
|
rfilt &= ~AR5K_RX_FILTER_BEACON;
|
||||||
|
ath5k_hw_set_rx_filter(ah, rfilt);
|
||||||
|
sc->filter_flags = rfilt;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
struct ieee80211_bss_conf *bss_conf,
|
||||||
|
u32 changes)
|
||||||
|
{
|
||||||
|
struct ath5k_softc *sc = hw->priv;
|
||||||
|
if (changes & BSS_CHANGED_ASSOC) {
|
||||||
|
mutex_lock(&sc->lock);
|
||||||
|
sc->assoc = bss_conf->assoc;
|
||||||
|
if (sc->opmode == NL80211_IFTYPE_STATION)
|
||||||
|
set_beacon_filter(hw, sc->assoc);
|
||||||
|
mutex_unlock(&sc->lock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -179,6 +179,7 @@ struct ath5k_softc {
|
|||||||
|
|
||||||
struct timer_list calib_tim; /* calibration timer */
|
struct timer_list calib_tim; /* calibration timer */
|
||||||
int power_level; /* Requested tx power in dbm */
|
int power_level; /* Requested tx power in dbm */
|
||||||
|
bool assoc; /* assocate state */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ath5k_hw_hasbssidmask(_ah) \
|
#define ath5k_hw_hasbssidmask(_ah) \
|
||||||
|
@ -417,19 +417,19 @@ ath5k_debug_init_device(struct ath5k_softc *sc)
|
|||||||
sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
|
sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
|
||||||
ath5k_global_debugfs);
|
ath5k_global_debugfs);
|
||||||
|
|
||||||
sc->debug.debugfs_debug = debugfs_create_file("debug", 0666,
|
sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUGO,
|
||||||
sc->debug.debugfs_phydir, sc, &fops_debug);
|
sc->debug.debugfs_phydir, sc, &fops_debug);
|
||||||
|
|
||||||
sc->debug.debugfs_registers = debugfs_create_file("registers", 0444,
|
sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO,
|
||||||
sc->debug.debugfs_phydir, sc, &fops_registers);
|
sc->debug.debugfs_phydir, sc, &fops_registers);
|
||||||
|
|
||||||
sc->debug.debugfs_tsf = debugfs_create_file("tsf", 0666,
|
sc->debug.debugfs_tsf = debugfs_create_file("tsf", S_IWUSR | S_IRUGO,
|
||||||
sc->debug.debugfs_phydir, sc, &fops_tsf);
|
sc->debug.debugfs_phydir, sc, &fops_tsf);
|
||||||
|
|
||||||
sc->debug.debugfs_beacon = debugfs_create_file("beacon", 0666,
|
sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO,
|
||||||
sc->debug.debugfs_phydir, sc, &fops_beacon);
|
sc->debug.debugfs_phydir, sc, &fops_beacon);
|
||||||
|
|
||||||
sc->debug.debugfs_reset = debugfs_create_file("reset", 0222,
|
sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR,
|
||||||
sc->debug.debugfs_phydir, sc, &fops_reset);
|
sc->debug.debugfs_phydir, sc, &fops_reset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
|
|||||||
skb = (struct sk_buff *)bf->bf_mpdu;
|
skb = (struct sk_buff *)bf->bf_mpdu;
|
||||||
if (skb) {
|
if (skb) {
|
||||||
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
||||||
skb_end_pointer(skb) - skb->head,
|
skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
|
|||||||
|
|
||||||
bf->bf_buf_addr = bf->bf_dmacontext =
|
bf->bf_buf_addr = bf->bf_dmacontext =
|
||||||
pci_map_single(sc->pdev, skb->data,
|
pci_map_single(sc->pdev, skb->data,
|
||||||
skb_end_pointer(skb) - skb->head,
|
skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
|
|
||||||
skb = ieee80211_get_buffered_bc(sc->hw, vif);
|
skb = ieee80211_get_buffered_bc(sc->hw, vif);
|
||||||
@ -338,7 +338,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
|
|||||||
if (bf->bf_mpdu != NULL) {
|
if (bf->bf_mpdu != NULL) {
|
||||||
skb = (struct sk_buff *)bf->bf_mpdu;
|
skb = (struct sk_buff *)bf->bf_mpdu;
|
||||||
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
||||||
skb_end_pointer(skb) - skb->head,
|
skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
bf->bf_mpdu = NULL;
|
bf->bf_mpdu = NULL;
|
||||||
@ -398,7 +398,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
|
|||||||
|
|
||||||
bf->bf_buf_addr = bf->bf_dmacontext =
|
bf->bf_buf_addr = bf->bf_dmacontext =
|
||||||
pci_map_single(sc->pdev, skb->data,
|
pci_map_single(sc->pdev, skb->data,
|
||||||
skb_end_pointer(skb) - skb->head,
|
skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
bf->bf_mpdu = skb;
|
bf->bf_mpdu = skb;
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp)
|
|||||||
if (bf->bf_mpdu != NULL) {
|
if (bf->bf_mpdu != NULL) {
|
||||||
struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
|
struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
|
||||||
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
pci_unmap_single(sc->pdev, bf->bf_dmacontext,
|
||||||
skb_end_pointer(skb) - skb->head,
|
skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
bf->bf_mpdu = NULL;
|
bf->bf_mpdu = NULL;
|
||||||
|
@ -41,9 +41,12 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)
|
|||||||
ASSERT(skb != NULL);
|
ASSERT(skb != NULL);
|
||||||
ds->ds_vdata = skb->data;
|
ds->ds_vdata = skb->data;
|
||||||
|
|
||||||
/* setup rx descriptors */
|
/* setup rx descriptors. The sc_rxbufsize here tells the harware
|
||||||
ath9k_hw_setuprxdesc(ah, ds,
|
* how much data it can DMA to us and that we are prepared
|
||||||
skb_tailroom(skb), /* buffer size */
|
* to process */
|
||||||
|
ath9k_hw_setuprxdesc(ah,
|
||||||
|
ds,
|
||||||
|
sc->sc_rxbufsize,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
if (sc->sc_rxlink == NULL)
|
if (sc->sc_rxlink == NULL)
|
||||||
@ -88,6 +91,13 @@ static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, u32 len)
|
|||||||
* in rx'd frames.
|
* in rx'd frames.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Note: the kernel can allocate a value greater than
|
||||||
|
* what we ask it to give us. We really only need 4 KB as that
|
||||||
|
* is this hardware supports and in fact we need at least 3849
|
||||||
|
* as that is the MAX AMSDU size this hardware supports.
|
||||||
|
* Unfortunately this means we may get 8 KB here from the
|
||||||
|
* kernel... and that is actually what is observed on some
|
||||||
|
* systems :( */
|
||||||
skb = dev_alloc_skb(len + sc->sc_cachelsz - 1);
|
skb = dev_alloc_skb(len + sc->sc_cachelsz - 1);
|
||||||
if (skb != NULL) {
|
if (skb != NULL) {
|
||||||
off = ((unsigned long) skb->data) % sc->sc_cachelsz;
|
off = ((unsigned long) skb->data) % sc->sc_cachelsz;
|
||||||
@ -298,7 +308,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
|
|||||||
|
|
||||||
bf->bf_mpdu = skb;
|
bf->bf_mpdu = skb;
|
||||||
bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data,
|
bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data,
|
||||||
skb_end_pointer(skb) - skb->head,
|
sc->sc_rxbufsize,
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
bf->bf_dmacontext = bf->bf_buf_addr;
|
bf->bf_dmacontext = bf->bf_buf_addr;
|
||||||
}
|
}
|
||||||
@ -544,9 +554,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
|
|||||||
if (!requeue_skb)
|
if (!requeue_skb)
|
||||||
goto requeue;
|
goto requeue;
|
||||||
|
|
||||||
/* Sync and unmap the frame */
|
pci_dma_sync_single_for_cpu(sc->pdev,
|
||||||
pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr,
|
bf->bf_buf_addr,
|
||||||
skb_tailroom(skb),
|
sc->sc_rxbufsize,
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
pci_unmap_single(sc->pdev, bf->bf_buf_addr,
|
pci_unmap_single(sc->pdev, bf->bf_buf_addr,
|
||||||
sc->sc_rxbufsize,
|
sc->sc_rxbufsize,
|
||||||
|
@ -1228,7 +1228,9 @@ void iwl_rx_handle(struct iwl_priv *priv)
|
|||||||
|
|
||||||
rxq->queue[i] = NULL;
|
rxq->queue[i] = NULL;
|
||||||
|
|
||||||
pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,
|
dma_sync_single_range_for_cpu(
|
||||||
|
&priv->pci_dev->dev, rxb->real_dma_addr,
|
||||||
|
rxb->aligned_dma_addr - rxb->real_dma_addr,
|
||||||
priv->hw_params.rx_buf_size,
|
priv->hw_params.rx_buf_size,
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
pkt = (struct iwl_rx_packet *)rxb->skb->data;
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/kallsyms.h>
|
#include <linux/kallsyms.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
int isa_dma_bridge_buggy;
|
int isa_dma_bridge_buggy;
|
||||||
@ -1828,6 +1829,22 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
|
|||||||
PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
|
PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,
|
||||||
ht_enable_msi_mapping);
|
ht_enable_msi_mapping);
|
||||||
|
|
||||||
|
/* The P5N32-SLI Premium motherboard from Asus has a problem with msi
|
||||||
|
* for the MCP55 NIC. It is not yet determined whether the msi problem
|
||||||
|
* also affects other devices. As for now, turn off msi for this device.
|
||||||
|
*/
|
||||||
|
static void __devinit nvenet_msi_disable(struct pci_dev *dev)
|
||||||
|
{
|
||||||
|
if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) {
|
||||||
|
dev_info(&dev->dev,
|
||||||
|
"Disabling msi for MCP55 NIC on P5N32-SLI Premium\n");
|
||||||
|
dev->no_msi = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
|
||||||
|
PCI_DEVICE_ID_NVIDIA_NVENET_15,
|
||||||
|
nvenet_msi_disable);
|
||||||
|
|
||||||
static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
|
static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *host_bridge;
|
struct pci_dev *host_bridge;
|
||||||
|
@ -251,7 +251,7 @@ struct xt_target_param {
|
|||||||
*/
|
*/
|
||||||
struct xt_tgchk_param {
|
struct xt_tgchk_param {
|
||||||
const char *table;
|
const char *table;
|
||||||
void *entryinfo;
|
const void *entryinfo;
|
||||||
const struct xt_target *target;
|
const struct xt_target *target;
|
||||||
void *targinfo;
|
void *targinfo;
|
||||||
unsigned int hook_mask;
|
unsigned int hook_mask;
|
||||||
|
@ -31,6 +31,7 @@ struct request_sock_ops {
|
|||||||
int family;
|
int family;
|
||||||
int obj_size;
|
int obj_size;
|
||||||
struct kmem_cache *slab;
|
struct kmem_cache *slab;
|
||||||
|
char *slab_name;
|
||||||
int (*rtx_syn_ack)(struct sock *sk,
|
int (*rtx_syn_ack)(struct sock *sk,
|
||||||
struct request_sock *req);
|
struct request_sock *req);
|
||||||
void (*send_ack)(struct sock *sk, struct sk_buff *skb,
|
void (*send_ack)(struct sock *sk, struct sk_buff *skb,
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
struct timewait_sock_ops {
|
struct timewait_sock_ops {
|
||||||
struct kmem_cache *twsk_slab;
|
struct kmem_cache *twsk_slab;
|
||||||
|
char *twsk_slab_name;
|
||||||
unsigned int twsk_obj_size;
|
unsigned int twsk_obj_size;
|
||||||
int (*twsk_unique)(struct sock *sk,
|
int (*twsk_unique)(struct sock *sk,
|
||||||
struct sock *sktw, void *twp);
|
struct sock *sktw, void *twp);
|
||||||
|
@ -101,6 +101,17 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb)
|
|||||||
pppoe_proto(skb) == htons(PPP_IPV6) && \
|
pppoe_proto(skb) == htons(PPP_IPV6) && \
|
||||||
brnf_filter_pppoe_tagged)
|
brnf_filter_pppoe_tagged)
|
||||||
|
|
||||||
|
static void fake_update_pmtu(struct dst_entry *dst, u32 mtu)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct dst_ops fake_dst_ops = {
|
||||||
|
.family = AF_INET,
|
||||||
|
.protocol = __constant_htons(ETH_P_IP),
|
||||||
|
.update_pmtu = fake_update_pmtu,
|
||||||
|
.entries = ATOMIC_INIT(0),
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize bogus route table used to keep netfilter happy.
|
* Initialize bogus route table used to keep netfilter happy.
|
||||||
* Currently, we fill in the PMTU entry because netfilter
|
* Currently, we fill in the PMTU entry because netfilter
|
||||||
@ -117,6 +128,7 @@ void br_netfilter_rtable_init(struct net_bridge *br)
|
|||||||
rt->u.dst.path = &rt->u.dst;
|
rt->u.dst.path = &rt->u.dst;
|
||||||
rt->u.dst.metrics[RTAX_MTU - 1] = 1500;
|
rt->u.dst.metrics[RTAX_MTU - 1] = 1500;
|
||||||
rt->u.dst.flags = DST_NOXFRM;
|
rt->u.dst.flags = DST_NOXFRM;
|
||||||
|
rt->u.dst.ops = &fake_dst_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct rtable *bridge_parent_rtable(const struct net_device *dev)
|
static inline struct rtable *bridge_parent_rtable(const struct net_device *dev)
|
||||||
|
@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
|
|||||||
|
|
||||||
void skb_truesize_bug(struct sk_buff *skb)
|
void skb_truesize_bug(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
printk(KERN_ERR "SKB BUG: Invalid truesize (%u) "
|
WARN(net_ratelimit(), KERN_ERR "SKB BUG: Invalid truesize (%u) "
|
||||||
"len=%u, sizeof(sk_buff)=%Zd\n",
|
"len=%u, sizeof(sk_buff)=%Zd\n",
|
||||||
skb->truesize, skb->len, sizeof(struct sk_buff));
|
skb->truesize, skb->len, sizeof(struct sk_buff));
|
||||||
}
|
}
|
||||||
|
@ -2043,9 +2043,6 @@ static inline void release_proto_idx(struct proto *prot)
|
|||||||
|
|
||||||
int proto_register(struct proto *prot, int alloc_slab)
|
int proto_register(struct proto *prot, int alloc_slab)
|
||||||
{
|
{
|
||||||
char *request_sock_slab_name = NULL;
|
|
||||||
char *timewait_sock_slab_name;
|
|
||||||
|
|
||||||
if (alloc_slab) {
|
if (alloc_slab) {
|
||||||
prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
|
prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
|
||||||
SLAB_HWCACHE_ALIGN | prot->slab_flags,
|
SLAB_HWCACHE_ALIGN | prot->slab_flags,
|
||||||
@ -2060,12 +2057,12 @@ int proto_register(struct proto *prot, int alloc_slab)
|
|||||||
if (prot->rsk_prot != NULL) {
|
if (prot->rsk_prot != NULL) {
|
||||||
static const char mask[] = "request_sock_%s";
|
static const char mask[] = "request_sock_%s";
|
||||||
|
|
||||||
request_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
|
prot->rsk_prot->slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
|
||||||
if (request_sock_slab_name == NULL)
|
if (prot->rsk_prot->slab_name == NULL)
|
||||||
goto out_free_sock_slab;
|
goto out_free_sock_slab;
|
||||||
|
|
||||||
sprintf(request_sock_slab_name, mask, prot->name);
|
sprintf(prot->rsk_prot->slab_name, mask, prot->name);
|
||||||
prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name,
|
prot->rsk_prot->slab = kmem_cache_create(prot->rsk_prot->slab_name,
|
||||||
prot->rsk_prot->obj_size, 0,
|
prot->rsk_prot->obj_size, 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
|
|
||||||
@ -2079,14 +2076,14 @@ int proto_register(struct proto *prot, int alloc_slab)
|
|||||||
if (prot->twsk_prot != NULL) {
|
if (prot->twsk_prot != NULL) {
|
||||||
static const char mask[] = "tw_sock_%s";
|
static const char mask[] = "tw_sock_%s";
|
||||||
|
|
||||||
timewait_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
|
prot->twsk_prot->twsk_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL);
|
||||||
|
|
||||||
if (timewait_sock_slab_name == NULL)
|
if (prot->twsk_prot->twsk_slab_name == NULL)
|
||||||
goto out_free_request_sock_slab;
|
goto out_free_request_sock_slab;
|
||||||
|
|
||||||
sprintf(timewait_sock_slab_name, mask, prot->name);
|
sprintf(prot->twsk_prot->twsk_slab_name, mask, prot->name);
|
||||||
prot->twsk_prot->twsk_slab =
|
prot->twsk_prot->twsk_slab =
|
||||||
kmem_cache_create(timewait_sock_slab_name,
|
kmem_cache_create(prot->twsk_prot->twsk_slab_name,
|
||||||
prot->twsk_prot->twsk_obj_size,
|
prot->twsk_prot->twsk_obj_size,
|
||||||
0,
|
0,
|
||||||
SLAB_HWCACHE_ALIGN |
|
SLAB_HWCACHE_ALIGN |
|
||||||
@ -2104,14 +2101,14 @@ int proto_register(struct proto *prot, int alloc_slab)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_free_timewait_sock_slab_name:
|
out_free_timewait_sock_slab_name:
|
||||||
kfree(timewait_sock_slab_name);
|
kfree(prot->twsk_prot->twsk_slab_name);
|
||||||
out_free_request_sock_slab:
|
out_free_request_sock_slab:
|
||||||
if (prot->rsk_prot && prot->rsk_prot->slab) {
|
if (prot->rsk_prot && prot->rsk_prot->slab) {
|
||||||
kmem_cache_destroy(prot->rsk_prot->slab);
|
kmem_cache_destroy(prot->rsk_prot->slab);
|
||||||
prot->rsk_prot->slab = NULL;
|
prot->rsk_prot->slab = NULL;
|
||||||
}
|
}
|
||||||
out_free_request_sock_slab_name:
|
out_free_request_sock_slab_name:
|
||||||
kfree(request_sock_slab_name);
|
kfree(prot->rsk_prot->slab_name);
|
||||||
out_free_sock_slab:
|
out_free_sock_slab:
|
||||||
kmem_cache_destroy(prot->slab);
|
kmem_cache_destroy(prot->slab);
|
||||||
prot->slab = NULL;
|
prot->slab = NULL;
|
||||||
@ -2134,18 +2131,14 @@ void proto_unregister(struct proto *prot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) {
|
if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) {
|
||||||
const char *name = kmem_cache_name(prot->rsk_prot->slab);
|
|
||||||
|
|
||||||
kmem_cache_destroy(prot->rsk_prot->slab);
|
kmem_cache_destroy(prot->rsk_prot->slab);
|
||||||
kfree(name);
|
kfree(prot->rsk_prot->slab_name);
|
||||||
prot->rsk_prot->slab = NULL;
|
prot->rsk_prot->slab = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) {
|
if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) {
|
||||||
const char *name = kmem_cache_name(prot->twsk_prot->twsk_slab);
|
|
||||||
|
|
||||||
kmem_cache_destroy(prot->twsk_prot->twsk_slab);
|
kmem_cache_destroy(prot->twsk_prot->twsk_slab);
|
||||||
kfree(name);
|
kfree(prot->twsk_prot->twsk_slab_name);
|
||||||
prot->twsk_prot->twsk_slab = NULL;
|
prot->twsk_prot->twsk_slab = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -722,7 +722,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
|
|||||||
static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb,
|
static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb,
|
||||||
unsigned int mss_now)
|
unsigned int mss_now)
|
||||||
{
|
{
|
||||||
if (skb->len <= mss_now || !sk_can_gso(sk)) {
|
if (skb->len <= mss_now || !sk_can_gso(sk) ||
|
||||||
|
tcp_urg_mode(tcp_sk(sk))) {
|
||||||
/* Avoid the costly divide in the normal
|
/* Avoid the costly divide in the normal
|
||||||
* non-TSO case.
|
* non-TSO case.
|
||||||
*/
|
*/
|
||||||
@ -1163,7 +1164,9 @@ static int tcp_init_tso_segs(struct sock *sk, struct sk_buff *skb,
|
|||||||
{
|
{
|
||||||
int tso_segs = tcp_skb_pcount(skb);
|
int tso_segs = tcp_skb_pcount(skb);
|
||||||
|
|
||||||
if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) {
|
if (!tso_segs ||
|
||||||
|
(tso_segs > 1 && (tcp_skb_mss(skb) != mss_now ||
|
||||||
|
tcp_urg_mode(tcp_sk(sk))))) {
|
||||||
tcp_set_skb_tso_segs(sk, skb, mss_now);
|
tcp_set_skb_tso_segs(sk, skb, mss_now);
|
||||||
tso_segs = tcp_skb_pcount(skb);
|
tso_segs = tcp_skb_pcount(skb);
|
||||||
}
|
}
|
||||||
|
@ -271,6 +271,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
|
|||||||
__u32 *mode, char *extra)
|
__u32 *mode, char *extra)
|
||||||
{
|
{
|
||||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||||
|
struct ieee80211_local *local = sdata->local;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
|
||||||
@ -281,6 +282,13 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
|
|||||||
type = NL80211_IFTYPE_STATION;
|
type = NL80211_IFTYPE_STATION;
|
||||||
break;
|
break;
|
||||||
case IW_MODE_ADHOC:
|
case IW_MODE_ADHOC:
|
||||||
|
/* Setting ad-hoc mode on non ibss channel is not
|
||||||
|
* supported.
|
||||||
|
*/
|
||||||
|
if (local->oper_channel &&
|
||||||
|
(local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS))
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
type = NL80211_IFTYPE_ADHOC;
|
type = NL80211_IFTYPE_ADHOC;
|
||||||
break;
|
break;
|
||||||
case IW_MODE_REPEAT:
|
case IW_MODE_REPEAT:
|
||||||
|
@ -305,9 +305,7 @@ void nf_conntrack_hash_insert(struct nf_conn *ct)
|
|||||||
hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
|
hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
|
||||||
repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple);
|
repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple);
|
||||||
|
|
||||||
spin_lock_bh(&nf_conntrack_lock);
|
|
||||||
__nf_conntrack_hash_insert(ct, hash, repl_hash);
|
__nf_conntrack_hash_insert(ct, hash, repl_hash);
|
||||||
spin_unlock_bh(&nf_conntrack_lock);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert);
|
EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert);
|
||||||
|
|
||||||
|
@ -1090,7 +1090,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
|
|||||||
struct nf_conn_help *help;
|
struct nf_conn_help *help;
|
||||||
struct nf_conntrack_helper *helper;
|
struct nf_conntrack_helper *helper;
|
||||||
|
|
||||||
ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_KERNEL);
|
ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC);
|
||||||
if (ct == NULL || IS_ERR(ct))
|
if (ct == NULL || IS_ERR(ct))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -1138,7 +1138,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nf_ct_acct_ext_add(ct, GFP_KERNEL);
|
nf_ct_acct_ext_add(ct, GFP_ATOMIC);
|
||||||
|
|
||||||
#if defined(CONFIG_NF_CONNTRACK_MARK)
|
#if defined(CONFIG_NF_CONNTRACK_MARK)
|
||||||
if (cda[CTA_MARK])
|
if (cda[CTA_MARK])
|
||||||
@ -1212,13 +1212,14 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
|
|||||||
atomic_inc(&master_ct->ct_general.use);
|
atomic_inc(&master_ct->ct_general.use);
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&nf_conntrack_lock);
|
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
if (nlh->nlmsg_flags & NLM_F_CREATE)
|
if (nlh->nlmsg_flags & NLM_F_CREATE)
|
||||||
err = ctnetlink_create_conntrack(cda,
|
err = ctnetlink_create_conntrack(cda,
|
||||||
&otuple,
|
&otuple,
|
||||||
&rtuple,
|
&rtuple,
|
||||||
master_ct);
|
master_ct);
|
||||||
|
spin_unlock_bh(&nf_conntrack_lock);
|
||||||
|
|
||||||
if (err < 0 && master_ct)
|
if (err < 0 && master_ct)
|
||||||
nf_ct_put(master_ct);
|
nf_ct_put(master_ct);
|
||||||
|
|
||||||
|
@ -1072,6 +1072,10 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
|
|||||||
unsigned char *asmptr;
|
unsigned char *asmptr;
|
||||||
int n, size, qbit = 0;
|
int n, size, qbit = 0;
|
||||||
|
|
||||||
|
/* ROSE empty frame has no meaning : don't send */
|
||||||
|
if (len == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
|
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
|
|||||||
skb_reset_transport_header(skb);
|
skb_reset_transport_header(skb);
|
||||||
copied = skb->len;
|
copied = skb->len;
|
||||||
|
|
||||||
|
/* ROSE empty frame has no meaning : ignore it */
|
||||||
|
if (copied == 0) {
|
||||||
|
skb_free_datagram(sk, skb);
|
||||||
|
return copied;
|
||||||
|
}
|
||||||
|
|
||||||
if (copied > size) {
|
if (copied > size) {
|
||||||
copied = size;
|
copied = size;
|
||||||
msg->msg_flags |= MSG_TRUNC;
|
msg->msg_flags |= MSG_TRUNC;
|
||||||
|
Loading…
Reference in New Issue
Block a user