]> err.no Git - linux-2.6/log
linux-2.6
16 years agort2x00: Fix chipset debugfs file
Ivo van Doorn [Sun, 6 Jan 2008 22:38:10 +0000 (23:38 +0100)]
rt2x00: Fix chipset debugfs file

Initialize blob->data before moving the data pointer
Initialize blob->size based on blob->data size

This fixes the empty chipset file in debugfs.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix any N-PHY related WARN_ON() in the attach stage.
Michael Buesch [Sat, 5 Jan 2008 23:09:46 +0000 (00:09 +0100)]
b43: Fix any N-PHY related WARN_ON() in the attach stage.

This fixes all WARN_ON()s in the attach stage.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Add NPHY kconfig option
Michael Buesch [Fri, 4 Jan 2008 16:06:29 +0000 (17:06 +0100)]
b43: Add NPHY kconfig option

This adds a new Kconfig option for enabling probing of N-PHYs.
This option will be removed again once the stuff works.
For now it is to help in development. This way real users won't
execute the broken N-PHY codepaths, but the developers can easily
enable N-PHY stuff.

To enable N-PHY probing simply remove the BROKEN dependency
and enable the option in the kernel config.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43-ssb-bridge: Add PCI ID for BCM43XG
Michael Buesch [Thu, 3 Jan 2008 18:03:09 +0000 (19:03 +0100)]
b43-ssb-bridge: Add PCI ID for BCM43XG

This adds the PCI ID 0x4329 for the BCM43XG.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob44: power down PHY when interface down
Miguel Botón [Tue, 1 Jan 2008 00:17:54 +0000 (01:17 +0100)]
b44: power down PHY when interface down

This is just this patch (http://lkml.org/lkml/2007/7/1/51) but adapted
to the 'b44' ssb driver.

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: add 'ssb_pcihost_set_power_state' function
Miguel Botón [Tue, 1 Jan 2008 00:16:46 +0000 (01:16 +0100)]
ssb: add 'ssb_pcihost_set_power_state' function

This patch adds the 'ssb_pcihost_set_power_state' function.

This function allows us to set the power state of a PCI device
(for example b44 ethernet device).

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Add definitions for MAC Control register
Michael Buesch [Wed, 26 Dec 2007 15:26:36 +0000 (16:26 +0100)]
b43: Add definitions for MAC Control register

This adds some definitions for the MAC Control register
and uses them.
This basically is no functional change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Remove PIO support
Michael Buesch [Wed, 26 Dec 2007 13:41:30 +0000 (14:41 +0100)]
b43: Remove PIO support

Remove b43 PIO support.
DMA works well on all supported devices. There's no reason to use PIO.
Additionally, new devices don't support PIO in hardware anymore.
b43 PIO support is dead and unused code.

After applying this patch please do
git rm drivers/net/wireless/b43/pio.h
git rm drivers/net/wireless/b43/pio.c
to remove the main PIO support code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: Fix PCMCIA lowlevel register access
Michael Buesch [Sat, 22 Dec 2007 21:01:36 +0000 (22:01 +0100)]
ssb: Fix PCMCIA lowlevel register access

This fixes lowlevel register access for PCMCIA based devices.

The patch also adds a temporary workaround for the device mac address.
It simply adds generation of a random address. The real SPROM extraction
will follow in another patch.
The temporary workaround will be removed then, but for now it's OK.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix chip access validation for new devices
Michael Buesch [Sat, 22 Dec 2007 20:56:30 +0000 (21:56 +0100)]
b43: Fix chip access validation for new devices

This fixes chip access validation for newer devices
(4318 and up, I think)

This patch fixes probing of a PCMCIA based 4318 device.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Only select allowed TX and RX antennas
Michael Buesch [Sat, 22 Dec 2007 20:54:20 +0000 (21:54 +0100)]
b43: Only select allowed TX and RX antennas

This fixes antenna selection in b43. It adds a sanity check
for the antenna numbers we get from mac80211.

This patch depends on
ssb: Fix extraction of values from SPROM

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: Fix extraction of values from SPROM
Michael Buesch [Sat, 22 Dec 2007 20:51:30 +0000 (21:51 +0100)]
ssb: Fix extraction of values from SPROM

This fixes extraction of some values from the SPROM.
It mainly fixes extraction of antenna related values, which
is needed for another b43 fix sent later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix typo in 'drivers/net/wireless/iwlwifi/Kconfig'
Zhu Yi [Sat, 5 Jan 2008 06:53:11 +0000 (22:53 -0800)]
iwlwifi: fix typo in 'drivers/net/wireless/iwlwifi/Kconfig'

Based on a patch by Miguel.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Cc: Miguel Boton <mboton.lkml@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoprism54: remove questionable down_interruptible usage
Daniel Walker [Sat, 22 Dec 2007 04:16:15 +0000 (20:16 -0800)]
prism54: remove questionable down_interruptible usage

Reviewing the semaphore usage I noticed these down_interruptible calls.  Most
of these aren't returning anything, so a caller can't tell if the operation
completed or not.  prism54_wpa_bss_ie_get() returns zero, but it's treated as
the function failing which doesn't seem correct.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoRevert "rtl8187: fix tx power reading"
John W. Linville [Tue, 8 Jan 2008 20:53:51 +0000 (15:53 -0500)]
Revert "rtl8187: fix tx power reading"

This reverts commit e4128a54d790658ab265c915e5da9153ff74af97.

On Sunday 02 December 2007 17:17:51 Michael Wu wrote:
> CCK and OFDM power levels are stored in adjacent bytes, not nibbles.
>
This turns out to be true only for rtl8180. On rtl8187, power levels are
indeed stored in nibbles, so this patch is wrong. Please revert this patch.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomisc wireless annotations
Al Viro [Sat, 22 Dec 2007 18:45:50 +0000 (13:45 -0500)]
misc wireless annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2200: do not byteswap struct ipw_associate
Al Viro [Thu, 27 Dec 2007 06:54:06 +0000 (01:54 -0500)]
ipw2200: do not byteswap struct ipw_associate

keep it little-endian, update places that use its members

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2200 trivial annotations
Al Viro [Thu, 27 Dec 2007 06:36:46 +0000 (01:36 -0500)]
ipw2200 trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoprism54 trivial annotations
Al Viro [Sat, 22 Dec 2007 19:29:07 +0000 (14:29 -0500)]
prism54 trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agobcm43xx annotations
Al Viro [Sat, 22 Dec 2007 17:29:24 +0000 (12:29 -0500)]
bcm43xx annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54pci: endianness annotations and fixes
Al Viro [Sat, 22 Dec 2007 03:02:23 +0000 (22:02 -0500)]
p54pci: endianness annotations and fixes

->ring_control_dma is dma_addr_t, needs conversion to little-endian
before __raw_writel()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: don't mess with mixed-endian even for internal skb queues
Al Viro [Fri, 21 Dec 2007 08:40:35 +0000 (03:40 -0500)]
hostap: don't mess with mixed-endian even for internal skb queues

Just leave hfa384x_info_frame as-is, don't convert in place.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap annotations
Al Viro [Fri, 21 Dec 2007 08:30:16 +0000 (03:30 -0500)]
hostap annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: last of endianness annotations
Al Viro [Fri, 21 Dec 2007 05:00:35 +0000 (00:00 -0500)]
airo: last of endianness annotations

sanitize handling of ConfigRid

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize handling of StatusRid
Al Viro [Fri, 21 Dec 2007 03:58:57 +0000 (22:58 -0500)]
airo: sanitize handling of StatusRid

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize APListRid handling
Al Viro [Thu, 20 Dec 2007 22:49:41 +0000 (17:49 -0500)]
airo: sanitize APListRid handling

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize handling of CapabilityRid
Al Viro [Thu, 20 Dec 2007 22:18:35 +0000 (17:18 -0500)]
airo: sanitize handling of CapabilityRid

Don't byteswap any fields, annotate.  That has caught a bug,
BTW - will be handled in the next patch.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize handling of StatsRid
Al Viro [Thu, 20 Dec 2007 03:24:16 +0000 (22:24 -0500)]
airo: sanitize handling of StatsRid

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize handling of WepKeyRid
Al Viro [Thu, 20 Dec 2007 00:21:51 +0000 (19:21 -0500)]
airo: sanitize handling of WepKeyRid

don't byteswap, update users to match that, annotate.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize BSSListRid handling
Al Viro [Wed, 19 Dec 2007 23:56:37 +0000 (18:56 -0500)]
airo: sanitize BSSListRid handling

Stop byteswap-in-place in readBSSListRid(), annotate the sucker.
BTW, that had immediately found a bug - another codepath fetching
the same struct from card did _not_ byteswap, but used ->dBm the
same as everything else - host-endian.  Fix in the next patch...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agobap_read()/bap_write() work with fixed-endian buffers
Al Viro [Wed, 19 Dec 2007 22:55:43 +0000 (17:55 -0500)]
bap_read()/bap_write() work with fixed-endian buffers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: sanitize handling of SSID_rid
Al Viro [Mon, 17 Dec 2007 21:11:57 +0000 (16:11 -0500)]
airo: sanitize handling of SSID_rid

* store SSID_rid without conversions
* sanitize proc_SSID_on_close() (and avoid access past the end of
  buffer, while we are at it)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: trivial endianness annotations
Al Viro [Mon, 17 Dec 2007 20:09:34 +0000 (15:09 -0500)]
airo: trivial endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2200: ipw_tx_skb() endianness bug
Al Viro [Thu, 27 Dec 2007 06:57:47 +0000 (01:57 -0500)]
ipw2200: ipw_tx_skb() endianness bug

We'd just set tfd->u.data.chunk_len[i] to cpu_to_le16(remaining_bytes);
passing it to pci_map_single() is a bad idea - it expects host-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2200 fix: ->rt_chbitmask is le16
Al Viro [Thu, 27 Dec 2007 06:50:54 +0000 (01:50 -0500)]
ipw2200 fix: ->rt_chbitmask is le16

A couple of places forgot cpu_to_le16() in assignments to
that field, even though right next to those in other branches
of if-else we do it correctly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2200 fix: struct ieee80211_radiotap_header is little-endian
Al Viro [Thu, 27 Dec 2007 06:43:16 +0000 (01:43 -0500)]
ipw2200 fix: struct ieee80211_radiotap_header is little-endian

some places in driver forget conversions

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoray_cs fixes
Al Viro [Sat, 29 Dec 2007 09:55:50 +0000 (04:55 -0500)]
ray_cs fixes

bugs galore:
* 0xf380 instead of htons(ETH_P_AARP), etc.  Works only on l-e.
* back in 2.3.20 driver got readb() and friends instead of
direct dereferencing of iomem.  Somebody got too enthusiatic and replaced
ntohs(p->mrx_overflow)
with
ntohs(read(&p->mrx_overflow)
without noticing that (a) the sucker is 16bit and (b) that expression can't possibly
be portable anyway (hell, on l-e it's always less than 256, on b-e it's always a
multiple of 256).  Proper fix is
swab16(readw(&p->mrx_overflow)
taking into account the conversion done by readw() itself.  That crap happened
in several places; the same fix applies.
* untranslate() assumes little-endian almost everywhere, except for
the code checking for IPX/AARP packets; there we forgot ntohs(), so that part
only works on big-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2100 annotations and fixes
Al Viro [Fri, 21 Dec 2007 05:15:18 +0000 (00:15 -0500)]
ipw2100 annotations and fixes

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54common annotations and fixes
Al Viro [Sat, 22 Dec 2007 04:49:02 +0000 (23:49 -0500)]
p54common annotations and fixes

* ->exp_id in bootrec_exp_if is __le16; missing conversion in its use
* !(x & y) misspelled as !x & y

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: fix endianness with txdesc->sw_support
Al Viro [Fri, 21 Dec 2007 08:42:01 +0000 (03:42 -0500)]
hostap: fix endianness with txdesc->sw_support

it's le32, not le16...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: fix writerids() endianness
Al Viro [Fri, 21 Dec 2007 04:04:35 +0000 (23:04 -0500)]
airo: fix writerids() endianness

in writerids() we do _not_ byteswap, so we want to access
->opmode as little-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo endianness bug: cap_rid.extSoftCap
Al Viro [Thu, 20 Dec 2007 22:21:36 +0000 (17:21 -0500)]
airo endianness bug: cap_rid.extSoftCap

never had been byteswapped, used as host-endian...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: bug in airo_interrupt() handling on incoming 802.11
Al Viro [Thu, 20 Dec 2007 03:38:33 +0000 (22:38 -0500)]
airo: bug in airo_interrupt() handling on incoming 802.11

On big-endian we end up with swapped first two bytes in packet,
due to earlier conversion to host-endian and forgotten conversion
back.

The code we calculated that host-endian for had been duplicated
several time - it finds the 802.11 MAC header length by the first
two bytes of packet; taken into a new helper (header_len(__le16 ctl)).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: fix endianness bug in ->dBm handling
Al Viro [Thu, 20 Dec 2007 00:20:12 +0000 (19:20 -0500)]
airo: fix endianness bug in ->dBm handling

airo_translate_scan() reads BSSListRid directly, does _not_ byteswap
and uses ->dBm (__le16) as host-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: fix transmit_802_11_packet()
Al Viro [Wed, 19 Dec 2007 21:45:29 +0000 (16:45 -0500)]
airo: fix transmit_802_11_packet()

a) gaplen would better be stored little-endian
b) for control packets (shorter than 24-byte header) we ended up with
        bap_write(ai, hdrlen == 30 ?
                (const u16*)&gap.gaplen : (const u16*)&gap, 38 - hdrlen, BAP1);
passing to card the data past the end of gap (i.e. random stuff from stack)
and did _not_ feed the gaplen at the right offset.
c) sending the contents of uninitialized fields of struct is Not Nice(tm) either

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoieee80211: beacon->capability is little-endian
Al Viro [Sat, 29 Dec 2007 10:03:35 +0000 (05:03 -0500)]
ieee80211: beacon->capability is little-endian

