* [PATCH 06/10] drivers/net/usb: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina
Cc: Petko Manolov, Greg Kroah-Hartman,
linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1289855436.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
drivers/net/usb/pegasus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 6710f093..ef36676 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -359,7 +359,7 @@ fail:
static int mdio_read(struct net_device *dev, int phy_id, int loc)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
u16 res;
read_mii_word(pegasus, phy_id, loc, &res);
@@ -397,7 +397,7 @@ fail:
static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)
{
- pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev);
+ pegasus_t *pegasus = netdev_priv(dev);
write_mii_word(pegasus, phy_id, loc, val);
}
--
1.7.3.1.g432b3.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 10/10] net/atm: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
net/atm/br2684.c | 2 +-
net/atm/lec.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index ad2b232..fce2eae 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -97,7 +97,7 @@ static LIST_HEAD(br2684_devs);
static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
{
- return (struct br2684_dev *)netdev_priv(net_dev);
+ return netdev_priv(net_dev);
}
static inline struct net_device *list_entry_brdev(const struct list_head *le)
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 181d70c..179e04b 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -816,8 +816,7 @@ static int lec_mcast_attach(struct atm_vcc *vcc, int arg)
if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg])
return -EINVAL;
vcc->proto_data = dev_lec[arg];
- return lec_mcast_make((struct lec_priv *)netdev_priv(dev_lec[arg]),
- vcc);
+ return lec_mcast_make(netdev_priv(dev_lec[arg]), vcc);
}
/* Initialize device. */
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 03/10] drivers/net/pcmcia: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/pcmcia/axnet_cs.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index d2e166e..c65c9e1 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -865,7 +865,7 @@ static void do_set_multicast_list(struct net_device *dev);
static int ax_open(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
/*
* Grab the page lock so we own the register set, then call
@@ -916,7 +916,7 @@ static int ax_close(struct net_device *dev)
static void axnet_tx_timeout(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
unsigned long flags;
@@ -963,7 +963,7 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int length, send_length, output_page;
unsigned long flags;
u8 packet[ETH_ZLEN];
@@ -1260,7 +1260,7 @@ static void ei_tx_err(struct net_device *dev)
static void ei_tx_intr(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int status = inb(e8390_base + EN0_TSR);
/*
@@ -1344,7 +1344,7 @@ static void ei_tx_intr(struct net_device *dev)
static void ei_receive(struct net_device *dev)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char rxing_page, this_frame, next_frame;
unsigned short current_offset;
int rx_pkt_count = 0;
@@ -1529,7 +1529,7 @@ static void ei_rx_overrun(struct net_device *dev)
static struct net_device_stats *get_stats(struct net_device *dev)
{
long ioaddr = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/* If the card is stopped, just return the present stats. */
@@ -1578,7 +1578,7 @@ static void do_set_multicast_list(struct net_device *dev)
{
long e8390_base = dev->base_addr;
int i;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) {
memset(ei_local->mcfilter, 0, 8);
@@ -1636,7 +1636,7 @@ static void AX88190_init(struct net_device *dev, int startp)
{
axnet_dev_t *info = PRIV(dev);
long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
int endcfg = ei_local->word16 ? (0x48 | ENDCFG_WTS) : 0x48;
@@ -1702,7 +1702,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
int start_page)
{
long e8390_base = dev->base_addr;
- struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
if (inb_p(e8390_base) & E8390_TRANS)
{
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 07/10] drivers/net/vxge: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina
Cc: Ramkrishna Vepa, Sivakumar Subramani, Sreenivasa Honnur,
Jon Mason, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/vxge/vxge-ethtool.c | 26 +++++++++++++-------------
drivers/net/vxge/vxge-main.c | 26 +++++++++++++-------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c
index 09f721e..bc9bd10 100644
--- a/drivers/net/vxge/vxge-ethtool.c
+++ b/drivers/net/vxge/vxge-ethtool.c
@@ -80,7 +80,7 @@ static int vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
static void vxge_ethtool_gdrvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
strlcpy(info->driver, VXGE_DRIVER_NAME, sizeof(VXGE_DRIVER_NAME));
strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION));
strlcpy(info->fw_version, vdev->fw_version, VXGE_HW_FW_STRLEN);
@@ -108,7 +108,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
enum vxge_hw_status status;
u64 reg;
u64 *reg_space = (u64 *)space;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
regs->len = sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
@@ -144,7 +144,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
*/
static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
@@ -166,7 +166,7 @@ static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
static void vxge_ethtool_getpause_data(struct net_device *dev,
struct ethtool_pauseparam *ep)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_getpause_data(hldev, 0, &ep->tx_pause, &ep->rx_pause);
@@ -185,7 +185,7 @@ static void vxge_ethtool_getpause_data(struct net_device *dev,
static int vxge_ethtool_setpause_data(struct net_device *dev,
struct ethtool_pauseparam *ep)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
vxge_hw_device_setpause_data(hldev, 0, ep->tx_pause, ep->rx_pause);
@@ -203,7 +203,7 @@ static void vxge_get_ethtool_stats(struct net_device *dev,
enum vxge_hw_status status;
enum vxge_hw_status swstatus;
struct vxge_vpath *vpath = NULL;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct __vxge_hw_device *hldev = vdev->devh;
struct vxge_hw_xmac_stats *xmac_stats;
struct vxge_hw_device_stats_sw_info *sw_stats;
@@ -572,7 +572,7 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
{
int stat_size = 0;
int i, j;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
switch (stringset) {
case ETH_SS_STATS:
vxge_add_string("VPATH STATISTICS%s\t\t\t",
@@ -1059,21 +1059,21 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
static int vxge_ethtool_get_regs_len(struct net_device *dev)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
}
static u32 vxge_get_rx_csum(struct net_device *dev)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
return vdev->rx_csum;
}
static int vxge_set_rx_csum(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
if (data)
vdev->rx_csum = 1;
@@ -1095,7 +1095,7 @@ static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data)
static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
switch (sset) {
case ETH_SS_STATS:
@@ -1114,7 +1114,7 @@ static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
static int vxge_set_flags(struct net_device *dev, u32 data)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
enum vxge_hw_status status;
if (data & ~ETH_FLAG_RXHASH)
@@ -1148,7 +1148,7 @@ static int vxge_set_flags(struct net_device *dev, u32 data)
static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms)
{
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
if (vdev->max_vpath_supported != VXGE_HW_MAX_VIRTUAL_PATHS) {
printk(KERN_INFO "Single Function Mode is required to flash the"
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 22c7d79..5cba4a6 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -153,7 +153,7 @@ static void
vxge_callback_link_up(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
vdev->ndev->name, __func__, __LINE__);
@@ -177,7 +177,7 @@ static void
vxge_callback_link_down(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
vxge_debug_entryexit(VXGE_TRACE,
"%s: %s:%d", vdev->ndev->name, __func__, __LINE__);
@@ -787,7 +787,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK;
}
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
if (unlikely(!is_vxge_card_up(vdev))) {
vxge_debug_tx(VXGE_ERR,
@@ -1052,7 +1052,7 @@ static void vxge_set_multicast(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE,
"%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = (struct __vxge_hw_device *)vdev->devh;
if (unlikely(!is_vxge_card_up(vdev)))
@@ -1209,7 +1209,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = vdev->devh;
if (!is_valid_ether_addr(addr->sa_data))
@@ -1671,7 +1671,7 @@ static void vxge_netpoll(struct net_device *dev)
struct __vxge_hw_device *hldev;
struct vxgedev *vdev;
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
@@ -2581,7 +2581,7 @@ vxge_open(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE,
"%s: %s:%d", dev->name, __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
function_mode = vdev->config.device_hw_info.function_mode;
@@ -2809,7 +2809,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
dev->name, __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
hldev = pci_get_drvdata(vdev->pdev);
if (unlikely(!is_vxge_card_up(vdev)))
@@ -3138,7 +3138,7 @@ vxge_tx_watchdog(struct net_device *dev)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vdev->cric_err_event = VXGE_HW_EVENT_RESET_START;
@@ -3166,7 +3166,7 @@ vxge_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vpath = &vdev->vpaths[0];
if ((NULL == grp) && (vpath->is_open)) {
@@ -3215,7 +3215,7 @@ vxge_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
struct vxge_vpath *vpath;
int vp_id;
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
/* Add these vlan to the vid table */
for (vp_id = 0; vp_id < vdev->no_of_vpath; vp_id++) {
@@ -3242,7 +3242,7 @@ vxge_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
- vdev = (struct vxgedev *)netdev_priv(dev);
+ vdev = netdev_priv(dev);
vlan_group_set_device(vdev->vlgrp, vid, NULL);
@@ -3475,7 +3475,7 @@ vxge_callback_crit_err(struct __vxge_hw_device *hldev,
enum vxge_hw_event type, u64 vp_id)
{
struct net_device *dev = hldev->ndev;
- struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
+ struct vxgedev *vdev = netdev_priv(dev);
struct vxge_vpath *vpath = NULL;
int vpath_idx;
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* [PATCH 08/10] drivers/net: Remove unnecessary casts of netdev_priv
From: Joe Perches @ 2010-11-15 21:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Paul Gortmaker, Yoshinori Sato, netdev, linux-kernel
In-Reply-To: <cover.1289855436.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ax88796.c | 8 ++++----
drivers/net/dm9000.c | 2 +-
drivers/net/iseries_veth.c | 2 +-
drivers/net/lib8390.c | 24 ++++++++++++------------
drivers/net/ne-h8300.c | 12 ++++++------
drivers/net/xilinx_emaclite.c | 20 ++++++++++----------
6 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index b6da4cf..4bebff3 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -325,7 +325,7 @@ static void ax_block_output(struct net_device *dev, int count,
static void
ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
unsigned int memr;
@@ -364,7 +364,7 @@ ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len)
static unsigned int
ax_phy_ei_inbits(struct net_device *dev, int no)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR;
unsigned int memr;
unsigned int result = 0;
@@ -412,7 +412,7 @@ ax_phy_issueaddr(struct net_device *dev, int phy_addr, int reg, int opc)
static int
ax_phy_read(struct net_device *dev, int phy_addr, int reg)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
unsigned int result;
@@ -435,7 +435,7 @@ ax_phy_read(struct net_device *dev, int phy_addr, int reg)
static void
ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value)
{
- struct ei_device *ei = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei = netdev_priv(dev);
struct ax_device *ax = to_ax_dev(dev);
unsigned long flags;
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 9f6aeef..2d4c4fc 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1675,7 +1675,7 @@ dm9000_drv_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
unregister_netdev(ndev);
- dm9000_release_board(pdev, (board_info_t *) netdev_priv(ndev));
+ dm9000_release_board(pdev, netdev_priv(ndev));
free_netdev(ndev); /* free device structure */
dev_dbg(&pdev->dev, "released and freed device\n");
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 8df645e..38e15be 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -1605,7 +1605,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id)
}
veth_dev[i] = dev;
- port = (struct veth_port*)netdev_priv(dev);
+ port = netdev_priv(dev);
/* Start the state machine on each connection on this vlan. If we're
* the first dev to do so this will commence link negotiation */
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index e7030ce..da74db4 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -203,7 +203,7 @@ static void __NS8390_init(struct net_device *dev, int startp);
static int __ei_open(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (dev->watchdog_timeo <= 0)
dev->watchdog_timeo = TX_TIMEOUT;
@@ -231,7 +231,7 @@ static int __ei_open(struct net_device *dev)
*/
static int __ei_close(struct net_device *dev)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/*
@@ -256,7 +256,7 @@ static int __ei_close(struct net_device *dev)
static void __ei_tx_timeout(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
unsigned long flags;
@@ -303,7 +303,7 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int send_length = skb->len, output_page;
unsigned long flags;
char buf[ETH_ZLEN];
@@ -592,7 +592,7 @@ static void ei_tx_err(struct net_device *dev)
static void ei_tx_intr(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int status = ei_inb(e8390_base + EN0_TSR);
ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
@@ -675,7 +675,7 @@ static void ei_tx_intr(struct net_device *dev)
static void ei_receive(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char rxing_page, this_frame, next_frame;
unsigned short current_offset;
int rx_pkt_count = 0;
@@ -879,7 +879,7 @@ static void ei_rx_overrun(struct net_device *dev)
static struct net_device_stats *__ei_get_stats(struct net_device *dev)
{
unsigned long ioaddr = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long flags;
/* If the card is stopped, just return the present stats. */
@@ -927,7 +927,7 @@ static void do_set_multicast_list(struct net_device *dev)
{
unsigned long e8390_base = dev->base_addr;
int i;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
{
@@ -981,7 +981,7 @@ static void do_set_multicast_list(struct net_device *dev)
static void __ei_set_multicast_list(struct net_device *dev)
{
unsigned long flags;
- struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
spin_lock_irqsave(&ei_local->page_lock, flags);
do_set_multicast_list(dev);
@@ -998,7 +998,7 @@ static void __ei_set_multicast_list(struct net_device *dev)
static void ethdev_setup(struct net_device *dev)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (ei_debug > 1)
printk(version);
@@ -1036,7 +1036,7 @@ static struct net_device *____alloc_ei_netdev(int size)
static void __NS8390_init(struct net_device *dev, int startp)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
int endcfg = ei_local->word16
? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
@@ -1099,7 +1099,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
int start_page)
{
unsigned long e8390_base = dev->base_addr;
- struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c
index e0b0ef1..30be8c6 100644
--- a/drivers/net/ne-h8300.c
+++ b/drivers/net/ne-h8300.c
@@ -86,7 +86,7 @@ static u32 reg_offset[16];
static int __init init_reg_offset(struct net_device *dev,unsigned long base_addr)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
int i;
unsigned char bus_width;
@@ -218,7 +218,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
int start_page, stop_page;
int reg0, ret;
static unsigned version_printed;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned char bus_width;
if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
@@ -371,7 +371,7 @@ static int ne_close(struct net_device *dev)
static void ne_reset_8390(struct net_device *dev)
{
unsigned long reset_start_time = jiffies;
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
if (ei_debug > 1)
printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies);
@@ -397,7 +397,7 @@ static void ne_reset_8390(struct net_device *dev)
static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
/* This *shouldn't* happen. If it does, it's the last thing you'll see */
if (ei_status.dmaing)
@@ -437,7 +437,7 @@ static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, i
static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
#ifdef NE_SANITY_CHECK
int xfer_count = count;
#endif
@@ -507,7 +507,7 @@ static void ne_block_input(struct net_device *dev, int count, struct sk_buff *sk
static void ne_block_output(struct net_device *dev, int count,
const unsigned char *buf, const int start_page)
{
- struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
+ struct ei_device *ei_local = netdev_priv(dev);
unsigned long dma_start;
#ifdef NE_SANITY_CHECK
int retries = 0;
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 14f0955..2de52d1 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -515,7 +515,7 @@ static void xemaclite_update_address(struct net_local *drvdata,
*/
static int xemaclite_set_mac_address(struct net_device *dev, void *address)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sockaddr *addr = address;
if (netif_running(dev))
@@ -534,7 +534,7 @@ static int xemaclite_set_mac_address(struct net_device *dev, void *address)
*/
static void xemaclite_tx_timeout(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
unsigned long flags;
dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n",
@@ -578,7 +578,7 @@ static void xemaclite_tx_timeout(struct net_device *dev)
*/
static void xemaclite_tx_handler(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
dev->stats.tx_packets++;
if (lp->deferred_skb) {
@@ -605,7 +605,7 @@ static void xemaclite_tx_handler(struct net_device *dev)
*/
static void xemaclite_rx_handler(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sk_buff *skb;
unsigned int align;
u32 len;
@@ -661,7 +661,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
{
bool tx_complete = 0;
struct net_device *dev = dev_id;
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
void __iomem *base_addr = lp->base_addr;
u32 tx_status;
@@ -918,7 +918,7 @@ void xemaclite_adjust_link(struct net_device *ndev)
*/
static int xemaclite_open(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
int retval;
/* Just to be safe, stop the device first */
@@ -987,7 +987,7 @@ static int xemaclite_open(struct net_device *dev)
*/
static int xemaclite_close(struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
netif_stop_queue(dev);
xemaclite_disable_interrupts(lp);
@@ -1031,7 +1031,7 @@ static struct net_device_stats *xemaclite_get_stats(struct net_device *dev)
*/
static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
{
- struct net_local *lp = (struct net_local *) netdev_priv(dev);
+ struct net_local *lp = netdev_priv(dev);
struct sk_buff *new_skb;
unsigned int len;
unsigned long flags;
@@ -1068,7 +1068,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
static void xemaclite_remove_ndev(struct net_device *ndev)
{
if (ndev) {
- struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+ struct net_local *lp = netdev_priv(ndev);
if (lp->base_addr)
iounmap((void __iomem __force *) (lp->base_addr));
@@ -1245,7 +1245,7 @@ static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
struct device *dev = &of_dev->dev;
struct net_device *ndev = dev_get_drvdata(dev);
- struct net_local *lp = (struct net_local *) netdev_priv(ndev);
+ struct net_local *lp = netdev_priv(ndev);
/* Un-register the mii_bus, if configured */
if (lp->has_mdio) {
--
1.7.3.1.g432b3.dirty
^ permalink raw reply related
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-15 21:14 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <20101115124428.7b857ccb@nehalam>
On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
[...]
> My views are simple:
>
> Ethtool needs to be an extension of existing netlink API for interfaces.
> - handles multiple values per transaction
> - extensible
[...]
Are you suggesting to send and receive the existing ethtool command and
result structures (with some wrapping) through netlink? Or some larger
change to the API?
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: the future of ethtool
From: Stephen Hemminger @ 2010-11-15 21:14 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <1289855642.2586.38.camel@bwh-desktop>
On Mon, 15 Nov 2010 21:14:02 +0000
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
> [...]
> > My views are simple:
> >
> > Ethtool needs to be an extension of existing netlink API for interfaces.
> > - handles multiple values per transaction
> > - extensible
> [...]
>
> Are you suggesting to send and receive the existing ethtool command and
> result structures (with some wrapping) through netlink? Or some larger
> change to the API?
The existing ioctl base API should be kept as legacy and something
better developed.
^ permalink raw reply
* pull request: wireless-next-2.6 2010-11-15
From: John W. Linville @ 2010-11-15 21:25 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Here is the traditional first huge pull request intended for the 2.6.38!
Included are the usual batch of updates to various wireless drivers.
For good measure, Luis also gives us a few wireless regulatory control
patches as well.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 1f4f067f99cbb2af7af7a67bd025a9fb58b5156c:
enic: Fix build warnings (2010-11-15 11:13:19 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Andreas Herrmann (1):
bitops: Provide generic sign_extend32 function
Ben Greear (1):
ath5k: Print stats as unsigned ints.
Blaise Gassend (1):
mac80211_hwsim: Incorporate txpower into rssi
Bruno Randolf (2):
ath5k: Optimize descriptor alignment
ath5k: Add channel time to survey data
Christian Lamparter (7):
carl9170: import hw/fw header updates
carl9170: initialize HW aMPDU parameters properly
carl9170: fix spurious restart due to high latency
carl9170: stop stale uplink BA sessions
carl9170: configurable beacon rates
carl9170: tx path review
carl9170: use generic sign_extend32
Eliad Peller (5):
mac80211: refactor debugfs function generation code
wl1271: set wl->vif only if add_interface succeeded.
wl1271: refactor debugfs function generation code
wl1271: handle HW watchdog interrupt
wl1271: add recover testmode command
Felix Fietkau (13):
ath9k_hw: optimize interrupt mask changes
ath9k_hw: small optimization in ar9002_hw_get_isr
ath9k_hw: optimize tx status descriptor processing
ath9k: optimize/fix ANI RSSI processing
ath9k: remove a redundant call to ath9k_hw_gettsf32
ath9k_hw: make ath9k_hw_gettsf32 static
ath9k_hw: optimize all descriptor access functions
ath9k_hw: initialize regulatory->max_power_level in set_txpower for AR9003
ath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpower
ath9k: initialize per-channel tx power limits instead of hardcoding them
ath9k_hw: fix potential spurious tx error bit interpretation
mac80211: minstrel_ht - reduce the overhead of rate sampling
ath9k: rework tx queue selection and fix queue stopping/waking
Gery Kahn (1):
wl1271: ref_clock cosmetic changes
Grazvydas Ignotas (3):
wl1251: add power callback to wl1251_if_operations
wl1251: add runtime PM support for SDIO
wl1251: use wl12xx_platform_data to pass data
Hauke Mehrtens (1):
carl9170: fix typos
Helmut Schaa (6):
rt2x00: Add TXOP_CTRL_CFG register definition
rt2x00: Sync Tx and RX ring sizes with legacy drivers
rt2x00: Wait up to one second on rt2800 for WPDMA to be ready
rt2x00: Reduce tx descriptor size
rt2x00: Optimize rt2x00debug_dump_frame when frame dumping is not active
rt2x00: Fix hw crypto in AP mode for some devices
Herton Ronaldo Krzesinski (9):
rtl8187: remove redundant initialization of ARFR
rtl8187: remove setting of beacon/atim registers from initialization
rtl8187: fix wrong register initialization in 8187B
rtl8187: avoid redundant write to register FF72 (RFSW_CTRL)
rtl8187: move pll reset at start out of ANAPARAM write
rtl8187: don't set RTL818X_CONFIG3_GNT_SELECT flag on 8187B
rtl8187: consolidate anaparam on/off write sequences
rtl8187: remove uneeded setting of anaparam write
rtl8187: restore anaparam registers after reset with 8187B
Ido Yariv (4):
wl1271: TX aggregation optimization
wl1271: Fix TX starvation
wl1271: Allocate TX descriptors more efficiently
wl1271: Fix TX queue low watermark handling
Ivo van Doorn (9):
rt2x00: Rename rt2x00queue_timeout
rt2x00: Remove failsave from rt2x00usb_watchdog_tx_dma
rt2x00: Implement flush callback
rt2x00: Fix MCU_SLEEP arguments
rt2x00: Fix crash on USB unplug
rt2x00: Rename queue->lock to queue->index_lock
rt2x00: Fix rt2x00queue_kick_tx_queue arguments
rt2x00: Remove rt2x00lib_toggle_rx
rt2x00: Add watchdog functions for HW queue
Jesper Juhl (1):
mac80211: Remove redundant checks for NULL before calls to crypto_free_cipher()
Johannes Berg (10):
iwlwifi: make mac80211 ops a device config
iwlagn: don't resend RXON timing
iwlagn: new RXON processing for modern devices
iwlwifi: fix IBSS beaconing
iwlwifi: implement switching iftype while up
iwlagn: fix non-5000+ build
iwlagn: fix needed chains calculation
iwlagn: fix RXON issues
iwlagn: re-enable calibration
iwlagn: fix RXON HT
John W. Linville (3):
b43: remove extraneous code in free_ringmemory
rt2x00pci: do not use GFP_DMA
iwlwifi: Convert to new PCI PM framework
Juuso Oikarinen (3):
wl1271: Fix RX path stall
wl1271: Fix scan failure detection
wl1271: Check interface state in op_* functions
Lalith Suresh (1):
rt2x00: Fix comments in rt73usb.h and rt61pci.h
Larry Finger (1):
ssb: Clear RETRY_TIMEOUT in PCI Configuration for normal devices
Luciano Coelho (1):
wl1271: exit ELP mode when setting enabled rates in tx
Luis R. Rodriguez (16):
ath9k: fix sparse complaint on aphy for debugfs
ath: make ath_hw_keysetmac() static
ath: make ath_hw_set_keycache_entry() static
ath5k: make ath5k_update_bssid_mask_and_opmode() static
cfg80211: pass the reg hint initiator to helpers
cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY
cfg80211: fix disabling channels based on hints
cfg80211: add debug prints for when we ignore regulatory hints
cfg80211: add debug print when disabling a channel on a custom regd
cfg80211: add debug print when processing a channel
cfg80211: prefix REG_DBG_PRINT() with cfg80211
ath: add a ATH_DBG_WARN()
ath9k: add a debug warning when we cannot stop RX
ath9k: simplify hw reset locking
ath9k: move the PCU lock to the sc structure
ath9k: content DMA start / stop through the PCU lock
Mark Einon (14):
rt2x00: checkpatch.pl error fixes for rt2400pci.h
rt2x00: checkpatch.pl error fixes for rt2500pci.h
rt2x00: checkpatch.pl error fixes for rt2500usb.c
rt2x00: checkpatch.pl error fixes for rt2800.h
rt2x00: checkpatch.pl error fixes for rt2800lib.c
rt2x00: checkpatch.pl error fixes for rt2800pci.h
rt2x00: checkpatch.pl error fixes for rt2800usb.c
rt2x00: checkpatch.pl error fixes for rt2800usb.h
rt2x00: checkpatch.pl error fixes for rt2x00config.c
rt2x00: checkpatch.pl error fixes for rt2x00dev.c
rt2x00: checkpatch.pl error fixes for rt2x00lib.h
rt2x00: checkpatch.pl error fixes for rt2x00link.c
rt2x00: checkpatch.pl error fixes for rt2x00queue.c
rt2x00: checkpatch.pl error fixes for rt73usb.c
Mohammed Shafi Shajakhan (2):
ath9k: Remove the median function in rate control
ath9k: Properly assign boolean types
Nicolas Kaiser (1):
wireless/wl1271: remove redundant if-statement v2
Nishant Sarmukadam (1):
mwl8k: force AP mode to use non-AMPDU frames
Rafael J. Wysocki (1):
ath9k: Convert to new PCI PM framework
Rafał Miłecki (8):
b43: N-PHY: define channel table struct for rev3+ devices
b43: N-PHY: define registers names for 2056 radio
b43: N-PHY: define registers names for 2056 radio
b43: N-PHY: fix 2055 radio init
b43: define known SPROM boardflags2 bits
b43: N-PHY: determine usage of radio regulatory workaround correctly
b43: N-PHY: improve 2055 radio initialization
b43legacy: rfkill: use status register based on core revision (not PHY's)
Rajkumar Manoharan (1):
ath9k_htc: Handle monitor mode properly for HTC devices
Shahar Levi (3):
wl1271: 11n Support, Add Definitions
wl1271: 11n Support, ACX Commands
wl1271: 11n Support, functionality and configuration ability
Shanyu Zhao (2):
iwlwifi: seperate disconnected antenna function
iwlwifi: disable disconnected antenna for advanced bt coex
Stanislaw Gruszka (7):
iwlwifi: warn when send tx power settings during scan
iwlwifi: send tx_power_cmd synchronously
iwlwifi: fix set_tx_power vs scan
iwlwifi: avoid commit rxon during scan in iwlagn_configure_filter
iwlwifi: avoid commit rxon during scan in iwlagn_bt_traffic_change_work
iwlwifi: defer update power mode while scan
iwlwifi: avoid commit rxon during scan in iwl_set_no_assoc
Stephen Hemminger (1):
rfkill: remove dead code
Teemu Paasikivi (1):
wl1271: Fix warning about unsupported RX rate
Thadeu Lima de Souza Cascardo (1):
rtl8187b: do not do per packet TX AGC
Wey-Yi Guy (11):
iwlagn: turn dynamic smps on while BT is on
iwlwifi: add new devices to Kconfig
iwlagn: use 6000g2b uCode for 130 series devices
iwlagn: update PCI ID for 6000g2b series devices
iwlagn: update PCI ID for 6000g2a series devices
iwlagn: update PCI ID for 100 series devices
iwlwifi: Legacy isr only used by legacy devices
iwlwifi: put all the isr related function under ops
iwlwifi: legacy tx_cmd_protection function
iwlwifi: resending QoS command when HT changes
iwlagn: enable shadow register
Winkler, Tomas (1):
iwlwlifi: update rx write pointer w/o request mac access in the CAM mode
maximilian attems (2):
zd1211rw: add 2 missing usb id's
zd1201: Add missing id
arch/arm/mach-omap2/board-omap3pandora.c | 32 +-
drivers/net/wireless/ath/ath5k/base.c | 24 +-
drivers/net/wireless/ath/ath5k/debug.c | 30 +-
drivers/net/wireless/ath/ath5k/desc.h | 18 +-
drivers/net/wireless/ath/ath5k/phy.c | 8 +-
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 14 +-
drivers/net/wireless/ath/ath9k/ar9002_mac.c | 123 ++--
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 8 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 20 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.c | 69 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.h | 6 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 14 +-
drivers/net/wireless/ath/ath9k/beacon.c | 12 +-
drivers/net/wireless/ath/ath9k/common.c | 15 +-
drivers/net/wireless/ath/ath9k/common.h | 14 +-
drivers/net/wireless/ath/ath9k/debug.c | 48 +-
drivers/net/wireless/ath/ath9k/debug.h | 5 +-
drivers/net/wireless/ath/ath9k/eeprom.h | 3 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 9 +-
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 27 +-
drivers/net/wireless/ath/ath9k/eeprom_def.c | 62 +-
drivers/net/wireless/ath/ath9k/gpio.c | 10 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 70 +--
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.h | 16 +-
drivers/net/wireless/ath/ath9k/init.c | 88 +-
drivers/net/wireless/ath/ath9k/mac.c | 86 ++-
drivers/net/wireless/ath/ath9k/mac.h | 13 +-
drivers/net/wireless/ath/ath9k/main.c | 167 ++---
drivers/net/wireless/ath/ath9k/pci.c | 40 +-
drivers/net/wireless/ath/ath9k/rc.c | 31 +-
drivers/net/wireless/ath/ath9k/recv.c | 42 +-
drivers/net/wireless/ath/ath9k/virtual.c | 3 +-
drivers/net/wireless/ath/ath9k/xmit.c | 102 +--
drivers/net/wireless/ath/carl9170/carl9170.h | 5 +-
drivers/net/wireless/ath/carl9170/fwcmd.h | 13 +-
drivers/net/wireless/ath/carl9170/hw.h | 7 +-
drivers/net/wireless/ath/carl9170/mac.c | 56 +-
drivers/net/wireless/ath/carl9170/main.c | 19 +-
drivers/net/wireless/ath/carl9170/phy.c | 17 +-
drivers/net/wireless/ath/carl9170/phy.h | 24 +-
drivers/net/wireless/ath/carl9170/tx.c | 80 ++-
drivers/net/wireless/ath/carl9170/usb.c | 2 +-
drivers/net/wireless/ath/carl9170/version.h | 6 +-
drivers/net/wireless/ath/debug.h | 2 +
drivers/net/wireless/ath/key.c | 9 +-
drivers/net/wireless/b43/b43.h | 13 +
drivers/net/wireless/b43/dma.c | 5 -
drivers/net/wireless/b43/phy_n.c | 14 +-
drivers/net/wireless/b43/radio_2055.c | 8 +-
drivers/net/wireless/b43/radio_2056.c | 51 ++
drivers/net/wireless/b43/radio_2056.h | 1081 +++++++++++++++++++++++-
drivers/net/wireless/b43legacy/rfkill.c | 2 +-
drivers/net/wireless/iwlwifi/Kconfig | 3 +
drivers/net/wireless/iwlwifi/Makefile | 7 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 13 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 22 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 8 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 352 +++++++-
drivers/net/wireless/iwlwifi/iwl-5000.c | 26 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 46 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 230 +++---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 53 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 619 ++++++++++++++
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 32 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 493 ++---------
drivers/net/wireless/iwlwifi/iwl-agn.h | 41 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 841 ++++---------------
drivers/net/wireless/iwlwifi/iwl-core.h | 70 +-
drivers/net/wireless/iwlwifi/iwl-csr.h | 2 +
drivers/net/wireless/iwlwifi/iwl-dev.h | 3 +
drivers/net/wireless/iwlwifi/iwl-led.c | 2 +
drivers/net/wireless/iwlwifi/iwl-legacy.c | 662 +++++++++++++++
drivers/net/wireless/iwlwifi/iwl-legacy.h | 79 ++
drivers/net/wireless/iwlwifi/iwl-power.c | 95 ++-
drivers/net/wireless/iwlwifi/iwl-power.h | 3 +
drivers/net/wireless/iwlwifi/iwl-rx.c | 47 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 11 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 49 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 49 +-
drivers/net/wireless/mac80211_hwsim.c | 5 +-
drivers/net/wireless/mwl8k.c | 7 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 14 +-
drivers/net/wireless/rt2x00/rt2400pci.h | 6 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 20 +-
drivers/net/wireless/rt2x00/rt2500pci.h | 4 +-
drivers/net/wireless/rt2x00/rt2500usb.c | 22 +-
drivers/net/wireless/rt2x00/rt2800.h | 61 ++-
drivers/net/wireless/rt2x00/rt2800lib.c | 43 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 16 +-
drivers/net/wireless/rt2x00/rt2800pci.h | 12 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 66 ++-
drivers/net/wireless/rt2x00/rt2800usb.h | 4 +-
drivers/net/wireless/rt2x00/rt2x00.h | 1 +
drivers/net/wireless/rt2x00/rt2x00config.c | 8 +-
drivers/net/wireless/rt2x00/rt2x00debug.c | 10 +-
drivers/net/wireless/rt2x00/rt2x00dev.c | 37 +-
drivers/net/wireless/rt2x00/rt2x00lib.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00link.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 52 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 39 +-
drivers/net/wireless/rt2x00/rt2x00queue.h | 33 +-
drivers/net/wireless/rt2x00/rt2x00reg.h | 2 -
drivers/net/wireless/rt2x00/rt2x00usb.c | 25 +-
drivers/net/wireless/rt2x00/rt61pci.c | 28 +-
drivers/net/wireless/rt2x00/rt61pci.h | 2 +-
drivers/net/wireless/rt2x00/rt73usb.c | 22 +-
drivers/net/wireless/rt2x00/rt73usb.h | 2 +-
drivers/net/wireless/rtl818x/rtl8187_dev.c | 140 ++--
drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | 22 -
drivers/net/wireless/wl1251/main.c | 15 +-
drivers/net/wireless/wl1251/sdio.c | 101 ++-
drivers/net/wireless/wl1251/spi.c | 9 +
drivers/net/wireless/wl1251/wl1251.h | 1 +
drivers/net/wireless/wl12xx/Kconfig | 12 +-
drivers/net/wireless/wl12xx/wl1271.h | 13 +-
drivers/net/wireless/wl12xx/wl1271_acx.c | 83 ++
drivers/net/wireless/wl12xx/wl1271_acx.h | 89 ++-
drivers/net/wireless/wl12xx/wl1271_boot.c | 10 +-
drivers/net/wireless/wl12xx/wl1271_debugfs.c | 215 +++---
drivers/net/wireless/wl12xx/wl1271_event.c | 2 -
drivers/net/wireless/wl12xx/wl1271_main.c | 220 ++++-
drivers/net/wireless/wl12xx/wl1271_rx.c | 28 +-
drivers/net/wireless/wl12xx/wl1271_rx.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_scan.c | 5 +-
drivers/net/wireless/wl12xx/wl1271_testmode.c | 12 +
drivers/net/wireless/wl12xx/wl1271_tx.c | 132 ++-
drivers/net/wireless/wl12xx/wl1271_tx.h | 3 +-
drivers/net/wireless/zd1201.c | 1 +
drivers/net/wireless/zd1211rw/zd_usb.c | 2 +
drivers/ssb/pcihost_wrapper.c | 7 +
include/linux/bitops.h | 11 +
include/linux/nl80211.h | 6 +-
include/linux/rfkill.h | 31 -
include/linux/wl12xx.h | 8 +
include/net/cfg80211.h | 15 +-
net/mac80211/aes_ccm.c | 3 +-
net/mac80211/aes_cmac.c | 3 +-
net/mac80211/debugfs.c | 60 +-
net/mac80211/debugfs.h | 2 +
net/mac80211/debugfs_key.c | 19 +-
net/mac80211/debugfs_sta.c | 26 +-
net/mac80211/rc80211_minstrel_ht.c | 16 +-
net/rfkill/core.c | 14 -
net/wireless/reg.c | 134 +++-
148 files changed, 5604 insertions(+), 2949 deletions(-)
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-legacy.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-legacy.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-11-15.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] net: use the macros defined for the members of flowi
From: Brian Haley @ 2010-11-15 21:33 UTC (permalink / raw)
To: Changli Gao; +Cc: David S. Miller, netdev
In-Reply-To: <1289623435-22713-1-git-send-email-xiaosuo@gmail.com>
On 11/12/2010 11:43 PM, Changli Gao wrote:
> Use the macros defined for the members of flowi to clean the code up.
>
> diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> index 865fd76..36cd0b7 100644
> --- a/net/bridge/br_netfilter.c
> +++ b/net/bridge/br_netfilter.c
> @@ -412,13 +412,8 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
> if (dnat_took_place(skb)) {
> if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) {
> struct flowi fl = {
> - .nl_u = {
> - .ip4_u = {
> - .daddr = iph->daddr,
> - .saddr = 0,
> - .tos = RT_TOS(iph->tos) },
> - },
> - .proto = 0,
> + .fl4_dst = iph->daddr,
> + .fl4_tos = RT_TOS(iph->tos),
> };
Are these actually equivalent? You dropped two assignments to zero.
I always thought things on the stack weren't.
Thanks,
-Brian
^ permalink raw reply
* Re: [PATCH] net: use the macros defined for the members of flowi
From: Eric Dumazet @ 2010-11-15 21:38 UTC (permalink / raw)
To: Brian Haley; +Cc: Changli Gao, David S. Miller, netdev
In-Reply-To: <4CE1A710.9040603@hp.com>
Le lundi 15 novembre 2010 à 16:33 -0500, Brian Haley a écrit :
> On 11/12/2010 11:43 PM, Changli Gao wrote:
> > Use the macros defined for the members of flowi to clean the code up.
> >
> > diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> > index 865fd76..36cd0b7 100644
> > --- a/net/bridge/br_netfilter.c
> > +++ b/net/bridge/br_netfilter.c
> > @@ -412,13 +412,8 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
> > if (dnat_took_place(skb)) {
> > if ((err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))) {
> > struct flowi fl = {
> > - .nl_u = {
> > - .ip4_u = {
> > - .daddr = iph->daddr,
> > - .saddr = 0,
> > - .tos = RT_TOS(iph->tos) },
> > - },
> > - .proto = 0,
> > + .fl4_dst = iph->daddr,
> > + .fl4_tos = RT_TOS(iph->tos),
> > };
>
> Are these actually equivalent? You dropped two assignments to zero.
> I always thought things on the stack weren't.
Same question on lkml few hours ago. I think gcc does the assignement to
zero, even on automatic variables (at least done on x86), but could not
find a doc on it.
^ permalink raw reply
* Re: [PATCH] Reduce number of pointer dereferences in IPv4 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:48 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, netdev, linux-kernel, netfilter,
netfilter-devel, David S. Miller, Rusty Russell
In-Reply-To: <1289782180.2743.166.camel@edumazet-laptop>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4069 bytes --]
On Mon, 15 Nov 2010, Eric Dumazet wrote:
> Le dimanche 14 novembre 2010 à 22:35 +0100, Jesper Juhl a écrit :
> > By adding two pointer variables to
> > net/ipv4/netfilter/ipt_LOG.c::dump_packet() we can save 16 bytes of .text
> > and 9 pointer dereferences.
> >
> > before this patch we did 20 pointer dereferences and had this object file
> > size:
> > text data bss dec hex filename
> > 6233 600 3080 9913 26b9 net/ipv4/netfilter/ipt_LOG.o
> >
> > after this patch we do just 11 pointer dereferences and have this object
> > file size:
> > text data bss dec hex filename
> > 6217 600 3080 9897 26a9 net/ipv4/netfilter/ipt_LOG.o
> >
> >
> > Please Cc me on replies.
> >
> >
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > ---
> > ipt_LOG.c | 16 ++++++++++------
> > 1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
> > index 72ffc8f..02a92de 100644
> > --- a/net/ipv4/netfilter/ipt_LOG.c
> > +++ b/net/ipv4/netfilter/ipt_LOG.c
[...]
> > - if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
> > - read_lock_bh(&skb->sk->sk_callback_lock);
> > - if (skb->sk->sk_socket && skb->sk->sk_socket->file)
> > + sk = skb->sk;
> > + sk_socket = sk->sk_socket;
>
> Really ? sk can be NULL, so you add a NULL dereference.
>
Arrgh, yes, you are right. How could I miss that "&& skb->sk" test? I even
modified that bit without thinking about it (I guess that's the problem,
not thinking about it and it being late and me having had too much
coffee and then not testing enough)...
Sorry about that.
[...]
> > - skb->sk->sk_socket->file->f_cred->fsuid,
> > - skb->sk->sk_socket->file->f_cred->fsgid);
> > - read_unlock_bh(&skb->sk->sk_callback_lock);
> > + sk_socket->file->f_cred->fsuid,
> > + sk_socket->file->f_cred->fsgid);
> > + read_unlock_bh(&sk->sk_callback_lock);
> > }
> >
> > /* Max length: 16 "MARK=0xFFFFFFFF " */
> >
> >
> >
>
> Most of these "dereferences" are compiler optimized.
>
> You added a bug in your patch, and make ipt_LOG slower if rule is not
> asking for IPT_LOG_UID
>
Yes, I see that now. Thank you for pointing it out.
How about the following instead? It still manages to save 16 bytes of
.text and a number of pointer derefs and it doesn't deref potentially NULL
pointers and it doesn't do any extra work if IPT_LOG_UID is not asked for.
And this time I didn't just compile test it but booted and ran a kernel
with the patch as well.
Fewer pointer derefs and smaller .text size for
net/ipv4/netfilter/ipt_LOG.c::dump_packet()
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
ipt_LOG.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 72ffc8f..539dce3 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -39,6 +39,7 @@ static void dump_packet(struct sbuff *m,
struct iphdr _iph;
const struct iphdr *ih;
unsigned int logflags;
+ struct sock *sk;
if (info->type == NF_LOG_TYPE_LOG)
logflags = info->u.log.logflags;
@@ -336,12 +337,13 @@ static void dump_packet(struct sbuff *m,
/* Max length: 15 "UID=4294967295 " */
if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
- read_lock_bh(&skb->sk->sk_callback_lock);
- if (skb->sk->sk_socket && skb->sk->sk_socket->file)
+ sk = skb->sk;
+ read_lock_bh(&sk->sk_callback_lock);
+ if (sk->sk_socket && sk->sk_socket->file)
sb_add(m, "UID=%u GID=%u ",
- skb->sk->sk_socket->file->f_cred->fsuid,
- skb->sk->sk_socket->file->f_cred->fsgid);
- read_unlock_bh(&skb->sk->sk_callback_lock);
+ sk->sk_socket->file->f_cred->fsuid,
+ sk->sk_socket->file->f_cred->fsgid);
+ read_unlock_bh(&sk->sk_callback_lock);
}
/* Max length: 16 "MARK=0xFFFFFFFF " */
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:49 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, Jan Rekorajski, David S. Miller,
netfilter-devel, netfilter, netdev, linux-kernel
In-Reply-To: <1289782215.2743.167.camel@edumazet-laptop>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2613 bytes --]
On Mon, 15 Nov 2010, Eric Dumazet wrote:
> Le dimanche 14 novembre 2010 à 22:47 +0100, Jesper Juhl a écrit :
> > By adding two pointer variables to
> > net/ipv6/netfilter/ip6t_LOG.c::dump_packet() we can save 19 bytes of .text
> > and many pointer dereferences.
> >
> > before:
> > text data bss dec hex filename
> > 6258 600 3088 9946 26da net/ipv6/netfilter/ip6t_LOG.o
> >
> > after:
> > text data bss dec hex filename
> > 6239 600 3088 9927 26c7 net/ipv6/netfilter/ip6t_LOG.o
> >
> >
> > Please Cc me on replies.
> >
> >
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > ---
> > ip6t_LOG.c | 16 ++++++++++------
> > 1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
> > index 09c8889..51d10a5 100644
> > --- a/net/ipv6/netfilter/ip6t_LOG.c
> > +++ b/net/ipv6/netfilter/ip6t_LOG.c
[...]
>
> Same comment than previous patch, you add a NULL dereference.
>
Hopefully this is beter (same as change done to the other (ipv4) patch).
Fewer pointer derefs and smaller .text size for
net/ipv4/netfilter/ipt_LOG.c::dump_packet()
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
ip6t_LOG.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 09c8889..de15b14 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -46,6 +46,7 @@ static void dump_packet(struct sbuff *m,
unsigned int ptr;
unsigned int hdrlen = 0;
unsigned int logflags;
+ struct sock *sk;
if (info->type == NF_LOG_TYPE_LOG)
logflags = info->u.log.logflags;
@@ -359,12 +360,13 @@ static void dump_packet(struct sbuff *m,
/* Max length: 15 "UID=4294967295 " */
if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) {
- read_lock_bh(&skb->sk->sk_callback_lock);
- if (skb->sk->sk_socket && skb->sk->sk_socket->file)
+ sk = skb->sk;
+ read_lock_bh(&sk->sk_callback_lock);
+ if (sk->sk_socket && sk->sk_socket->file)
sb_add(m, "UID=%u GID=%u ",
- skb->sk->sk_socket->file->f_cred->fsuid,
- skb->sk->sk_socket->file->f_cred->fsgid);
- read_unlock_bh(&skb->sk->sk_callback_lock);
+ sk->sk_socket->file->f_cred->fsuid,
+ sk->sk_socket->file->f_cred->fsgid);
+ read_unlock_bh(&sk->sk_callback_lock);
}
/* Max length: 16 "MARK=0xFFFFFFFF " */
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH] Reduce number of pointer dereferences in IPv6 netfilter LOG module function dump_packet()
From: Jesper Juhl @ 2010-11-15 21:50 UTC (permalink / raw)
To: Eric Dumazet
Cc: Netfilter Core Team, Jan Rekorajski, David S. Miller,
netfilter-devel, netfilter, netdev, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1011152246050.20408@swampdragon.chaosbits.net>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1630 bytes --]
On Mon, 15 Nov 2010, Jesper Juhl wrote:
> On Mon, 15 Nov 2010, Eric Dumazet wrote:
>
> > Le dimanche 14 novembre 2010 à 22:47 +0100, Jesper Juhl a écrit :
> > > By adding two pointer variables to
> > > net/ipv6/netfilter/ip6t_LOG.c::dump_packet() we can save 19 bytes of .text
> > > and many pointer dereferences.
> > >
> > > before:
> > > text data bss dec hex filename
> > > 6258 600 3088 9946 26da net/ipv6/netfilter/ip6t_LOG.o
> > >
> > > after:
> > > text data bss dec hex filename
> > > 6239 600 3088 9927 26c7 net/ipv6/netfilter/ip6t_LOG.o
> > >
> > >
> > > Please Cc me on replies.
> > >
> > >
> > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > > ---
> > > ip6t_LOG.c | 16 ++++++++++------
> > > 1 file changed, 10 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
> > > index 09c8889..51d10a5 100644
> > > --- a/net/ipv6/netfilter/ip6t_LOG.c
> > > +++ b/net/ipv6/netfilter/ip6t_LOG.c
> [...]
> >
> > Same comment than previous patch, you add a NULL dereference.
> >
> Hopefully this is beter (same as change done to the other (ipv4) patch).
>
>
>
> Fewer pointer derefs and smaller .text size for
> net/ipv4/netfilter/ipt_LOG.c::dump_packet()
>
I'm an idiot, that should of course read
"net/ipv6/netfilter/ip6t_LOG.c::dump_packet()"
That'll teach me not to cut'n'paste descriptions :-(
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-15 21:52 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jeff Garzik, NetDev, David Miller
In-Reply-To: <20101115131453.16958d68@nehalam>
On Mon, 2010-11-15 at 13:14 -0800, Stephen Hemminger wrote:
> On Mon, 15 Nov 2010 21:14:02 +0000
> Ben Hutchings <bhutchings@solarflare.com> wrote:
>
> > On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
> > [...]
> > > My views are simple:
> > >
> > > Ethtool needs to be an extension of existing netlink API for interfaces.
> > > - handles multiple values per transaction
> > > - extensible
> > [...]
> >
> > Are you suggesting to send and receive the existing ethtool command and
> > result structures (with some wrapping) through netlink? Or some larger
> > change to the API?
>
> The existing ioctl base API should be kept as legacy and something
> better developed.
So you're saying: expose all new operations through netlink (and only
netlink) while keeping the old operations exposed only through ioctl?
That's hardly an improvement as it means ethtool or any other
configuration utility will have to support both APIs indefinitely.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2010-11-15
From: Rafał Miłecki @ 2010-11-15 21:55 UTC (permalink / raw)
To: John W. Linville
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20101115212520.GD2297-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2010/11/15 John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>:
> Here is the traditional first huge pull request intended for the 2.6.38!
>
> Included are the usual batch of updates to various wireless drivers.
> For good measure, Luis also gives us a few wireless regulatory control
> patches as well.
>
> Please let me know if there are problems!
Nothing that should postpone this pull, but could you check for
following patches?
[PATCH] ssb: workarounds: be verbose about hacking SPROM revision,
don't duplicate code
[PATCH] ssb: return -ENOMEM on alloc fail (instead of CRC check's result)
[PATCH] ssb: fail registration for unknown SPROM revision
It looks like you missed them. All 3 were sent on 3.11.2010
--
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] net: use the macros defined for the members of flowi
From: Eric Dumazet @ 2010-11-15 21:57 UTC (permalink / raw)
To: Brian Haley; +Cc: Changli Gao, David S. Miller, netdev
In-Reply-To: <1289857126.3364.14.camel@edumazet-laptop>
Le lundi 15 novembre 2010 à 22:38 +0100, Eric Dumazet a écrit :
> Same question on lkml few hours ago. I think gcc does the assignement to
> zero, even on automatic variables (at least done on x86), but could not
> find a doc on it.
Oh well, for sure fields that are not mentioned are set to 0, thanks to
C99.
My question on lkml was about padding holes (security related)
^ permalink raw reply
* Re: [PATCH/RFC] netfilter: nf_conntrack_sip: Handle quirky Cisco phones
From: Kevin Cernekee @ 2010-11-15 22:09 UTC (permalink / raw)
To: Patrick McHardy
Cc: Eric Dumazet, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6), James Morris, Hideaki YOSHIFUJI,
netfilter-devel, netfilter, coreteam, linux-kernel, netdev
In-Reply-To: <4CE16699.1050604@trash.net>
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
On Mon, Nov 15, 2010 at 8:58 AM, Patrick McHardy <kaber@trash.net> wrote:
> Could you provide a binary tcpdump (-w file -s0) of registration
> and a subsequent call please?
These were captured running my "v2" patch, since the phone cannot
register without it:
http://lkml.org/lkml/2010/11/14/181
goodreg.pcap - good registration
goodcall.pcap - call initiation + termination
This is all that happens in the absence of the "Cisco patch":
badreg.pcap - bad registration
Phone's LAN IP is 192.168.0.28
Public IP (as seen by the SIP proxy) is 111.222.33.222
SIP proxy is sip.iptel.org = 213.192.59.75
[-- Attachment #2: goodreg.pcap --]
[-- Type: application/octet-stream, Size: 3328 bytes --]
[-- Attachment #3: goodcall.pcap --]
[-- Type: application/octet-stream, Size: 7771 bytes --]
[-- Attachment #4: badreg.pcap --]
[-- Type: application/octet-stream, Size: 13596 bytes --]
^ permalink raw reply
* Re: the future of ethtool
From: Jeff Garzik @ 2010-11-15 22:49 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Stephen Hemminger, NetDev, David Miller
In-Reply-To: <1289857936.2586.51.camel@bwh-desktop>
On 11/15/2010 04:52 PM, Ben Hutchings wrote:
> On Mon, 2010-11-15 at 13:14 -0800, Stephen Hemminger wrote:
>> On Mon, 15 Nov 2010 21:14:02 +0000
>> Ben Hutchings<bhutchings@solarflare.com> wrote:
>>
>>> On Mon, 2010-11-15 at 12:44 -0800, Stephen Hemminger wrote:
>>> [...]
>>>> My views are simple:
>>>>
>>>> Ethtool needs to be an extension of existing netlink API for interfaces.
>>>> - handles multiple values per transaction
>>>> - extensible
>>> [...]
>>>
>>> Are you suggesting to send and receive the existing ethtool command and
>>> result structures (with some wrapping) through netlink? Or some larger
>>> change to the API?
>>
>> The existing ioctl base API should be kept as legacy and something
>> better developed.
>
> So you're saying: expose all new operations through netlink (and only
> netlink) while keeping the old operations exposed only through ioctl?
> That's hardly an improvement as it means ethtool or any other
> configuration utility will have to support both APIs indefinitely.
s/only// I don't think Stephen is suggesting sending _some_ ops
through netlink and others through old-ioctl. That's just silly. Any
new netlink interface should transit all existing ETHTOOL_xxx
commands/structures.
But presumably, one would have the ability to send multiple ETHTOOL_xxx
bundled together into a single netlink transaction, facilitating the
kernel's calling of struct ethtool_ops'
->begin()
... first operation specified by userspace via netlink ...
... second operation specified by userspace via netlink ...
... etc.
->end()
The underlying struct ethtool_ops remains unchanged; you're only
changing the transit method.
Thus, the ethtool userspace utility would switch entirely to netlink,
while the ioctl processing code remains for binary compatibility.
Or... ethtool userspace utility could remain unchanged, and a new
'nictool' utility provides the same features but with (a) a new CLI and
(b) exclusively uses netlink rather than ioctl.
Jeff
^ permalink raw reply
* Re: [PATCH 07/11] drivers/net/vxge/vxge-main.c: Remove unnecessary casts of pci_get_drvdata
From: Jon Mason @ 2010-11-15 22:50 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Ramkrishna Vepa, Sivakumar Subramani,
Sreenivasa Honnur, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <41a52736f96be0f61003a830b6e23e00f9a5d53b.1289851770.git.joe@perches.com>
On Mon, Nov 15, 2010 at 12:13:58PM -0800, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
Looks good to me.
Acked-by: Jon Mason <jon.mason@exar.com>
> ---
> drivers/net/vxge/vxge-main.c | 28 ++++++++++++----------------
> 1 files changed, 12 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> index 3f2d6ed..22c7d79 100644
> --- a/drivers/net/vxge/vxge-main.c
> +++ b/drivers/net/vxge/vxge-main.c
> @@ -688,7 +688,7 @@ static int vxge_learn_mac(struct vxgedev *vdev, u8 *mac_header)
> struct vxge_vpath *vpath = NULL;
> struct __vxge_hw_device *hldev;
>
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> mac_address = (u8 *)&mac_addr;
> memcpy(mac_address, mac_header, ETH_ALEN);
> @@ -1313,7 +1313,7 @@ static void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
> struct __vxge_hw_device *hldev;
> int msix_id;
>
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> vxge_hw_vpath_wait_receive_idle(hldev, vpath->device_id);
>
> @@ -1632,8 +1632,7 @@ static int vxge_poll_inta(struct napi_struct *napi, int budget)
> int budget_org = budget;
> struct vxge_ring *ring;
>
> - struct __vxge_hw_device *hldev = (struct __vxge_hw_device *)
> - pci_get_drvdata(vdev->pdev);
> + struct __vxge_hw_device *hldev = pci_get_drvdata(vdev->pdev);
>
> for (i = 0; i < vdev->no_of_vpath; i++) {
> ring = &vdev->vpaths[i].ring;
> @@ -1673,7 +1672,7 @@ static void vxge_netpoll(struct net_device *dev)
> struct vxgedev *vdev;
>
> vdev = (struct vxgedev *)netdev_priv(dev);
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> @@ -2107,7 +2106,7 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)
> vxge_debug_intr(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> dev = vdev->ndev;
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> if (pci_channel_offline(vdev->pdev))
> return IRQ_NONE;
> @@ -2342,7 +2341,7 @@ static void vxge_rem_msix_isr(struct vxgedev *vdev)
> static void vxge_rem_isr(struct vxgedev *vdev)
> {
> struct __vxge_hw_device *hldev;
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> #ifdef CONFIG_PCI_MSI
> if (vdev->config.intr_type == MSI_X) {
> @@ -2583,7 +2582,7 @@ vxge_open(struct net_device *dev)
> "%s: %s:%d", dev->name, __func__, __LINE__);
>
> vdev = (struct vxgedev *)netdev_priv(dev);
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
> function_mode = vdev->config.device_hw_info.function_mode;
>
> /* make sure you have link off by default every time Nic is
> @@ -2811,7 +2810,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
> dev->name, __func__, __LINE__);
>
> vdev = (struct vxgedev *)netdev_priv(dev);
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev);
> + hldev = pci_get_drvdata(vdev->pdev);
>
> if (unlikely(!is_vxge_card_up(vdev)))
> return 0;
> @@ -3985,8 +3984,7 @@ static int vxge_pm_resume(struct pci_dev *pdev)
> static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
> pci_channel_state_t state)
> {
> - struct __vxge_hw_device *hldev =
> - (struct __vxge_hw_device *)pci_get_drvdata(pdev);
> + struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
> struct net_device *netdev = hldev->ndev;
>
> netif_device_detach(netdev);
> @@ -4015,8 +4013,7 @@ static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
> */
> static pci_ers_result_t vxge_io_slot_reset(struct pci_dev *pdev)
> {
> - struct __vxge_hw_device *hldev =
> - (struct __vxge_hw_device *)pci_get_drvdata(pdev);
> + struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
> struct net_device *netdev = hldev->ndev;
>
> struct vxgedev *vdev = netdev_priv(netdev);
> @@ -4041,8 +4038,7 @@ static pci_ers_result_t vxge_io_slot_reset(struct pci_dev *pdev)
> */
> static void vxge_io_resume(struct pci_dev *pdev)
> {
> - struct __vxge_hw_device *hldev =
> - (struct __vxge_hw_device *)pci_get_drvdata(pdev);
> + struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
> struct net_device *netdev = hldev->ndev;
>
> if (netif_running(netdev)) {
> @@ -4689,7 +4685,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
> struct net_device *dev;
> int i = 0;
>
> - hldev = (struct __vxge_hw_device *)pci_get_drvdata(pdev);
> + hldev = pci_get_drvdata(pdev);
>
> if (hldev == NULL)
> return;
> --
> 1.7.3.1.g432b3.dirty
>
^ permalink raw reply
* Re: [PATCH 07/10] drivers/net/vxge: Remove unnecessary casts of netdev_priv
From: Jon Mason @ 2010-11-15 22:51 UTC (permalink / raw)
To: Joe Perches
Cc: Jiri Kosina, Ramkrishna Vepa, Sivakumar Subramani,
Sreenivasa Honnur, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <5aee4bf89b5baa6e1d32c99be560893925ed2e19.1289855436.git.joe@perches.com>
On Mon, Nov 15, 2010 at 01:12:30PM -0800, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
Looks good to me.
Acked-by: Jon Mason <jon.mason@exar.com>
> ---
> drivers/net/vxge/vxge-ethtool.c | 26 +++++++++++++-------------
> drivers/net/vxge/vxge-main.c | 26 +++++++++++++-------------
> 2 files changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c
> index 09f721e..bc9bd10 100644
> --- a/drivers/net/vxge/vxge-ethtool.c
> +++ b/drivers/net/vxge/vxge-ethtool.c
> @@ -80,7 +80,7 @@ static int vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
> static void vxge_ethtool_gdrvinfo(struct net_device *dev,
> struct ethtool_drvinfo *info)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> strlcpy(info->driver, VXGE_DRIVER_NAME, sizeof(VXGE_DRIVER_NAME));
> strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION));
> strlcpy(info->fw_version, vdev->fw_version, VXGE_HW_FW_STRLEN);
> @@ -108,7 +108,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
> enum vxge_hw_status status;
> u64 reg;
> u64 *reg_space = (u64 *)space;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct __vxge_hw_device *hldev = vdev->devh;
>
> regs->len = sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
> @@ -144,7 +144,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
> */
> static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct __vxge_hw_device *hldev = vdev->devh;
>
> vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON);
> @@ -166,7 +166,7 @@ static int vxge_ethtool_idnic(struct net_device *dev, u32 data)
> static void vxge_ethtool_getpause_data(struct net_device *dev,
> struct ethtool_pauseparam *ep)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct __vxge_hw_device *hldev = vdev->devh;
>
> vxge_hw_device_getpause_data(hldev, 0, &ep->tx_pause, &ep->rx_pause);
> @@ -185,7 +185,7 @@ static void vxge_ethtool_getpause_data(struct net_device *dev,
> static int vxge_ethtool_setpause_data(struct net_device *dev,
> struct ethtool_pauseparam *ep)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct __vxge_hw_device *hldev = vdev->devh;
>
> vxge_hw_device_setpause_data(hldev, 0, ep->tx_pause, ep->rx_pause);
> @@ -203,7 +203,7 @@ static void vxge_get_ethtool_stats(struct net_device *dev,
> enum vxge_hw_status status;
> enum vxge_hw_status swstatus;
> struct vxge_vpath *vpath = NULL;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct __vxge_hw_device *hldev = vdev->devh;
> struct vxge_hw_xmac_stats *xmac_stats;
> struct vxge_hw_device_stats_sw_info *sw_stats;
> @@ -572,7 +572,7 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
> {
> int stat_size = 0;
> int i, j;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> switch (stringset) {
> case ETH_SS_STATS:
> vxge_add_string("VPATH STATISTICS%s\t\t\t",
> @@ -1059,21 +1059,21 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset,
>
> static int vxge_ethtool_get_regs_len(struct net_device *dev)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath;
> }
>
> static u32 vxge_get_rx_csum(struct net_device *dev)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> return vdev->rx_csum;
> }
>
> static int vxge_set_rx_csum(struct net_device *dev, u32 data)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> if (data)
> vdev->rx_csum = 1;
> @@ -1095,7 +1095,7 @@ static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data)
>
> static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> switch (sset) {
> case ETH_SS_STATS:
> @@ -1114,7 +1114,7 @@ static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset)
>
> static int vxge_set_flags(struct net_device *dev, u32 data)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> enum vxge_hw_status status;
>
> if (data & ~ETH_FLAG_RXHASH)
> @@ -1148,7 +1148,7 @@ static int vxge_set_flags(struct net_device *dev, u32 data)
>
> static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms)
> {
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> if (vdev->max_vpath_supported != VXGE_HW_MAX_VIRTUAL_PATHS) {
> printk(KERN_INFO "Single Function Mode is required to flash the"
> diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> index 22c7d79..5cba4a6 100644
> --- a/drivers/net/vxge/vxge-main.c
> +++ b/drivers/net/vxge/vxge-main.c
> @@ -153,7 +153,7 @@ static void
> vxge_callback_link_up(struct __vxge_hw_device *hldev)
> {
> struct net_device *dev = hldev->ndev;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
> vdev->ndev->name, __func__, __LINE__);
> @@ -177,7 +177,7 @@ static void
> vxge_callback_link_down(struct __vxge_hw_device *hldev)
> {
> struct net_device *dev = hldev->ndev;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
>
> vxge_debug_entryexit(VXGE_TRACE,
> "%s: %s:%d", vdev->ndev->name, __func__, __LINE__);
> @@ -787,7 +787,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
> return NETDEV_TX_OK;
> }
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
>
> if (unlikely(!is_vxge_card_up(vdev))) {
> vxge_debug_tx(VXGE_ERR,
> @@ -1052,7 +1052,7 @@ static void vxge_set_multicast(struct net_device *dev)
> vxge_debug_entryexit(VXGE_TRACE,
> "%s:%d", __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
> hldev = (struct __vxge_hw_device *)vdev->devh;
>
> if (unlikely(!is_vxge_card_up(vdev)))
> @@ -1209,7 +1209,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p)
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
> hldev = vdev->devh;
>
> if (!is_valid_ether_addr(addr->sa_data))
> @@ -1671,7 +1671,7 @@ static void vxge_netpoll(struct net_device *dev)
> struct __vxge_hw_device *hldev;
> struct vxgedev *vdev;
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
> hldev = pci_get_drvdata(vdev->pdev);
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
> @@ -2581,7 +2581,7 @@ vxge_open(struct net_device *dev)
> vxge_debug_entryexit(VXGE_TRACE,
> "%s: %s:%d", dev->name, __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
> hldev = pci_get_drvdata(vdev->pdev);
> function_mode = vdev->config.device_hw_info.function_mode;
>
> @@ -2809,7 +2809,7 @@ static int do_vxge_close(struct net_device *dev, int do_io)
> vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d",
> dev->name, __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
> hldev = pci_get_drvdata(vdev->pdev);
>
> if (unlikely(!is_vxge_card_up(vdev)))
> @@ -3138,7 +3138,7 @@ vxge_tx_watchdog(struct net_device *dev)
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
>
> vdev->cric_err_event = VXGE_HW_EVENT_RESET_START;
>
> @@ -3166,7 +3166,7 @@ vxge_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
>
> vpath = &vdev->vpaths[0];
> if ((NULL == grp) && (vpath->is_open)) {
> @@ -3215,7 +3215,7 @@ vxge_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
> struct vxge_vpath *vpath;
> int vp_id;
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
>
> /* Add these vlan to the vid table */
> for (vp_id = 0; vp_id < vdev->no_of_vpath; vp_id++) {
> @@ -3242,7 +3242,7 @@ vxge_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
>
> vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__);
>
> - vdev = (struct vxgedev *)netdev_priv(dev);
> + vdev = netdev_priv(dev);
>
> vlan_group_set_device(vdev->vlgrp, vid, NULL);
>
> @@ -3475,7 +3475,7 @@ vxge_callback_crit_err(struct __vxge_hw_device *hldev,
> enum vxge_hw_event type, u64 vp_id)
> {
> struct net_device *dev = hldev->ndev;
> - struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
> + struct vxgedev *vdev = netdev_priv(dev);
> struct vxge_vpath *vpath = NULL;
> int vpath_idx;
>
> --
> 1.7.3.1.g432b3.dirty
>
^ permalink raw reply
* Re: network device reference leak with net-next
From: John Fastabend @ 2010-11-15 23:18 UTC (permalink / raw)
To: Stephen Hemminger, lorenzo
Cc: Eric Dumazet, netdev@vger.kernel.org, brian.haley, maze
In-Reply-To: <20101115111024.3b3377be@nehalam>
On 11/15/2010 11:10 AM, Stephen Hemminger wrote:
> On Mon, 15 Nov 2010 20:04:00 +0100
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>> Le lundi 15 novembre 2010 à 10:56 -0800, Stephen Hemminger a écrit :
>>> This is a new regression (doesn't exist with 2.6.36)
>>>
>>> If I shutdown KVM instance with Virt manager, the virtual
>>> interfaces in the bridge aren't getting cleaned up because
>>> of leftover reference count.
>>>
>>>
>>> [ 9781.050474] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
>>> [ 9785.143400] virbr4: port 3(vnet6) entering forwarding state
>>> [ 9785.177194] virbr4: port 3(vnet6) entering disabled state
>>> [ 9785.201129] device vnet6 left promiscuous mode
>>> [ 9785.201135] virbr4: port 3(vnet6) entering disabled state
>>> [ 9791.286950] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
>>> [ 9795.461526] unregister_netdevice: waiting for vnet6 to become free. Usage count = 1
>>> [ 9801.523398] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
>>> --
>>
>> Is the refcount stay forever to 1, or eventually reaches 0 ?
>>
>>
>>
>
> Stays 1 for as long as I waited about 10 minutes
>
Similar refcount error with ixgbe bisected to this patch,
commit 2de795707294972f6c34bae9de713e502c431296
Author: Lorenzo Colitti <lorenzo@google.com>
Date: Wed Oct 27 18:16:49 2010 +0000
ipv6: addrconf: don't remove address state on ifdown if the address is being kept
Currently, addrconf_ifdown does not delete statically configured IPv6
addresses when the interface is brought down. The intent is that when
the interface comes back up the address will be usable again. However,
this doesn't actually work, because the system stops listening on the
corresponding solicited-node multicast address, so the address cannot
respond to neighbor solicitations and thus receive traffic. Also, the
code notifies the rest of the system that the address is being deleted
(e.g, RTM_DELADDR), even though it is not. Fix it so that none of this
state is updated if the address is being kept on the interface.
Tested: Added a statically configured IPv6 address to an interface,
started ping, brought link down, brought link up again. When link came
up ping kept on going and "ip -6 maddr" showed that the host was still
subscribed to there
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Quick glance looks like an in6_ifa_put is missed?
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2754,13 +2754,13 @@ Hunk #1, a/net/ipv6/addrconf.c static int addrconf_ifdown(struct net_device *dev, int how)
ifa->state = INET6_IFADDR_STATE_DEAD;
spin_unlock_bh(&ifa->state_lock);
- if (state == INET6_IFADDR_STATE_DEAD) {
- in6_ifa_put(ifa);
- } else {
+ if (state != INET6_IFADDR_STATE_DEAD) {
__ipv6_ifa_notify(RTM_DELADDR, ifa);
atomic_notifier_call_chain(&inet6addr_chain,
NETDEV_DOWN, ifa);
}
+
+ in6_ifa_put(ifa);
write_lock_bh(&idev->lock);
}
}
With a quick hack the above seems to resolve the issue but I'll need to review the ipv6 stuff to be sure this is sane.
Thanks,
John.
^ permalink raw reply
* Re: network device reference leak with net-next
From: Eric Dumazet @ 2010-11-15 23:25 UTC (permalink / raw)
To: John Fastabend
Cc: Stephen Hemminger, lorenzo, netdev@vger.kernel.org, brian.haley,
maze
In-Reply-To: <4CE1BFCE.70105@intel.com>
Le lundi 15 novembre 2010 à 15:18 -0800, John Fastabend a écrit :
> On 11/15/2010 11:10 AM, Stephen Hemminger wrote:
> > On Mon, 15 Nov 2010 20:04:00 +0100
> > Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> >> Le lundi 15 novembre 2010 à 10:56 -0800, Stephen Hemminger a écrit :
> >>> This is a new regression (doesn't exist with 2.6.36)
> >>>
> >>> If I shutdown KVM instance with Virt manager, the virtual
> >>> interfaces in the bridge aren't getting cleaned up because
> >>> of leftover reference count.
> >>>
> >>>
> >>> [ 9781.050474] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> >>> [ 9785.143400] virbr4: port 3(vnet6) entering forwarding state
> >>> [ 9785.177194] virbr4: port 3(vnet6) entering disabled state
> >>> [ 9785.201129] device vnet6 left promiscuous mode
> >>> [ 9785.201135] virbr4: port 3(vnet6) entering disabled state
> >>> [ 9791.286950] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> >>> [ 9795.461526] unregister_netdevice: waiting for vnet6 to become free. Usage count = 1
> >>> [ 9801.523398] unregister_netdevice: waiting for vnet1 to become free. Usage count = 1
> >>> --
> >>
> >> Is the refcount stay forever to 1, or eventually reaches 0 ?
> >>
> >>
> >>
> >
> > Stays 1 for as long as I waited about 10 minutes
> >
>
> Similar refcount error with ixgbe bisected to this patch,
>
> commit 2de795707294972f6c34bae9de713e502c431296
> Author: Lorenzo Colitti <lorenzo@google.com>
> Date: Wed Oct 27 18:16:49 2010 +0000
>
> ipv6: addrconf: don't remove address state on ifdown if the address is being kept
>
> Currently, addrconf_ifdown does not delete statically configured IPv6
> addresses when the interface is brought down. The intent is that when
> the interface comes back up the address will be usable again. However,
> this doesn't actually work, because the system stops listening on the
> corresponding solicited-node multicast address, so the address cannot
> respond to neighbor solicitations and thus receive traffic. Also, the
> code notifies the rest of the system that the address is being deleted
> (e.g, RTM_DELADDR), even though it is not. Fix it so that none of this
> state is updated if the address is being kept on the interface.
>
> Tested: Added a statically configured IPv6 address to an interface,
> started ping, brought link down, brought link up again. When link came
> up ping kept on going and "ip -6 maddr" showed that the host was still
> subscribed to there
>
> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
> Quick glance looks like an in6_ifa_put is missed?
>
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -2754,13 +2754,13 @@ Hunk #1, a/net/ipv6/addrconf.c static int addrconf_ifdown(struct net_device *dev, int how)
> ifa->state = INET6_IFADDR_STATE_DEAD;
> spin_unlock_bh(&ifa->state_lock);
>
> - if (state == INET6_IFADDR_STATE_DEAD) {
> - in6_ifa_put(ifa);
> - } else {
> + if (state != INET6_IFADDR_STATE_DEAD) {
> __ipv6_ifa_notify(RTM_DELADDR, ifa);
> atomic_notifier_call_chain(&inet6addr_chain,
> NETDEV_DOWN, ifa);
> }
> +
> + in6_ifa_put(ifa);
> write_lock_bh(&idev->lock);
> }
> }
>
> With a quick hack the above seems to resolve the issue but I'll need to review the ipv6 stuff to be sure this is sane.
>
> Thanks,
> John.
Your machine is faster than mine ;)
Yes this commit seems buggy, thanks for finding the problem !
^ permalink raw reply
* Re: the future of ethtool
From: Thomas Graf @ 2010-11-15 23:33 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Ben Hutchings, Stephen Hemminger, NetDev, David Miller
In-Reply-To: <4CE1B8FD.3000007@garzik.org>
On Mon, Nov 15, 2010 at 05:49:33PM -0500, Jeff Garzik wrote:
> s/only// I don't think Stephen is suggesting sending _some_ ops
> through netlink and others through old-ioctl. That's just silly.
> Any new netlink interface should transit all existing ETHTOOL_xxx
> commands/structures.
>
> But presumably, one would have the ability to send multiple
> ETHTOOL_xxx bundled together into a single netlink transaction,
> facilitating the kernel's calling of struct ethtool_ops'
> ->begin()
> ... first operation specified by userspace via netlink ...
> ... second operation specified by userspace via netlink ...
> ... etc.
> ->end()
>
> The underlying struct ethtool_ops remains unchanged; you're only
> changing the transit method.
>
> Thus, the ethtool userspace utility would switch entirely to
> netlink, while the ioctl processing code remains for binary
> compatibility.
>
> Or... ethtool userspace utility could remain unchanged, and a new
> 'nictool' utility provides the same features but with (a) a new CLI
> and (b) exclusively uses netlink rather than ioctl.
I actually have code for this including userspace. I never submitted
it because I wasn't confident it is the way to go since it literally
duplicates all ethtool code in the kernel.
There is one major problem with bundling multiple requests though. If
one change request fails but other changes have been committed already
we can't really undo them without causing lots of races. We have to
leave the device in a somewhat inconsistent state. It's even difficult
to tell what has been comitted and what hasn't. It also makes error
reporting more difficult as a -ERANGE error code could apply to any
of the values to be changed.
I tried to solve this by splitting the validate/change operation and
thus be able to validate all requests before starting to commit
them. This would mean changing all drivers though which I wasn't
willing to do.
I can clean up what I have and submit it so we have something to
start with.
^ permalink raw reply
* Re: the future of ethtool
From: Jeff Garzik @ 2010-11-16 0:07 UTC (permalink / raw)
To: Ben Hutchings, Stephen Hemminger, NetDev, David Miller
In-Reply-To: <20101115233335.GB24292@canuck.infradead.org>
On 11/15/2010 06:33 PM, Thomas Graf wrote:
> On Mon, Nov 15, 2010 at 05:49:33PM -0500, Jeff Garzik wrote:
>> s/only// I don't think Stephen is suggesting sending _some_ ops
>> through netlink and others through old-ioctl. That's just silly.
>> Any new netlink interface should transit all existing ETHTOOL_xxx
>> commands/structures.
>>
>> But presumably, one would have the ability to send multiple
>> ETHTOOL_xxx bundled together into a single netlink transaction,
>> facilitating the kernel's calling of struct ethtool_ops'
>> ->begin()
>> ... first operation specified by userspace via netlink ...
>> ... second operation specified by userspace via netlink ...
>> ... etc.
>> ->end()
>>
>> The underlying struct ethtool_ops remains unchanged; you're only
>> changing the transit method.
>>
>> Thus, the ethtool userspace utility would switch entirely to
>> netlink, while the ioctl processing code remains for binary
>> compatibility.
>>
>> Or... ethtool userspace utility could remain unchanged, and a new
>> 'nictool' utility provides the same features but with (a) a new CLI
>> and (b) exclusively uses netlink rather than ioctl.
>
> I actually have code for this including userspace. I never submitted
> it because I wasn't confident it is the way to go since it literally
> duplicates all ethtool code in the kernel.
>
> There is one major problem with bundling multiple requests though. If
> one change request fails but other changes have been committed already
> we can't really undo them without causing lots of races. We have to
> leave the device in a somewhat inconsistent state. It's even difficult
> to tell what has been comitted and what hasn't. It also makes error
> reporting more difficult as a -ERANGE error code could apply to any
> of the values to be changed.
Well, what are the range of possibilities for the _hardware_, given the
current struct ethtool_ops software interface?
We can either reset+restart RXTX after such events, or not.
That's a binary decision, one easily be passed in from userspace before
any ethtool ops are executed.
Further down the road, if one wanted to travel that far, we could save
the hardware state at the beginning, and restore hardware state if
anything fails. Depends on peoples' motivation over this rare issue.
We already save/restore hardware state for suspend/resume, so this does
not seem overly onerous.
Jeff
^ permalink raw reply
* Re: the future of ethtool
From: Ben Hutchings @ 2010-11-16 0:10 UTC (permalink / raw)
To: Thomas Graf; +Cc: Jeff Garzik, Stephen Hemminger, NetDev, David Miller
In-Reply-To: <20101115233335.GB24292@canuck.infradead.org>
On Mon, 2010-11-15 at 18:33 -0500, Thomas Graf wrote:
> On Mon, Nov 15, 2010 at 05:49:33PM -0500, Jeff Garzik wrote:
> > s/only// I don't think Stephen is suggesting sending _some_ ops
> > through netlink and others through old-ioctl. That's just silly.
> > Any new netlink interface should transit all existing ETHTOOL_xxx
> > commands/structures.
> >
> > But presumably, one would have the ability to send multiple
> > ETHTOOL_xxx bundled together into a single netlink transaction,
> > facilitating the kernel's calling of struct ethtool_ops'
> > ->begin()
> > ... first operation specified by userspace via netlink ...
> > ... second operation specified by userspace via netlink ...
> > ... etc.
> > ->end()
> >
> > The underlying struct ethtool_ops remains unchanged; you're only
> > changing the transit method.
> >
> > Thus, the ethtool userspace utility would switch entirely to
> > netlink, while the ioctl processing code remains for binary
> > compatibility.
> >
> > Or... ethtool userspace utility could remain unchanged, and a new
> > 'nictool' utility provides the same features but with (a) a new CLI
> > and (b) exclusively uses netlink rather than ioctl.
>
> I actually have code for this including userspace. I never submitted
> it because I wasn't confident it is the way to go since it literally
> duplicates all ethtool code in the kernel.
>
> There is one major problem with bundling multiple requests though. If
> one change request fails but other changes have been committed already
> we can't really undo them without causing lots of races. We have to
> leave the device in a somewhat inconsistent state. It's even difficult
> to tell what has been comitted and what hasn't. It also makes error
> reporting more difficult as a -ERANGE error code could apply to any
> of the values to be changed.
[...]
I think it's hopeless to make this truly transactional. Unless the
ethtool core maintains all the settings in one giant structure and
passes them over to the driver to check and apply then there is no way
driver authors are going to get it right in general. And if the ethtool
core does that then, as you say, error reporting is going to be
terrible. There will be even more need to go look in the kernel log to
see the driver's explanation of why the settings are invalid which was
too long to fit in this margin^Wreturn code.
I would expect to treat each operation in a multiple-set as conditional
on the success of all previous operations. ethtool or other utilities
should then take care to put operations in a sensible order (e.g. enable
TX checksum before TSO, if those remain separate operations). Error
reporting in the core is then as simple as reporting how many operations
were successful plus the error code for the one that failed.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox