12 years agob43legacy: Use input-polldev for the rfkill switch
Larry Finger [Thu, 11 Oct 2007 03:48:17 +0000]
b43legacy: Use input-polldev for the rfkill switch

This removes the direct call to rfkill on an rfkill event
and replaces it with an input device. This way userspace is also
notified about the event.

This patch is the port to b43legacy of a patch for b43 by Michael Buesch
<mb@bu3sch.de>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agob43legacy: RF-kill support
Larry Finger [Thu, 11 Oct 2007 03:44:22 +0000]
b43legacy: RF-kill support

This adds full support for the RFKILL button and the RFKILL LED trigger.

This is a port to b43legacy of a patch by Michael Buesch <mb@bu3sch.de>
for b43.

Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agob43legacy: LED triggers support
Larry Finger [Sat, 13 Oct 2007 04:04:51 +0000]
b43legacy: LED triggers support

Drive the LEDs through the generic LED triggers.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to b43legacy.

Signed-off-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Christoph Hellwig [Thu, 25 Oct 2007 09:15:51 +0000]
iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965

Currently the iwl3945 & iwl4965 drivers share some common Kconfig
symbols.  This split it up into options for the individual drivers
and gets rid of all the CONFIG_IWLWIFI cruft.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: keep 3945 and 4965 headers separate
Christoph Hellwig [Thu, 25 Oct 2007 09:15:50 +0000]
iwlwifi: keep 3945 and 4965 headers separate

The iwl3945 and iwl4965 devices share some common structure, but with a
lot of difference split all over.  Currently the two drivers share a lot
of headers and use ugly preprocessor magic to manage the difference.

This patch keeps two entirely separate copies of the headers to get rid
of these hacks an ease future development.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: mark more functions/variables static
Christoph Hellwig [Thu, 25 Oct 2007 09:15:49 +0000]
iwlwifi: mark more functions/variables static

mark more functions/variables static

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Update iwlwifi version stamp to 1.1.19
Zhu Yi [Thu, 25 Oct 2007 09:15:48 +0000]
iwlwifi: Update iwlwifi version stamp to 1.1.19

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Update iwlwifi version stamp to 1.1.18
Zhu Yi [Thu, 25 Oct 2007 09:15:44 +0000]
iwlwifi: Update iwlwifi version stamp to 1.1.18

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwl4965: exclude 60M rate from probe request
mabbas [Thu, 25 Oct 2007 09:15:42 +0000]
iwl4965: exclude 60M rate from probe request

This patch do the following 2 things:
1. Make sure we don't add rate 60M part of supported rate in proble request,
   some AP does not like that.
2. It is wrong to set priv->active_rate in this function, this will set
   it to all avialable rates which might overwrite the mode supported rate.
   priv->active_rate should be set by only from iwl_set_rate.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Renames struct fw_image_desc to struct fw_desc
Tomas Winkler [Thu, 25 Oct 2007 09:15:41 +0000]
iwlwifi: Renames struct fw_image_desc to struct fw_desc

This patche shortens the name of struct fw_image_desc to be struct
fw_desc.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: add 5965 SCD registers to iwl-prph.h
Emmanuel Grumbach [Thu, 25 Oct 2007 09:15:40 +0000]
iwlwifi: add 5965 SCD registers to iwl-prph.h

This patch adds SCD registers for 5965

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: move 3945 SCD registers to iwl-prph.h
Emmanuel Grumbach [Thu, 25 Oct 2007 09:15:39 +0000]
iwlwifi: move 3945 SCD registers to iwl-prph.h

This patch moves 3945 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi-ht: move 4965 SCD registers to iwl-prph.h
Emmanuel Grumbach [Thu, 25 Oct 2007 09:15:38 +0000]
iwlwifi-ht: move 4965 SCD registers to iwl-prph.h

This patch moves 4965 SCD registers to iwl-prph.h. These registers
are assigned from the periphery bus

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: replacing wording restricted to nic access in iwl-io
Tomas Winkler [Thu, 25 Oct 2007 09:15:37 +0000]
iwlwifi: replacing wording restricted to nic access in iwl-io

This patch replaces wording 'restricted' with more appropriate 'nic access'
NIC access is grabbed to prevent NIC entering power save mode
General cleanup of iwl-io.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: rename restricted_mem to targ_mem
Tomas Winkler [Thu, 25 Oct 2007 09:15:36 +0000]
iwlwifi: rename restricted_mem to targ_mem

This patch renames restricted_mem suffix with more proper
name targ_mem for function accessing memory on the nic in target mode

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: replace restricted_reg with prph
Tomas Winkler [Thu, 25 Oct 2007 09:15:35 +0000]
iwlwifi: replace restricted_reg with prph

This patch renames restricted_reg suffix with more proper
name prhp for function accessing registers on the periphery bus.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame
mabbas [Thu, 25 Oct 2007 09:15:34 +0000]
iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame

The driver drops any Rx frame larger than 2332 bytes, but with A-MSDU
frame, it could be up to 4K. This patch makes sure we can process larger
A-MSDU frame.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: using PCI_DEVICE macro
Tomas Winkler [Thu, 25 Oct 2007 09:15:32 +0000]
iwlwifi: using PCI_DEVICE macro

PCI_DEVICE macro is more concise when using defualt values
in device definitions

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: remove cck_power_index_compensation
Tomas Winkler [Thu, 25 Oct 2007 09:15:31 +0000]
iwlwifi: remove cck_power_index_compensation

cck_power_index_compensation variable was never used

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: remove late null-check and duplicate bug_on
Ian Schram [Thu, 25 Oct 2007 09:15:30 +0000]
iwlwifi: remove late null-check and duplicate bug_on

These pieces of code appear to be useless. The BUG_ON is also performed in
iwl_send_cmd_async.

Serious karma would be needed to enter iwl_ativate_qos with a null priv.
I had a deja vu when patching this, but for the life of me I couldn't track
down a similar patch.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Beautify by removing superfluous newlines and code
Ian Schram [Thu, 25 Oct 2007 09:15:29 +0000]
iwlwifi: Beautify by removing superfluous newlines and code

Moving code around, lindent, and whatnot created several places where
there appeared to be an 75 column "rule" instead of 80. This patch removes
those that I can spot, hopefully increasing readability.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Two comments in iwl-3945.c were longer than 80 columns
Ian Schram [Thu, 25 Oct 2007 09:15:28 +0000]
iwlwifi: Two comments in iwl-3945.c were longer than 80 columns

This patch shorten two comments lines in iwl-3945.c

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: remove cck_flag from iwl_driver_hw_info
Tomas Winkler [Thu, 25 Oct 2007 09:15:27 +0000]
iwlwifi: remove cck_flag from iwl_driver_hw_info

This patch remove cck_flag from iwl_driver_hw_info, this flag
is unused after spliting the iwl-base.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: add TGN flag to qos parameters
Tomas Winkler [Thu, 25 Oct 2007 09:15:26 +0000]
iwlwifi: add TGN flag to qos parameters

This patch adds TGN flag to QoS parameters. This flag governs enablement of
NAV shortening with CF-End and filters in 4 or 8K RX AMSDU packets

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: rs-4965 fix return values
Tomas Winkler [Thu, 25 Oct 2007 09:15:25 +0000]
iwlwifi: rs-4965 fix return values

This patch cleans up style of 'return' of rate scale 4965 functions.
It renames return name variables rc to ret, change functions to void if no
meaningful value was returned it add return of -EINVAL for checks of wrong
arguments.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: renaming last_used and first_empty
Tomas Winkler [Thu, 25 Oct 2007 09:15:24 +0000]
iwlwifi: renaming last_used and first_empty

This patch renames queue pointers to write_ptr and read_ptr
instead of  first_empty and last_used. This is closer to technical
terminology we everyday use

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: rename iwl_eeprom_aqcuire_semaphore to _acquire_
Ian Schram [Thu, 25 Oct 2007 09:15:23 +0000]
iwlwifi: rename iwl_eeprom_aqcuire_semaphore to _acquire_

Correct the spelling of aqcuire.

Signed-off-by: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: fix various spelling and typos
Ian Schram [Thu, 25 Oct 2007 09:15:22 +0000]
iwlwifi: fix various spelling and typos

Fixing various spelling errors and typos. Mostly in comments. In total
27 words were corrected, some of which occurred more than ones.

Signed-Of-By: Ian Schram <ischram@telenet.be>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agoiwlwifi: Add erp_ie_changed hanlder
Tomas Winkler [Mon, 15 Oct 2007 22:50:25 +0000]
iwlwifi: Add erp_ie_changed hanlder

This patch adds erp_ie_changed handler to iwl4956

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

12 years agort2x00: Release rt2x00 2.0.12
Ivo van Doorn [Sat, 27 Oct 2007 11:44:08 +0000]
rt2x00: Release rt2x00 2.0.12

Version bump.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Correctly set ACK bit in tx descriptors
Mattias Nissler [Sat, 27 Oct 2007 11:43:49 +0000]
rt2x00: Correctly set ACK bit in tx descriptors

Add a flag to struct txdata_entry_desc that specifies whether an ack for the
frame is to be expected. Use this flag to set the ACK bit in the tx descriptor.
Previously, the ACK bit could be set incorrectly on CTS-to-self frames, so they
caused retries and were reported to be failed in the txdone handlers.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Place mutex around USB register access
Adam Baker [Sat, 27 Oct 2007 11:43:29 +0000]
rt2x00: Place mutex around USB register access