It's only a debugging printk, so it went unnoticed; still, the
fix is trivial, so...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoieee80211: fix misannotations
Al Viro [Sat, 29 Dec 2007 10:01:07 +0000 (05:01 -0500)]
ieee80211: fix misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoieee80211softmac_auth_resp() fix
Al Viro [Sat, 29 Dec 2007 09:58:39 +0000 (04:58 -0500)]
ieee80211softmac_auth_resp() fix

The struct ieee8021_auth * passed to it comes straight from skb->data
without any conversions; members of the struct are little-endian, so
we'd better take that into account when doing switch by auth->algorithm,
etc.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoseveral missing cpu_to_le16() in ieee80211softmac_capabilities()
Al Viro [Sat, 29 Dec 2007 09:08:15 +0000 (04:08 -0500)]
several missing cpu_to_le16() in ieee80211softmac_capabilities()

on some codepaths we forgot to convert to little-endian as we do on the
rest of them and as the caller expects from us.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoeliminate byteswapping in struct ieee80211_qos_parameters
Al Viro [Thu, 27 Dec 2007 06:25:40 +0000 (01:25 -0500)]
eliminate byteswapping in struct ieee80211_qos_parameters

Make it match the on-the-wire endianness, eliminate byteswapping.
The only driver that used this sucker (ipw2200) updated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: cleanup some merge errors
John W. Linville [Mon, 21 Jan 2008 18:41:18 +0000 (13:41 -0500)]
wireless: cleanup some merge errors

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[IPV4]: Enable use of 240/4 address space.
Jan Engelhardt [Mon, 21 Jan 2008 11:18:08 +0000 (03:18 -0800)]
[IPV4]: Enable use of 240/4 address space.

