aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vlan: support "loose binding" to the underlying network devicePatrick McHardy2009-11-264-5/+14
| | | | | | | | | | | | Currently the UP/DOWN state of VLANs is synchronized to the state of the underlying device, meaning all VLANs are set down once the underlying device is set down. This causes all routes to the VLAN devices to vanish. Add a flag to specify a "loose binding" mode, in which only the operstate is transfered, but the VLAN device state is independant. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Do not set net_device::trans_start in self-testBen Hutchings2009-11-261-1/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move inline comment into kernel-docBen Hutchings2009-11-261-3/+1
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Change MAC promiscuity and multicast hash at the same timeBen Hutchings2009-11-264-23/+29
| | | | | | | | | | | | | | | | | From: Steve Hodgson <shodgson@solarflare.com> Currently we can set multicast hash immediately (in atomic context) but must delay setting MAC promiscuity. There is not that much point in deferring one but not the other, and setting the multicast hash on Siena will involve a firmware request. So process them both in efx_mac_work(). Also, set the broadcast bit in the multicast hash in efx_set_multicast_list(), since this is required for both Falcon and Siena. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Simplify XMAC link pollingBen Hutchings2009-11-268-54/+41
| | | | | | | | | | | | | | | | | | | | | | | | From: Steve Hodgson <shodgson@solarflare.com> Only the XMAC on Falcon needs help from the driver to poll and reset the MAC-PHY link (XAUI); GMII is a simple parallel bus and on later NICs firmware takes care of the XAUI link. Also, an XMAC interrupt currently schedules a work item which simply clears a flag (efx_nic::mac_up) to be checked by the regular monitor (or the next link reconfiguration, if that is sooner). Rename the flag to xmac_poll_required, changing its sense. Remove the needless indirection and just set the flag immediately. Call falcon_xmac_poll() directly where required. Add a new generic operation mac_op::check_fault to check the link outside of regular monitoring, as required during self-tests. (Note that this leaves us with an unused work item, but we will immediately have another use for it.) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Move Falcon board/PHY/MAC monitoring code to falcon.cBen Hutchings2009-11-263-10/+17
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Split MAC stats DMA initiation and completionBen Hutchings2009-11-269-88/+139
| | | | | | | | | | | | | | | From: Steve Hodgson <shodgson@solarflare.com> Currently we initiate MAC stats DMA and busy-wait for completion when stats are requested. We can improve on this with a periodic timer to initiate and poll for stats, and opportunistically poll when stats are requested. Since efx_nic::stats_disable_count and efx_stats_{disable,enable}() are Falcon-specific, rename them and move them accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Hold MAC lock for longer in efx_init_port()Ben Hutchings2009-11-261-5/+9
| | | | | | | | | Although efx_init_port() is only called at probe time and so cannot race with port reconfiguration, most of the functions it calls can expect to be called with the MAC lock held. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Only switch Falcon MAC clocks as necessarySteve Hodgson2009-11-261-17/+25
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove unused function efx_flush_queues()Ben Hutchings2009-11-262-14/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Fix bugs in RX queue flushingBen Hutchings2009-11-262-41/+73
| | | | | | | | | Avoid overrunning the hardware limit of 4 concurrent RX queue flushes. Expand the queue flush state to support this. Make similar changes to TX flushing to keep the code symmetric. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Clean up struct falcon_board and struct falcon_board_dataBen Hutchings2009-11-267-80/+85
| | | | | | | | Put all static information in struct falcon_board_type and replace it with a pointer in struct falcon_board. Simplify probing aocordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Remove unused constantBen Hutchings2009-11-261-3/+0
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Comment correctionsBen Hutchings2009-11-263-6/+3
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Strengthen EFX_ASSERT_RESET_SERIALISEDBen Hutchings2009-11-261-1/+2
| | | | | Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Treat all MAC registers as 128-bitBen Hutchings2009-11-262-14/+14
| | | | | | | | | | Although all the defined fields in these registers are within 32 bits, they are architecturally defined as 128-bit like most other Falcon registers. In particular, we must use efx_reado() to ensure proper locking when reading MD_STAT_REG. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sfc: Fix descriptor cache sizesBen Hutchings2009-11-261-4/+4
| | | | | | | | These were accidentally undersized by a factor of 2, which limited performance. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* macvlan: export macvlan mode through netlinkArnd Bergmann2009-11-262-6/+65
| | | | | | | | | | | | | | In order to support all three modes of macvlan at runtime, extend the existing netlink protocol to allow choosing the mode per macvlan slave interface. This depends on a matching patch to iproute2 in order to become accessible in user land. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* macvlan: implement bridge, VEPA and private modeArnd Bergmann2009-11-261-8/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows each macvlan slave device to be in one of three modes, depending on the use case: MACVLAN_PRIVATE: The device never communicates with any other device on the same upper_dev. This even includes frames coming back from a reflective relay, where supported by the adjacent bridge. MACVLAN_VEPA: The new Virtual Ethernet Port Aggregator (VEPA) mode, we assume that the adjacent bridge returns all frames where both source and destination are local to the macvlan port, i.e. the bridge is set up as a reflective relay. Broadcast frames coming in from the upper_dev get flooded to all macvlan interfaces in VEPA mode. We never deliver any frames locally. MACVLAN_BRIDGE: We provide the behavior of a simple bridge between different macvlan interfaces on the same port. Frames from one interface to another one get delivered directly and are not sent out externally. Broadcast frames get flooded to all other bridge ports and to the external interface, but when they come back from a reflective relay, we don't deliver them again. Since we know all the MAC addresses, the macvlan bridge mode does not require learning or STP like the bridge module does. Based on an earlier patch "macvlan: Reflect macvlan packets meant for other macvlan devices" by Eric Biederman. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Patrick McHardy <kaber@trash.net> Cc: Eric Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* macvlan: cleanup rx statisticsArnd Bergmann2009-11-261-29/+41
| | | | | | | | | | | | | We have very similar code for rx statistics in two places in the macvlan driver, with a third one being added in the next patch. Consolidate them into one function to improve overall readability of the driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* veth: move loopback logic to common locationArnd Bergmann2009-11-263-14/+45
| | | | | | | | | | | | | | | The veth driver contains code to forward an skb from the start_xmit function of one network device into the receive path of another device. Moving that code into a common location lets us reuse the code for direct forwarding of data between macvlan ports, and possibly in other drivers. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Bump versionSimon Kagstrom2009-11-261-1/+1
| | | | | Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Set tx checksum from ethtool instead of module parameterSimon Kagstrom2009-11-262-15/+4
| | | | | | | Defaults to on (as before). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Re-enable transmit scatter-gather supportSimon Kagstrom2009-11-261-30/+53
| | | | | | | | | | | | The velocity hardware can handle up to 7 memory segments. This can be turned on and off via ethtool. The support was removed in commit 83c98a8cd04dd0f848574370594886ba3bf56750 but is re-enabled and cleaned up here. It's off by default. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Change DMA_LENGTH_DEF (from the VIA driver)Simon Kagstrom2009-11-261-1/+1
| | | | | | | | | The VIA driver has changed the default for the DMA_LENGTH_DEF parameter. Together with adaptive interrupt supression and NAPI support, this improves performance quite a bit Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Implement NAPI supportSimon Kagstrom2009-11-262-35/+49
| | | | | | | | | | This patch adds NAPI support for VIA velocity. The new velocity_poll function also pairs tx/rx handling twice which improves perforamance on some workloads (e.g., netperf UDP_STREAM) significantly (that part is from the VIA driver). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Add ethtool interrupt coalescing supportSimon Kagstrom2009-11-262-2/+165
| | | | | | | | | (Partially from the upstream VIA driver). Tweaking the number of frames-per-interrupt and timer-until-interrupt can reduce the amount of CPU work quite a lot. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: Correct 64-byte alignment for rx buffersSimon Kagstrom2009-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | (From the VIA driver). The current code does not guarantee 64-byte alignment since it simply does int add = skb->data & 63; skb->data += add; (via skb_reserve). So for example, if the skb->data address would be 0x10, this would result in 32-byte alignment (0x10 + 0x10). Correct by adding 64 - (skb->data & 63) instead. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8169: move PHY regs tables to .rodataAlexey Dobriyan2009-11-251-32/+32
| | | | | | | | | | | As side effect, consume less stack. -rtl8169_get_mac_version [vmlinux]: 432 -rtl8169_init_one [vmlinux]: 376 +rtl8169_init_one [vmlinux]: 136 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm: Add SHA384 and SHA512 HMAC authentication algorithms to XFRMMartin Willi2009-11-251-0/+34
| | | | | | | | | These algorithms use a truncation of 192/256 bits, as specified in RFC4868. Signed-off-by: Martin Willi <martin@strongswan.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm: Use the user specified truncation length in ESP and AHMartin Willi2009-11-254-4/+4
| | | | | | | | Instead of using the hardcoded truncation for authentication algorithms, use the truncation length specified on xfrm_state. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm: Store aalg in xfrm_state with a user specified truncation lengthMartin Willi2009-11-253-10/+133
| | | | | | | | | | | | | | Adding a xfrm_state requires an authentication algorithm specified either as xfrm_algo or as xfrm_algo_auth with a specific truncation length. For compatibility, both attributes are dumped to userspace, and we also accept both attributes, but prefer the new syntax. If no truncation length is specified, or the authentication algorithm is specified using xfrm_algo, the truncation length from the algorithm description in the kernel is used. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* xfrm: Define new XFRM netlink auth attribute with specified truncation bitsMartin Willi2009-11-251-0/+8
| | | | | | | | | | The new XFRMA_ALG_AUTH_TRUNC attribute taking a xfrm_algo_auth as argument allows the installation of authentication algorithms with a truncation length specified in userspace, i.e. SHA256 with 128 bit instead of 96 bit truncation. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: convert /proc/net/rt_acct to seq_fileAlexey Dobriyan2009-11-251-35/+33
| | | | | | | | | | | | Rewrite statistics accumulation to be in terms of structure fields, not raw u32 additions. Keep them in same order, though. This is the last user of create_proc_read_entry() in net/, please NAK all new ones as well as all new ->write_proc, ->read_proc and create_proc_entry() users. Cc me if there are problems. :-) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use net_eq to compare netsOctavian Purdila2009-11-2546-72/+74
| | | | | | | | | | | | | | | | | | | | | | | Generated with the following semantic patch @@ struct net *n1; struct net *n2; @@ - n1 == n2 + net_eq(n1, n2) @@ struct net *n1; struct net *n2; @@ - n1 != n2 + !net_eq(n1, n2) applied over {include,net,drivers/net}. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-11-24125-1936/+3163
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * ath9k: set ps_default as falseJohn W. Linville2009-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Copied from original one-line patch here: http://bugzilla.kernel.org/show_bug.cgi?id=14267#c26 (This is for 2.6.33 and beyond, where the bool was changed to a flag by "cfg80211: convert bools into flags". -- JWL) Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ssb: Fix range check in sprom writeMichael Buesch2009-11-231-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | The range check in the sprom image parser hex2sprom() is broken. One sprom word is 4 hex characters. This fixes the check and also adds much better sanity checks to the code. We better make sure the image is OK by doing some sanity checks to avoid bricking the device by accident. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ssb: Fix SPROM writingMichael Buesch2009-11-233-70/+78
| | | | | | | | | | | | | | | | | | | | | | The SPROM writing routines were broken since we rewrote the suspend handling on wireless devices, because SPROM writing depended on suspend. This patch changes it and freezes devices with the driver remove(), probe() callbacks instead. This also simplifies the whole logics a lot. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rndis_wlan: disable stall workaroundJussi Kivilinna2009-11-231-3/+3
| | | | | | | | | | | | | | | | | | Stall workaround doesn't work with bcm4320a devices like with bcm4320b. This workaround actually causes more stalls/device freeze on bcm4320a. Therefore disable stall workaround by default. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rndis_wlan: fix buffer overflow in rndis_query_oidJussi Kivilinna2009-11-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | rndis_query_oid overwrites *len which stores buffer size to return full size of received command and then uses *len with memcpy to fill buffer with command. Ofcourse memcpy should be done before replacing buffer size. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Fix missing kernel-doc notationJaswinder Singh Rajput2009-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following htmldocs warnings: Warning(net/mac80211/sta_info.h:322): No description found for parameter 'drv_unblock_wk' Warning(net/mac80211/sta_info.h:322): No description found for parameter 'drv_unblock_wk' Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: John W. Linville <linville@tuxdriver.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: remove reset led_tpt from iwl_leds_init()Wey-Yi Guy2009-11-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Current blinking rate is calculated based on the difference between current tx/rx byte counts and priv->led_tpt. priv->led_tpt should not get reset in iwl_leds_init(), this function can be called by bring interface "up" or "down", or when uCode sysassert occurred. resetting the led_tpt parameter will introduce incorrect led blinking behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: change message for cmd queue full errorWey-Yi Guy2009-11-231-1/+1
| | | | | | | | | | | | | | | | | | Change error message for command queue full Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Acked-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: print limited number of event log when uCode errorWey-Yi Guy2009-11-236-37/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To help iwlagn uCode debugging, event log will dump to syslog when driver detect uCode error occurred, but this only happen when compile with CONFIG_IWLWIFI_DEBUG and debug flag is enabled; which is not always the case. Also, there is another problem, if the flag is set, the entire event log buffer will be dump to syslog, it can flood the syslog and make it very difficult to debug the problem. Change the default to only dump last 20 entries of event log to syslog unless the following condition meets: 1. both compile with CONFIG_IWLWIFI_DEBUG and debug flag is enabled, and then dump the entire event buffer to syslog. 2. dump event log request from debugfs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Acked-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: Tell the ucode immediately when association state changesJay Sternberg2009-11-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | When we get a state change of associated or not, we need to tell the ucode via the RX_ON command using the filter flags. This will prevent the ucode from sending any packets when not associated, specifically not sending NULL QOS packets after a deauthentication which causes the AP to repeatedly send deauth's in some situations. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: dump error log when uCode error occurredWey-Yi Guy2009-11-233-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | uCode error log contain information as to what the error was and where it occurred necessary to debug any uCode issues. Always log the information without special debug flag, this can help to capture the important information when error happened. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Acked-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: by default, dump entire sram data portionWey-Yi Guy2009-11-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | For "sram" debugfs file, if user did not specify the offset and length, dump the entire data portion of sram by default. Data portion is 0x800000 - 0x80ffff, but the actual data size is known to the driver from the ucode file. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: update supported PCI_ID list for 5xx0 seriesWey-Yi Guy2009-11-233-22/+84
| | | | | | | | | | | | | | | | | | | | | | | | Update the PCI_ID list for 5xx0 series. Remove all the PCI_IDs which never made into production or not longer in production. Also make sure the supported bands(a/b/g/n) match specified PCI_IDs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: separate IO tracingJohannes Berg2009-11-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since IO tracing is usually not needed and generates a lot of data, separate it into its own trace system so that we can always enable iwlwifi:* and not have to worry about getting too much data. If IO tracing is then really needed we can enable iwlwifi_io:* in addition and get that data. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>