There is a buffer, csr_cache which is used to hold copies of data being passed
to the USB stack which can get corrupted if multiple threads attempt to access
CSR registers simultaneously. There is also the possibility if multiple
threads try to access BBP or RF registers for the multiple USB operations
needed to get interleaved leading to incorrect results. This patch introduces
a mutex to prevent such simultaneous access. The interleaved access problem
may also affect the PCI devices but if so that will be handled in a follow-up
patch.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Remove data_desc structure
Ivo van Doorn [Thu, 24 Jan 2008 08:48:03 +0000]
rt2x00: Remove data_desc structure

Coverty indicated that data_desc with a single
element array is bad coding style. This removes
the structure and forces everybody to use __le32.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Rework rt73 antenna selection
Mattias Nissler [Sat, 27 Oct 2007 11:42:37 +0000]
rt2x00: Rework rt73 antenna selection

This patch changes rt73 antenna selection to what I believe is the correct way.
It also fixes a small selection bug that switched the antennas by accident.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Remove unused variables
Ivo van Doorn [Sat, 27 Oct 2007 11:42:18 +0000]
rt2x00: Remove unused variables

With the updated antenna setup the following
variables are no longer used.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Rework rt61 antenna selection.
Mattias Nissler [Sat, 27 Oct 2007 11:41:53 +0000]
rt2x00: Rework rt61 antenna selection.

This patch changes rt61 antenna selection again. It helps at least with the
rt61 pci card in my box, I hope I haven't broken behaviour on other RF chips.
RF 2529 antenna setup is incomplete, we need to at code for diversity when we
figure out how it is done properly.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Unconstify rt2x00dev
Adam Baker [Sat, 27 Oct 2007 11:41:25 +0000]
rt2x00: Unconstify rt2x00dev

Some register accesses need rt2x00dev to be non-const
they all need modifying so the prototype is consistent.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Detect initial rfkill state on register
Ivo van Doorn [Sat, 27 Oct 2007 11:40:51 +0000]
rt2x00: Detect initial rfkill state on register

When registering rfkill, make sure a initial
poll event is directly executed to detect the initial
rfkill state and send the event to the rfkill layer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Input-polldev requires input device
Ivo van Doorn [Sat, 27 Oct 2007 11:40:25 +0000]
rt2x00: Input-polldev requires input device

input-polldev requires a correctly allocated
and initialized input device to be set for the
input_polled_dev->input field.
Failure to do that will prevent correct polling
of the device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Split rt61/rt73 antenna selection into RX and TX antenna
Ivo van Doorn [Sat, 27 Oct 2007 11:39:57 +0000]
rt2x00: Split rt61/rt73 antenna selection into RX and TX antenna

Based on investigation of the legacy drivers, I have made the
following assumptions of the antenna setup:
 - R77 is the TX antenna configuration
 - RF2529 fetches default antenna selection from NIC eeprom word

With these assumptions we can change the antenna configuration
to correctly read both antenna setup values and correctly
configure the antenna. And we can now also configure the antenna
for RF2529 without a double antenna.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agort2x00: Disable RX when switching antenna
Ivo van Doorn [Sat, 27 Oct 2007 11:39:28 +0000]
rt2x00: Disable RX when switching antenna

Antenna switching will be ignored when RX is enabled
during the switch. Make sure we disable the RX during
the switch and don't forget to reenable it later.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Release rt2x00 2.0.11
Ivo van Doorn [Sat, 13 Oct 2007 14:27:16 +0000]
[PATCH] rt2x00: Release rt2x00 2.0.11

Version bump.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Fix antenna selection.
Mattias Nissler [Sat, 13 Oct 2007 14:26:57 +0000]
[PATCH] rt2x00: Fix antenna selection.

In the config() handler, make sure that we do configure an antenna if the
current active antenna is uninitialized. Furthermore, don't overwrite the
active antenna with bogus values if we didn't touch the antenna setup.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Cleanup if-statements
Ivo van Doorn [Sat, 13 Oct 2007 14:26:42 +0000]
[PATCH] rt2x00: Cleanup if-statements

Cleanup if-statements for simple 1/0 register field values.

This also fixes a endian bug in rt2500usb when working
with the PHY_CSR2 initialization. As well as a bug
in the enabling of the LED in rt73usb.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Implement SW diversity
Ivo van Doorn [Sat, 13 Oct 2007 14:26:36 +0000]
[PATCH] rt2x00: Implement SW diversity

When mac80211 indicates that the default antenna setup
should be used _and_ that this default setup is SW_DIVERSITY.