This short patch modifies the IPv4 networking to enable use of the
240.0.0.0/4 (aka "class-E") address space as propsed in the internet
draft draft-fuller-240space-00.txt.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET] gen_estimator: gen_replace_estimator() cosmetic changes
Jarek Poplawski [Mon, 21 Jan 2008 10:36:02 +0000 (02:36 -0800)]
[NET] gen_estimator: gen_replace_estimator() cosmetic changes

White spaces etc. are changed in gen_replace_estimator() to make it
similar to others in a file.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] net: add sparse annotation to ptype_seq_start/stop
Stephen Hemminger [Mon, 21 Jan 2008 10:27:29 +0000 (02:27 -0800)]
[PKT_SCHED] net: add sparse annotation to ptype_seq_start/stop

Get rid of some more sparse warnings.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] net classifier: style cleanup's
Stephen Hemminger [Mon, 21 Jan 2008 10:26:41 +0000 (02:26 -0800)]
[PKT_SCHED] net classifier: style cleanup's

Classifier code cleanup. Get rid of printk wrapper, and fix whitespace
and other style stuff reported by checkpatch

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] sch_atm: style cleanup
Stephen Hemminger [Mon, 21 Jan 2008 10:25:29 +0000 (02:25 -0800)]
[PKT_SCHED] sch_atm: style cleanup

