summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ipw2200 fix: ->rt_chbitmask is le16Al Viro2008-01-291-2/+2
| | | | | | | | | 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>
* ipw2200 fix: struct ieee80211_radiotap_header is little-endianAl Viro2008-01-291-9/+9
| | | | | | | 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>
* ray_cs fixesAl Viro2008-01-291-41/+26Star
| | | | | | | | | | | | | | | | | | | | | | 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>
* ipw2100 annotations and fixesAl Viro2008-01-291-5/+5
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54common annotations and fixesAl Viro2008-01-291-4/+4
| | | | | | | | * ->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>
* hostap: fix endianness with txdesc->sw_supportAl Viro2008-01-291-2/+2
| | | | | | | it's le32, not le16... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: fix writerids() endiannessAl Viro2008-01-291-2/+2
| | | | | | | | 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>
* airo endianness bug: cap_rid.extSoftCapAl Viro2008-01-291-1/+2
| | | | | | | 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>
* airo: bug in airo_interrupt() handling on incoming 802.11Al Viro2008-01-291-51/+23Star
| | | | | | | | | | | | | 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>
* airo: fix endianness bug in ->dBm handlingAl Viro2008-01-291-3/+6
| | | | | | | | 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>
* airo: fix transmit_802_11_packet()Al Viro2008-01-291-8/+3Star
| | | | | | | | | | | | | 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>
* ieee80211: beacon->capability is little-endianAl Viro2008-01-291-20/+19Star
| | | | | | | | 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>
* ieee80211: fix misannotationsAl Viro2008-01-294-22/+22
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ieee80211softmac_auth_resp() fixAl Viro2008-01-291-3/+3
| | | | | | | | | | 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>
* several missing cpu_to_le16() in ieee80211softmac_capabilities()Al Viro2008-01-291-5/+5
| | | | | | | | 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>
* eliminate byteswapping in struct ieee80211_qos_parametersAl Viro2008-01-293-57/+48Star
| | | | | | | | 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>
* wireless: cleanup some merge errorsJohn W. Linville2008-01-292-4/+36
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [IPV4]: Enable use of 240/4 address space.Jan Engelhardt2008-01-295-11/+12
| | | | | | | | | | 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>
* [NET] gen_estimator: gen_replace_estimator() cosmetic changesJarek Poplawski2008-01-291-7/+6Star
| | | | | | | | 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>
* [PKT_SCHED] net: add sparse annotation to ptype_seq_start/stopStephen Hemminger2008-01-291-0/+2
| | | | | | | Get rid of some more sparse warnings. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PKT_SCHED] net classifier: style cleanup'sStephen Hemminger2008-01-292-87/+73Star
| | | | | | | | 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>
* [PKT_SCHED] sch_atm: style cleanupStephen Hemminger2008-01-291-74/+65Star
| | | | | | | | | | 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>
* [PKT_SCHED] dsmark: checkpatch warning cleanupStephen Hemminger2008-01-291-39/+40
| | | | | | | | 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>
* [PKT_SCHED] dsmark: handle cloned and non-linear skb'sStephen Hemminger2008-01-291-4/+15
| | | | | | | | | | | | 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>
* [PKT_SCHED] dsmark: Use hweight32() instead of convoluted loop.David S. Miller2008-01-291-12/+3Star
| | | | | | | Based upon a patch by Stephen Hemminger and suggestions from Patrick McHardy. Signed-off-by: David S. Miller <davem@davemloft.net>
* [PKT_SCHED] dsmark: get rid of wrappersStephen Hemminger2008-01-291-49/+34Star
| | | | | | | 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>
* [IPV6]: addrconf sparse warningsStephen Hemminger2008-01-291-1/+3
| | | | | | | 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>
* [NET_SCHED]: kill obsolete NET_CLS_POLICE optionPatrick McHardy2008-01-291-9/+0Star
| | | | | | | | | | 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>
* [MACVLAN]: Fix thinko in macvlan_transfer_operstate()Patrick McHardy2008-01-291-1/+1
| | | | | | | | | | | | | 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>
* [VLAN]: Move protocol determination to seperate functionPavel Emelyanov2008-01-291-28/+35
| | | | | | | | | | | | | 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>
* [VLAN]: Clean up vlan_skb_recv()Patrick McHardy2008-01-291-89/+24Star
| | | | | | | | | - 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>
* [VLAN]: Update list addressPatrick McHardy2008-01-292-2/+2
| | | | | | | VLAN related mail should go to netdev. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [VLAN]: checkpatch cleanupsPatrick McHardy2008-01-295-84/+89
| | | | | | | | 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>
* [VLAN]: Turn __constant_htons into htons where possiblePatrick McHardy2008-01-291-3/+3
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [VLAN]: Turn VLAN_DEV_INFO into inline functionPatrick McHardy2008-01-297-51/+54
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [VLAN]: Simplify vlan unregistrationPatrick McHardy2008-01-294-63/+23Star
| | | | | | | | | | | | | | | 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>
* [VLAN]: Clean up unregister_vlan_devPatrick McHardy2008-01-291-40/+32Star
| | | | | | | | | 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>
* [VLAN]: Clean up initialization codePatrick McHardy2008-01-292-92/+70Star
| | | | | | | | | | - 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>
* [VLAN]: Remove non-implemented ioctlsPatrick McHardy2008-01-291-22/+1Star
| | | | | | | | | | | | | | 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>
* [VLAN]: Clean up debugging and printksPatrick McHardy2008-01-294-138/+30Star
| | | | | | | | | | | | | | | - 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>
* [ETHER]: Bring back MAC_FMTPatrick McHardy2008-01-291-0/+1
| | | | | | | | | | 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>
* [VLAN]: Kill useless checkPatrick McHardy2008-01-291-18/+0Star
| | | | | | | | 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>
* [VLAN]: Move device setup to vlan_dev.cPatrick McHardy2008-01-293-108/+86Star
| | | | | | | | 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>
* [VLAN]: Use dev->statsPatrick McHardy2008-01-294-18/+6Star
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [VLAN]: Kill useless VLAN_NAME definePatrick McHardy2008-01-292-4/+2Star
| | | | | | | | 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>
* [VLAN]: Clean up vlan_hdr/vlan_ethhdr structsPatrick McHardy2008-01-291-10/+23
| | | | | | | | 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>
* [VLAN]: Remove unnecessary structure declarationsPatrick McHardy2008-01-291-5/+0Star
| | | | | | | | | | | - 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>
* [NET_SCHED]: sch_ingress: remove useless printkPatrick McHardy2008-01-291-8/+1Star
| | | | | | | | | | | | 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>
* [NET_SCHED]: sch_ingress: avoid a few #ifdefsPatrick McHardy2008-01-291-12/+4Star
| | | | | | | | | 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>
* [NET_SCHED]: sch_ingress: move dependencies to KconfigPatrick McHardy2008-01-292-10/+2Star
| | | | | | | | | 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>