This requires sampling and storing the RSSI per antenna
and check once every 2 seconds to determine if the RSSI
has changed significantly. Once this is the case we should sample
the other antenna for a short period and evaluate if
we need to swap antenna or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Remove rt2x00_clear_link
Ivo van Doorn [Sat, 13 Oct 2007 14:26:32 +0000]
[PATCH] rt2x00: Remove rt2x00_clear_link

rt2x00_clear_link() was becoming too large for statically inline,
also it was used on a single location and shouldn't really be
used anywhere else. So move the entire code into the function
rt2x00lib_start_link_tuner()

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: SW diversity should default to antenna B
Ivo van Doorn [Sat, 13 Oct 2007 14:26:27 +0000]
[PATCH] rt2x00: SW diversity should default to antenna B

Although ANTENNA_SW_DIVERSITY should never be send
to the driver, we should still handle it to prevent bugs.
But instead of defaulting to ANTENNA_HW_DIVERSITY we
should default to ANTENNA_B instead.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Correctly translate mac80211 antenna setup to rt2x00
Ivo van Doorn [Sat, 13 Oct 2007 14:26:23 +0000]
[PATCH] rt2x00: Correctly translate mac80211 antenna setup to rt2x00

mac80211 has 3 values for the antenna setup:
 0 - default
 1 - use antenna 1
 2 - use antenna 2

This means that rt2x00 should store the default value
from the EEPROM somwhere and use that when mac80211 indicates
that the antenna setup is 0.
This also implies that rt2x00 should no longer write the
hw->config.antenna_sel_* values based on the EEPROM input.

This also adds the basis in rt2x00lib for correct software
diversity handling. By default rt2x00lib will now configure
antenna B instead of hardware diversity.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Use enum defines
Ivo van Doorn [Sat, 13 Oct 2007 14:26:18 +0000]
[PATCH] rt2x00: Use enum defines

When setting the default EEPROM values use
the values from the enums instead of "magic" values.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[PATCH] rt2x00: Move quality statistics into seperate structure
Ivo van Doorn [Sat, 13 Oct 2007 14:26:12 +0000]
[PATCH] rt2x00: Move quality statistics into seperate structure

Move all link quality statistics variables into
the link_qual structure. This cleans up the link
structure and allows us to use it for more then
just statistics.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[BRIDGE]: Remove unused include of a header file in ebtables.c
Rami Rosen [Fri, 18 Jan 2008 13:38:31 +0000]
[BRIDGE]: Remove unused include of a header file in ebtables.c

In net/bridge/netfilter/ebtables.c,
- remove unused include of a header file (linux/tty.h) and remove the
  corresponding comment above it.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[SCTP]: Fix build warning in sctp_sf_do_5_1C_ack().
David S. Miller [Fri, 18 Jan 2008 12:47:58 +0000]
[SCTP]: Fix build warning in sctp_sf_do_5_1C_ack().

Reported by Andrew Morton.

net/sctp/sm_statefuns.c: In function 'sctp_sf_do_5_1C_ack':
net/sctp/sm_statefuns.c:484: warning: 'error' may be used uninitialized in this function

Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETNS][DST]: Add the network namespace pointer in dst_ops
Daniel Lezcano [Fri, 18 Jan 2008 11:58:07 +0000]
[NETNS][DST]: Add the network namespace pointer in dst_ops

The network namespace pointer can be stored into the dst_ops structure.
This is usefull when there are multiple instances of the dst_ops for a
protocol. When there are no several instances, this field will be never
used in the protocol. So there is no impact for the protocols which do
implement the network namespaces.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETNS][DST] dst: pass the dst_ops as parameter to the gc functions
Daniel Lezcano [Fri, 18 Jan 2008 11:56:57 +0000]
[NETNS][DST] dst: pass the dst_ops as parameter to the gc functions

The garbage collection function receive the dst_ops structure as
parameter. This is useful for the next incoming patchset because it
will need the dst_ops (there will be several instances) and the
network namespace pointer (contained in the dst_ops).

The protocols which do not take care of the namespaces will not be
impacted by this change (expect for the function signature), they do
just ignore the parameter.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[IPV4] FIB_HASH: Reduce memory needs and speedup lookups
Eric Dumazet [Fri, 18 Jan 2008 11:33:26 +0000]
[IPV4] FIB_HASH: Reduce memory needs and speedup lookups

Currently, sizeof(struct fib_alias) is 24 or 48 bytes on 32/64 bits
arches.

Because of SLAB_HWCACHE_ALIGN requirement, these are rounded to 32 and
64 bytes respectively.

This patch moves rcu to the end of fib_alias, and conditionally
defines it only for CONFIG_IP_FIB_TRIE.

We also remove SLAB_HWCACHE_ALIGN requirement for fib_alias and
fib_node objects because it is not necessary.

(BTW SLUB currently denies it for objects smaller than
cache_line_size() / 2, but not SLAB)