ATM scheduler clean house:
  * get rid of printk and qdisc_priv() wrapper
  * split some assignment in if() statements
  * whitespace and line breaks.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] dsmark: checkpatch warning cleanup
Stephen Hemminger [Mon, 21 Jan 2008 10:24:21 +0000 (02:24 -0800)]
[PKT_SCHED] dsmark: checkpatch warning cleanup

Get rid of all style things checkpatch warns about, indentation and
whitespace.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] dsmark: handle cloned and non-linear skb's
Stephen Hemminger [Mon, 21 Jan 2008 10:23:49 +0000 (02:23 -0800)]
[PKT_SCHED] dsmark: handle cloned and non-linear skb's

Make dsmark work properly with non-linear and cloned skb's
Before modifying the header, it needs to check that skb header is
writeable.

Note: this makes the assumption, that if it queues a good skb
then a good skb will come out of the embedded qdisc.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] dsmark: Use hweight32() instead of convoluted loop.
David S. Miller [Mon, 21 Jan 2008 10:21:45 +0000 (02:21 -0800)]
[PKT_SCHED] dsmark: Use hweight32() instead of convoluted loop.

Based upon a patch by Stephen Hemminger and suggestions
from Patrick McHardy.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] dsmark: get rid of wrappers
Stephen Hemminger [Mon, 21 Jan 2008 08:50:09 +0000 (00:50 -0800)]
[PKT_SCHED] dsmark: get rid of wrappers

Remove extraneous macro wrappers for printk and qdisc_priv.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: addrconf sparse warnings
Stephen Hemminger [Mon, 21 Jan 2008 08:48:43 +0000 (00:48 -0800)]
[IPV6]: addrconf sparse warnings

Get rid of a couple of sparse warnings in IPV6 addrconf code.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: kill obsolete NET_CLS_POLICE option
Patrick McHardy [Mon, 21 Jan 2008 08:47:43 +0000 (00:47 -0800)]
[NET_SCHED]: kill obsolete NET_CLS_POLICE option

The code is already gone for about half a year, the config option
has been kept around to select the replacement options for easier
upgrades. This seems long enough, people upgrading from older
kernels will have to reconfigure a lot anyway.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[MACVLAN]: Fix thinko in macvlan_transfer_operstate()
Patrick McHardy [Mon, 21 Jan 2008 08:47:08 +0000 (00:47 -0800)]
[MACVLAN]: Fix thinko in macvlan_transfer_operstate()

When the lower device's carrier is off, the macvlan devices's
carrier state should be checked to decide whether it needs to
be turned off. Currently the lower device's state is checked
a second time.

This still works, but unnecessarily tries to turn off the
carrier when its already off.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Move protocol determination to seperate function
Pavel Emelyanov [Mon, 21 Jan 2008 08:28:03 +0000 (00:28 -0800)]
[VLAN]: Move protocol determination to seperate function

I think, that we can make this code flow easier to understand
by introducing the vlan_set_encap_proto() function (I hope the
name is good) to setup the skb proto and merge the paths calling
netif_rx() together.

[Patrick: Modified to apply on top of my previous patches]

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Clean up vlan_skb_recv()
Patrick McHardy [Mon, 21 Jan 2008 08:27:18 +0000 (00:27 -0800)]
[VLAN]: Clean up vlan_skb_recv()

- remove three instances of identical code
- remove unnecessary NULL initialization
- remove obvious and unnecessary comments

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Update list address
Patrick McHardy [Mon, 21 Jan 2008 08:27:00 +0000 (00:27 -0800)]
[VLAN]: Update list address

VLAN related mail should go to netdev.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: checkpatch cleanups
Patrick McHardy [Mon, 21 Jan 2008 08:26:41 +0000 (00:26 -0800)]
[VLAN]: checkpatch cleanups

Checkpatch cleanups, consisting mainly of overly long lines and
missing spaces.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Turn __constant_htons into htons where possible
Patrick McHardy [Mon, 21 Jan 2008 08:26:25 +0000 (00:26 -0800)]
[VLAN]: Turn __constant_htons into htons where possible

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Turn VLAN_DEV_INFO into inline function
Patrick McHardy [Mon, 21 Jan 2008 08:26:07 +0000 (00:26 -0800)]
[VLAN]: Turn VLAN_DEV_INFO into inline function

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Simplify vlan unregistration
Patrick McHardy [Mon, 21 Jan 2008 08:25:50 +0000 (00:25 -0800)]
[VLAN]: Simplify vlan unregistration

Keep track of the number of VLAN devices in a vlan group. This allows
to have the caller sense when the group is going to be destroyed and
stop using it, which in turn allows to remove the wrapper around
unregister_vlan_dev for the NETDEV_UNREGISTER notifier and avoid
iterating over all possible VLAN ids whenever a device in unregistered.

Also fix what looks like a use-after-free (but is actually safe since
we're holding the RTNL), the real_dev reference should not be dropped
while we still use it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Clean up unregister_vlan_dev
Patrick McHardy [Mon, 21 Jan 2008 08:25:31 +0000 (00:25 -0800)]
[VLAN]: Clean up unregister_vlan_dev

Save two levels of indentation by aborting on error conditions,
remove unnecessary initialization to NULL and remove two obvious
comments.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Clean up initialization code
Patrick McHardy [Mon, 21 Jan 2008 08:25:15 +0000 (00:25 -0800)]
[VLAN]: Clean up initialization code

- move module init/exit functions to end of file, remove some now unnecessary
  forward declarations
- remove some obvious comments
- clean up proc init function and move a proc-related printk there

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Remove non-implemented ioctls
Patrick McHardy [Mon, 21 Jan 2008 08:24:59 +0000 (00:24 -0800)]
[VLAN]: Remove non-implemented ioctls

The GET_VLAN_INGRESS_PRIORITY_CMD/GET_VLAN_EGRESS_PRIORITY_CMD ioctls are
not implemented and won't be, new functionality will be added to the netlink
interface. Remove the code and make the ioctl handler return -EOPNOTSUPP
for unknown commands instead of -EINVAL.

Also remove a comment about passing unknown commands to the underlying
device, that doesn't make any sense since its a VLAN specific ioctl and
if its not implemented here, its implemented nowhere.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Clean up debugging and printks
Patrick McHardy [Mon, 21 Jan 2008 08:24:30 +0000 (00:24 -0800)]
[VLAN]: Clean up debugging and printks

- use pr_* functions and common prefix for non-device related messages

- remove VLAN_ printk levels

- kill lots of useless debugging statements

- remove a few unnecessary printks like for double VID registration (already
  returns -EEXIST) and kill of a number of unnecessary checks in
  vlan_proc_{add,rem}_dev() that are already performed by the caller

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ETHER]: Bring back MAC_FMT
Patrick McHardy [Mon, 21 Jan 2008 08:24:13 +0000 (00:24 -0800)]
[ETHER]: Bring back MAC_FMT

The print_mac function is not very suitable for debugging printks
in performance critical paths since without ifdefs it will always
get called. MAC_FMT can be used with pr_debug without any overhead
when debugging is disabled.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Kill useless check
Patrick McHardy [Mon, 21 Jan 2008 08:22:30 +0000 (00:22 -0800)]
[VLAN]: Kill useless check

vlan->real_dev is always equal to the device since thats what we used
for the lookup. It doesn't even seem worth a WARN_ON or BUG_ON.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Move device setup to vlan_dev.c
Patrick McHardy [Mon, 21 Jan 2008 08:22:11 +0000 (00:22 -0800)]
[VLAN]: Move device setup to vlan_dev.c