Finally, sizeof(fib_alias) go back to 16 and 32 bytes.

Then, we can embed one fib_alias on each fib_node, to favor locality.
Most of the time access to the fib_alias will be free because one
cache line contains both the list head (fn_alias) and (one of) the
list element.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[FIB]: Fix rcu_dereference() abuses in fib_trie.c
Eric Dumazet [Fri, 18 Jan 2008 11:31:36 +0000]
[FIB]: Fix rcu_dereference() abuses in fib_trie.c

node_parent() and tnode_get_child() currently use rcu_dereference().

These functions are called from both
- readers only paths (where rcu_dereference() is needed), and
- writer path (where rcu_dereference() is not needed)

To make explicit where rcu_dereference() is really needed, I
introduced new node_parent_rcu() and tnode_get_child_rcu() functions
which use rcu_dereference(), while node_parent() and tnode_get_child()
dont use it.

Then I changed calling sites where rcu_dereference() was really needed
to call the _rcu() variants.

This should have no impact but for alpha architecture, and may help
future sparse checks.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[ROSE]: Supress sparse warnings
Eric Dumazet [Tue, 15 Jan 2008 11:30:35 +0000]
[ROSE]: Supress sparse warnings

  CHECK   net/rose/af_rose.c
net/rose/af_rose.c:125:11: warning: expensive signed divide
net/rose/af_rose.c:976:46: warning: expensive signed divide
net/rose/af_rose.c:1379:13: warning: context imbalance in 'rose_info_start' - wrong count at exit
net/rose/af_rose.c:1406:13: warning: context imbalance in 'rose_info_stop' - unexpected unlock
  CHECK   net/rose/rose_in.c
net/rose/rose_in.c:185:25: warning: expensive signed divide
  CHECK   net/rose/rose_route.c
net/rose/rose_route.c:997:46: warning: expensive signed divide
net/rose/rose_route.c:1070:13: warning: context imbalance in 'rose_node_start' - wrong count at exit
net/rose/rose_route.c:1093:13: warning: context imbalance in 'rose_node_stop' - unexpected unlock
net/rose/rose_route.c:1146:13: warning: context imbalance in 'rose_neigh_start' - wrong count at exit
net/rose/rose_route.c:1169:13: warning: context imbalance in 'rose_neigh_stop' - unexpected unlock
net/rose/rose_route.c:1229:13: warning: context imbalance in 'rose_route_start' - wrong count at exit
net/rose/rose_route.c:1252:13: warning: context imbalance in 'rose_route_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[ATM]: Suppress some sparse warnings
Eric Dumazet [Tue, 15 Jan 2008 11:29:50 +0000]
[ATM]: Suppress some sparse warnings

  CHECK   net/atm/br2684.c
net/atm/br2684.c:665:13: warning: context imbalance in 'br2684_seq_start' - wrong count at exit
net/atm/br2684.c:676:13: warning: context imbalance in 'br2684_seq_stop' - unexpected unlock
  CHECK   net/atm/lec.c
net/atm/lec.c:196:23: warning: expensive signed divide
  CHECK   net/atm/proc.c
net/atm/proc.c:151:14: warning: context imbalance in 'vcc_seq_start' - wrong count at exit
net/atm/proc.c:154:13: warning: context imbalance in 'vcc_seq_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[APPLETALK]: Annotations to clear sparse warnings
Eric Dumazet [Tue, 15 Jan 2008 11:28:43 +0000]
[APPLETALK]: Annotations to clear sparse warnings

  CHECK   net/appletalk/aarp.c
net/appletalk/aarp.c:951:14: warning: context imbalance in 'aarp_seq_start' - wrong count at exit
net/appletalk/aarp.c:977:13: warning: context imbalance in 'aarp_seq_stop' - unexpected unlock
  CHECK   net/appletalk/atalk_proc.c
net/appletalk/atalk_proc.c:34:11: warning: context imbalance in 'atalk_seq_interface_start' - wrong count at exit
net/appletalk/atalk_proc.c:54:13: warning: context imbalance in 'atalk_seq_interface_stop' - unexpected unlock
net/appletalk/atalk_proc.c:93:11: warning: context imbalance in 'atalk_seq_route_start' - wrong count at exit
net/appletalk/atalk_proc.c:113:13: warning: context imbalance in 'atalk_seq_route_stop' - unexpected unlock
net/appletalk/atalk_proc.c:161:11: warning: context imbalance in 'atalk_seq_socket_start' - wrong count at exit
net/appletalk/atalk_proc.c:178:13: warning: context imbalance in 'atalk_seq_socket_stop' - unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack: make print_conntrack function optional for l4protos
Patrick McHardy [Tue, 15 Jan 2008 07:49:37 +0000]
[NETFILTER]: nf_conntrack: make print_conntrack function optional for l4protos

Allows to remove five empty implementations.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack: remove print_conntrack function from l3protos
Patrick McHardy [Tue, 15 Jan 2008 07:49:17 +0000]
[NETFILTER]: nf_conntrack: remove print_conntrack function from l3protos

Its unused and unlikely to ever be used.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack: clean up a few header files
Patrick McHardy [Tue, 15 Jan 2008 07:48:57 +0000]
[NETFILTER]: nf_conntrack: clean up a few header files

- Remove declarations of non-existing variables and functions
- Move helper init/cleanup function declarations to nf_conntrack_helper.h
- Remove unneeded __nf_conntrack_attach declaration and make it static

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: kill nf_sysctl.c
Patrick McHardy [Tue, 15 Jan 2008 07:48:39 +0000]
[NETFILTER]: kill nf_sysctl.c

Since there now is generic support for shared sysctl paths, the only
remains are the net/netfilter and net/ipv4/netfilter paths. Move them
to net/netfilter/core.c and net/ipv4/netfilter.c and kill nf_sysctl.c.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: remove timeout indirection
Patrick McHardy [Tue, 15 Jan 2008 07:48:17 +0000]
[NETFILTER]: nf_conntrack_sctp: remove timeout indirection

Instead of keeping pointers to the timeout values in a table, simply
put the timeout values in the table directly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: replace magic value by symbolic constant
Patrick McHardy [Tue, 15 Jan 2008 07:48:02 +0000]
[NETFILTER]: nf_conntrack_sctp: replace magic value by symbolic constant

Use SCTP_CHUNK_FLAG_T instead of 0x1.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: remove unused ttag field from conntrack data
Patrick McHardy [Tue, 15 Jan 2008 07:47:44 +0000]
[NETFILTER]: nf_conntrack_sctp: remove unused ttag field from conntrack data

Spotted by Pablo Neira Ayuso <pablo@netfilter.org>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: don't take sctp_lock once per chunk
Patrick McHardy [Tue, 15 Jan 2008 07:47:25 +0000]
[NETFILTER]: nf_conntrack_sctp: don't take sctp_lock once per chunk

Don't take and release the lock once per SCTP chunk, simply hold it
the entire time while iterating through the chunks.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: rename "newconntrack" variable
Patrick McHardy [Tue, 15 Jan 2008 07:47:09 +0000]
[NETFILTER]: nf_conntrack_sctp: rename "newconntrack" variable

The name is misleading, it holds the new connection state, so rename it
to "newstate". Also rename "oldsctpstate" to "oldstate" for consistency.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: consolidate sctp_packet() error paths
Patrick McHardy [Tue, 15 Jan 2008 07:46:52 +0000]
[NETFILTER]: nf_conntrack_sctp: consolidate sctp_packet() error paths

Consolidate error paths and use proper symbolic return value instead
of magic values.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: reduce line length further
Patrick McHardy [Tue, 15 Jan 2008 07:46:37 +0000]
[NETFILTER]: nf_conntrack_sctp: reduce line length further

Eliminate a few lines over 80 characters by using a local variable to
hold the conntrack direction instead of using CTINFO2DIR everywhere.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: reduce line length
Patrick McHardy [Tue, 15 Jan 2008 07:46:20 +0000]
[NETFILTER]: nf_conntrack_sctp: reduce line length

Reduce the length of some overly long lines by renaming all
"conntrack" variables to "ct".

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: use proper types for bitops
Patrick McHardy [Tue, 15 Jan 2008 07:46:05 +0000]
[NETFILTER]: nf_conntrack_sctp: use proper types for bitops

Use unsigned long instead of char for the bitmap and removed lots
of casts.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_sctp: basic cleanups
Patrick McHardy [Tue, 15 Jan 2008 07:45:48 +0000]
[NETFILTER]: nf_conntrack_sctp: basic cleanups

Reindent switch cases properly, get rid of weird constructs like "!(x == y)",
put logical operations on the end of the line instead of the next line, get
rid of superfluous braces.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_tcp: remove timeout indirection
Patrick McHardy [Tue, 15 Jan 2008 07:45:32 +0000]
[NETFILTER]: nf_conntrack_tcp: remove timeout indirection

Instead of keeping pointers to the timeout values in a table, simply
put the timeout values in the table directly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_{tcp,sctp}: shrink state table
Patrick McHardy [Tue, 15 Jan 2008 07:45:11 +0000]
[NETFILTER]: nf_conntrack_{tcp,sctp}: shrink state table