Move device setup to vlan_dev.c and make all the VLAN device methods
static.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Use dev->stats
Patrick McHardy [Mon, 21 Jan 2008 08:19:31 +0000 (00:19 -0800)]
[VLAN]: Use dev->stats

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Kill useless VLAN_NAME define
Patrick McHardy [Mon, 21 Jan 2008 08:19:16 +0000 (00:19 -0800)]
[VLAN]: Kill useless VLAN_NAME define

The only user already includes __FUNCTION__ (vlan_proto_init) in the
output, which is enough to identify what the message is about.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Clean up vlan_hdr/vlan_ethhdr structs
Patrick McHardy [Mon, 21 Jan 2008 08:18:53 +0000 (00:18 -0800)]
[VLAN]: Clean up vlan_hdr/vlan_ethhdr structs

Fix 3 space indentation and some overly long lines by moving the
comments to a kdoc structure description.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Remove unnecessary structure declarations
Patrick McHardy [Mon, 21 Jan 2008 08:18:26 +0000 (00:18 -0800)]
[VLAN]: Remove unnecessary structure declarations

- struct packet_type is not used
- struct vlan_group is declared later in the file before the first use
- struct net_device is not needed since netdevice.h is included
- struct vlan_collection does not exist
- struct vlan_dev_info is declared later in the file before the first use

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: remove useless printk
Patrick McHardy [Mon, 21 Jan 2008 08:14:05 +0000 (00:14 -0800)]
[NET_SCHED]: sch_ingress: remove useless printk

The printk about ingress qdisc registration error can't be triggered
under normal circumstances. Since register_qdisc only fails for two
identical registrations, the only way to trigger it is by loading the
sch_ingress modules multiple times under different names, in which
case we already return -EEXIST to userspace.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: avoid a few #ifdefs
Patrick McHardy [Mon, 21 Jan 2008 08:13:44 +0000 (00:13 -0800)]
[NET_SCHED]: sch_ingress: avoid a few #ifdefs

Move the repeating "ifndef CONFIG_NET_CLS_ACT/ifdef CONFIG_NETFILTER"
ifdefs into a single condition.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: move dependencies to Kconfig
Patrick McHardy [Mon, 21 Jan 2008 08:13:19 +0000 (00:13 -0800)]
[NET_SCHED]: sch_ingress: move dependencies to Kconfig

Instead of complaining at scheduler initialization time, check the
dependencies in Kconfig.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: remove unnecessary ops
Patrick McHardy [Mon, 21 Jan 2008 08:12:53 +0000 (00:12 -0800)]
[NET_SCHED]: sch_ingress: remove unnecessary ops

- ->reset is optional
- sch_api provides identical defaults for ->dequeue/->requeue
- ->drop can't happen since ingress never has a parent qdisc

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: return proper error code in ingress_graft()
Patrick McHardy [Mon, 21 Jan 2008 08:12:32 +0000 (00:12 -0800)]
[NET_SCHED]: sch_ingress: return proper error code in ingress_graft()

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: remove unused inner qdisc
Patrick McHardy [Mon, 21 Jan 2008 08:12:10 +0000 (00:12 -0800)]
[NET_SCHED]: sch_ingress: remove unused inner qdisc

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: remove qdisc_priv() wrapper
Patrick McHardy [Mon, 21 Jan 2008 08:11:48 +0000 (00:11 -0800)]
[NET_SCHED]: sch_ingress: remove qdisc_priv() wrapper

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: remove excessive debugging
Patrick McHardy [Mon, 21 Jan 2008 08:11:21 +0000 (00:11 -0800)]
[NET_SCHED]: sch_ingress: remove excessive debugging

Remove excessive debugging statements and some "future use" stuff.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED]: sch_ingress: formatting fixes
Patrick McHardy [Mon, 21 Jan 2008 08:11:01 +0000 (00:11 -0800)]
[NET_SCHED]: sch_ingress: formatting fixes

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] SFQ: whitespace cleanup
Stephen Hemminger [Mon, 21 Jan 2008 01:20:56 +0000 (17:20 -0800)]
[PKT_SCHED] SFQ: whitespace cleanup