The TCP and SCTP conntrack state transition tables only holds
small numbers, but gcc uses 4 byte per entry for the enum. Switching
to an u8 reduces the size from 480 to 120 bytes for TCP and from
576 to 144 bytes for SCTP.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: nf_conntrack_{tcp,sctp}: mark state table const
Patrick McHardy [Tue, 15 Jan 2008 07:44:49 +0000]
[NETFILTER]: nf_conntrack_{tcp,sctp}: mark state table const

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: ipt_REJECT: properly handle IP options
Denys Vlasenko [Tue, 15 Jan 2008 07:44:26 +0000]
[NETFILTER]: ipt_REJECT: properly handle IP options

The current TCP RST construction reuses the old packet and can't
deal with IP options as a consequence of that. Construct the
RST from scratch instead.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: {ip,ip6}_tables: remove some inlines
Denys Vlasenko [Tue, 15 Jan 2008 07:44:05 +0000]
[NETFILTER]: {ip,ip6}_tables: remove some inlines

This patch removes inlines except those which are used
by packet matching code and thus are performance-critical.

Before:

$ size */*/*/ip*tables*.o
   text    data     bss     dec     hex filename
   6402     500      16    6918    1b06 net/ipv4/netfilter/ip_tables.o
   7130     500      16    7646    1dde net/ipv6/netfilter/ip6_tables.o

After:

$ size */*/*/ip*tables*.o
   text    data     bss     dec     hex filename
   6307     500      16    6823    1aa7 net/ipv4/netfilter/ip_tables.o
   7010     500      16    7526    1d66 net/ipv6/netfilter/ip6_tables.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Update feature-removal-schedule.txt
Jan Engelhardt [Tue, 15 Jan 2008 07:43:34 +0000]
[NETFILTER]: Update feature-removal-schedule.txt

With all the newly introduced features, there is a lot to remove
later on after a compatibility grace period of 2 years.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_iprange match, revision 1
Jan Engelhardt [Tue, 15 Jan 2008 07:43:03 +0000]
[NETFILTER]: xt_iprange match, revision 1

Adds IPv6 support to xt_iprange, making it possible to match on IPv6
address ranges with ip6tables.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Rename ipt_iprange to xt_iprange
Jan Engelhardt [Tue, 15 Jan 2008 07:42:47 +0000]
[NETFILTER]: Rename ipt_iprange to xt_iprange

This patch moves ipt_iprange to xt_iprange, in preparation for adding
IPv6 support to xt_iprange.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Update modules' descriptions
Jan Engelhardt [Tue, 15 Jan 2008 07:42:28 +0000]
[NETFILTER]: Update modules' descriptions

Updates the MODULE_DESCRIPTION() tags for all Netfilter modules,
actually describing what the module does and not just
"netfilter XYZ target".

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_policy: use the new union nf_inet_addr
Jan Engelhardt [Tue, 15 Jan 2008 07:42:06 +0000]
[NETFILTER]: xt_policy: use the new union nf_inet_addr

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_pkttype: IPv6 multicast address recognition
Jan Engelhardt [Tue, 15 Jan 2008 07:41:50 +0000]
[NETFILTER]: xt_pkttype: IPv6 multicast address recognition

Signed-off-by: Jan Engelhart <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_pkttype: Add explicit check for IPv4
Jan Engelhardt [Tue, 15 Jan 2008 07:41:34 +0000]
[NETFILTER]: xt_pkttype: Add explicit check for IPv4

In the PACKET_LOOPBACK case, the skb data was always interpreted as
IPv4, but that is not valid for IPv6, obviously. Fix this by adding an
extra condition to check for AF_INET.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_mark match, revision 1
Jan Engelhardt [Tue, 15 Jan 2008 07:41:11 +0000]
[NETFILTER]: xt_mark match, revision 1

Introduces the xt_mark match revision 1. It uses fixed types,
eventually obsoleting revision 0 some day (uses nonfixed types).

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_conntrack match, revision 1
Jan Engelhardt [Tue, 15 Jan 2008 07:40:53 +0000]
[NETFILTER]: xt_conntrack match, revision 1

Introduces the xt_conntrack match revision 1. It uses fixed types, the
new nf_inet_addr and comes with IPv6 support, thereby completely
superseding xt_state.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Extend nf_inet_addr with in{,6}_addr
Jan Engelhardt [Tue, 15 Jan 2008 07:40:34 +0000]
[NETFILTER]: Extend nf_inet_addr with in{,6}_addr

Extend union nf_inet_addr with struct in_addr and in6_addr. Useful
because a lot of in-kernel IPv4 and IPv6 functions use
in_addr/in6_addr.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_connmark match, revision 1
Jan Engelhardt [Tue, 15 Jan 2008 07:39:13 +0000]
[NETFILTER]: xt_connmark match, revision 1

Introduces the xt_connmark match revision 1. It uses fixed types,
eventually obsoleting revision 0 some day (uses nonfixed types).
(Unfixed types like "unsigned long" do not play well with mixed
user-/kernelspace "bitness", e.g. 32/64, as is common on SPARC64,
and need extra compat code.)

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_MARK target, revision 2
Jan Engelhardt [Tue, 15 Jan 2008 07:38:52 +0000]
[NETFILTER]: xt_MARK target, revision 2

Introduces the xt_MARK target revision 2. It uses fixed types, and
also uses the more expressive XOR logic.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_CONNMARK target, revision 1
Jan Engelhardt [Tue, 15 Jan 2008 07:38:34 +0000]
[NETFILTER]: xt_CONNMARK target, revision 1

Introduces the xt_CONNMARK target revision 1. It uses fixed types, and
also uses the more expressive XOR logic. Futhermore, it allows to
selectively pick bits from both the ctmark and the nfmark in the SAVE
and RESTORE operations.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Annotate start of kernel fields in NF headers
Jan Engelhardt [Tue, 15 Jan 2008 07:33:14 +0000]
[NETFILTER]: Annotate start of kernel fields in NF headers

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_TOS: Properly set the TOS field
Jan Engelhardt [Tue, 15 Jan 2008 07:32:54 +0000]
[NETFILTER]: xt_TOS: Properly set the TOS field

Fix incorrect mask value passed to ipv4_change_dsfield/ipv6_change_dsfield.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: xt_TOS: Change semantic of mask value
Jan Engelhardt [Tue, 15 Jan 2008 07:32:37 +0000]
[NETFILTER]: xt_TOS: Change semantic of mask value

This patch changes the behavior of xt_TOS v1 so that the mask value
the user supplies means "zero out these bits" rather than "keep these
bits". This is more easy on the user, as (I would assume) people keep
more bits than zeroing, so, an example:

Action:     Set bit 0x01.
     before (&): iptables -j TOS --set-tos 0x01/0xFE
     after (&~): iptables -j TOS --set-tos 0x01/0x01

This is not too "tragic" with xt_TOS, but where larger fields are used
(e.g. proposed xt_MARK v2), `--set-xmar 0x01/0x01` vs. `--set-xmark
0x01/0xFFFFFFFE` really makes a difference. Other target(!) modules,
such as xt_TPROXY also use &~ rather than &, so let's get to a common
ground.

(Since xt_TOS has not yet left the development tree en direction to
mainline, the semantic can be changed as proposed without breaking
iptables.)

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: remove ipt_TOS.c
Jan Engelhardt [Tue, 15 Jan 2008 07:32:13 +0000]
[NETFILTER]: remove ipt_TOS.c

Commit 88c85d81f74f92371745158aebc5cbf490412002 forgot to remove the
old ipt_TOS file (whose code has been merged into xt_DSCP). Remove
it now.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Remove some EXPERIMENTAL dependencies
Patrick McHardy [Tue, 15 Jan 2008 07:31:36 +0000]
[NETFILTER]: Remove some EXPERIMENTAL dependencies

Most of the netfilter modules are not considered experimental anymore,
the only ones I want to keep marked as EXPERIMENTAL are:

- TCPOPTSTRIP target, which is brand new.

- SANE helper, which is quite new.

- CLUSTERIP target, which I believe hasn't had much testing despite
  being in the kernel for quite a long time.

- SCTP match and conntrack protocol, which are a mess and need to
  be reviewed and cleaned up before I would trust them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[NETFILTER]: Hide a few more options under NETFILTER_ADVANCED
Patrick McHardy [Tue, 15 Jan 2008 07:30:56 +0000]
[NETFILTER]: Hide a few more options under NETFILTER_ADVANCED

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[IPV4]: fib hash|trie initialization
Stephen Hemminger [Tue, 15 Jan 2008 07:14:20 +0000]
[IPV4]: fib hash|trie initialization

Initialization of the slab cache's should be done when IP is
initialized to make sure of available memory, and that code can be
marked __init.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[IPV4] fib_trie: size and statistics
Stephen Hemminger [Tue, 15 Jan 2008 07:11:54 +0000]
[IPV4] fib_trie: size and statistics

Show number of entries in trie, the size field was being set but never used,
but it only counted leaves, not all entries. Refactor the two cases in
fib_triestat_seq_show into a single routine.

Note: the stat structure was being malloc'd but the stack usage isn't so
high (288 bytes) that it is worth the additional complexity.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago[FIB]: Avoid using static variables without proper locking
Eric Dumazet [Tue, 15 Jan 2008 07:09:56 +0000]
[FIB]: Avoid using static variables without proper locking

fib_trie_seq_show() uses two helper functions, rtn_scope() and
rtn_type() that can write to static storage without locking.

Just pass to them a temporary buffer to avoid potential corruption
(probably not triggerable but still...)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>