Add whitespace around operators, and add a few blank lines to improve
readability.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] SFQ: use net_random
Stephen Hemminger [Mon, 21 Jan 2008 01:19:43 +0000 (17:19 -0800)]
[PKT_SCHED] SFQ: use net_random

SFQ doesn't need true random numbers, it is only using them to salt a
hash. Therefore it is better to use net_random() and avoid any
possible problems with depleting the entropy pool.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED] SFQ: timer is deferrable
Stephen Hemminger [Mon, 21 Jan 2008 01:18:45 +0000 (17:18 -0800)]
[PKT_SCHED] SFQ: timer is deferrable

The perturbation timer used for re-keying can be deferred, it doesn't
need to be deterministic.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Process FIB rule action in the context of the namespace.
Denis V. Lunev [Mon, 21 Jan 2008 00:47:09 +0000 (16:47 -0800)]
[NETNS]: Process FIB rule action in the context of the namespace.

Save namespace context on the fib rule at the rule creation time and
call routing lookup in the correct namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: FIB rules API cleanup.
Denis V. Lunev [Mon, 21 Jan 2008 00:46:41 +0000 (16:46 -0800)]
[NETNS]: FIB rules API cleanup.

Remove struct net from fib_rules_register(unregister)/notify_change
paths and diet code size a bit.

add/remove: 0/0 grow/shrink: 10/12 up/down: 35/-100 (-65)
function                                     old     new   delta
notify_rule_change                           273     280      +7
trie_show_stats                              471     475      +4
fn_trie_delete                               473     477      +4
fib_rules_unregister                         144     148      +4
fib4_rule_compare                            119     123      +4
resize                                      2842    2845      +3
fn_trie_select_default                       515     518      +3
inet_sk_rebuild_header                       836     838      +2
fib_trie_seq_show                            764     766      +2
__devinet_sysctl_register                    276     278      +2
fn_trie_lookup                              1124    1123      -1
ip_fib_check_default                         133     131      -2
devinet_conf_sysctl                          223     221      -2
snmp_fold_field                              126     123      -3
fn_trie_insert                              2091    2086      -5
inet_create                                  876     870      -6
fib4_rules_init                              197     191      -6
fib_sync_down                                452     444      -8
inet_gso_send_check                          334     325      -9
fib_create_info                             3003    2991     -12
fib_nl_delrule                               568     553     -15
fib_nl_newrule                               883     852     -31

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[FIB]: Add netns to fib_rules_ops.
Denis V. Lunev [Mon, 21 Jan 2008 00:46:01 +0000 (16:46 -0800)]
[FIB]: Add netns to fib_rules_ops.

The backward link from FIB rules operations to the network namespace
will allow to simplify the API a bit.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Correctly initialize error when parameter validation failed.
Vlad Yasevich [Sun, 20 Jan 2008 14:10:46 +0000 (06:10 -0800)]
[SCTP]: Correctly initialize error when parameter validation failed.

When parameter validation fails, there should be error causes that
specify what type of failure we've encountered.  If the causes are not
there, we lacked memory to allocated them.  Thus make that the default
value for the error.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Irport removal - part 2
Adrian Bunk [Sat, 19 Jan 2008 08:01:13 +0000 (00:01 -0800)]
[IrDA]: Irport removal - part 2

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Irport removal - part 1
Adrian Bunk [Sat, 19 Jan 2008 08:00:42 +0000 (00:00 -0800)]
[IrDA]: Irport removal - part 1

This patch removes IrPORT and the old dongle drivers (all off them
have replacement drivers).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Frame length validation.
Robie Basak [Sat, 19 Jan 2008 07:58:44 +0000 (23:58 -0800)]
[IrDA]: Frame length validation.

When using a stir4200-based USB adaptor to talk to a device that uses
an mcp2150, the stir4200 sometimes drops an incoming frame causing the
mcp2150 to try and retransmit the lost frame. In this combination, the
next frame received from the mcp2150 is often invalid - either an
empty i:rsp or an IrCOMM i:rsp with an invalid clen. These corner
cases are now checked.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>