aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2010-07-29Merge branch 'master' of ↵John W. Linville8-129/+219
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2010-07-29cfg80211: fix dev <-> wiphy typoChristian Lamparter1-1/+1
Cc: Joe Perches <[email protected]> Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-29mac80211: allow drivers to request DTIM periodJohannes Berg1-2/+7
Some features require knowing the DTIM period before associating. This implements the ability to wait for a beacon in mac80211 before assoc to provide this value. It is optional since most likely not all drivers will need this. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-28mac80211: inform drivers about the off-channel status on channel changesFelix Fietkau1-0/+3
For some drivers it can be useful to know whether the channel they're supposed to switch to is going to be used for short off-channel work or scanning, or whether the hardware is expected to stay on it for a while longer. This is important for various kinds of calibration work, which takes longer to complete and should keep some persistent state, even if the channel temporarily changes. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-28Merge branch 'master' of ↵John W. Linville1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
2010-07-27Merge branch 'master' of ↵David S. Miller2-0/+3
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/bnx2x_main.c Merge bnx2x bug fixes in by hand... :-/ Signed-off-by: David S. Miller <[email protected]>
2010-07-27ks8842: Support DMA when accessed via timberdaleRichard Röjfors1-0/+4
This patch adds support for RX and TX DMA via the DMA API, this is only supported when the KS8842 is accessed via timberdale. There is no support for DMA on the generic bus interface it self, a state machine inside the FPGA is handling RX and TX transfers to/from buffers in the FPGA. The host CPU can do DMA to and from these buffers. The FPGA has to handle the RX interrupts, so these must be enabled in the ks8842 but not in the FPGA. The driver must not disable the RX interrupt that would mean that the data transfers into the FPGA buffers would stop. The host shall not enable TX interrupts since TX is handled by the FPGA, the host is notified by DMA callbacks when transfers are finished. Which DMA channels to use are added as parameters in the platform data struct. Signed-off-by: Richard Röjfors <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-27Bluetooth: Defer SCO setup if mode change is pendingMarcel Holtmann1-0/+2
Certain headsets such as the Motorola H350 will reject SCO and eSCO connection requests while the ACL is transitioning from sniff mode to active mode. Add synchronization so that SCO and eSCO connection requests will wait until the ACL has fully transitioned to active mode. < HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2 handle 12 > HCI Event: Command Status (0x0f) plen 4 Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 handle 12 voice setting 0x0040 > HCI Event: Command Status (0x0f) plen 4 Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 12 packets 1 > HCI Event: Mode Change (0x14) plen 6 status 0x00 handle 12 mode 0x00 interval 0 Mode: Active > HCI Event: Synchronous Connect Complete (0x2c) plen 17 status 0x10 handle 14 bdaddr 00:1A:0E:50:28:A4 type SCO Error: Connection Accept Timeout Exceeded Signed-off-by: Ron Shaffer <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-27wireless: Convert wiphy_debug macro to functionJoe Perches1-2/+3
Save a few bytes of text (allyesconfig) $ size drivers/net/wireless/built-in.o* text data bss dec hex filename 3924568 100548 871056 4896172 4ab5ac drivers/net/wireless/built-in.o.new 3926520 100548 871464 4898532 4abee4 drivers/net/wireless/built-in.o.old $ size net/wireless/core.o* text data bss dec hex filename 12843 216 3768 16827 41bb net/wireless/core.o.new 12328 216 3656 16200 3f48 net/wireless/core.o Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27include/net/cfg80211.h: Add wiphy_<level> printk equivalentsJoe Perches1-1/+63
Simplify logging messages for wiphy devices Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-27Merge branch 'master' of ↵John W. Linville314-2138/+6612
git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-26lib80211: remove unused host_build_iv optionJohn W. Linville1-3/+0
Signed-off-by: John W. Linville <[email protected]>
2010-07-24net: pskb_expand_head() optimizationEric Dumazet1-1/+2
Move frags[] at the end of struct skb_shared_info, and make pskb_expand_head() copy only the used part of it instead of whole array. This should avoid kmemcheck warnings and speedup pskb_expand_head() as well, avoiding a lot of cache misses. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-24net sched: fix race in mirred device removalstephen hemminger1-0/+1
This fixes hang when target device of mirred packet classifier action is removed. If a mirror or redirection action is configured to cause packets to go to another device, the classifier holds a ref count, but was assuming the adminstrator cleaned up all redirections before removing. The fix is to add a notifier and cleanup during unregister. The new list is implicitly protected by RTNL mutex because it is held during filter add/delete as well as notifier. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-24sysfs: add attribute to indicate hw address assignment typeStefan Assmann2-0/+20
Add addr_assign_type to struct net_device and expose it via sysfs. This new attribute has the purpose of giving user-space the ability to distinguish between different assignment types of MAC addresses. For example user-space can treat NICs with randomly generated MAC addresses differently than NICs that have permanent (locally assigned) MAC addresses. For the former udev could write a persistent net rule by matching the device path instead of the MAC address. There's also the case of devices that 'steal' MAC addresses from slave devices. In which it is also be beneficial for user-space to be aware of the fact. This patch also introduces a helper function to assist adoption of drivers that generate MAC addresses randomly. Signed-off-by: Stefan Assmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-23Merge branch 'master' of ↵David S. Miller3-7/+9
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-22net: RTA_MARK additionEric Dumazet1-0/+1
Add a new rt attribute, RTA_MARK, and use it in rt_fill_info()/inet_rtm_getroute() to support following commands : ip route get 192.168.20.110 mark NUMBER ip route get 192.168.20.108 from 192.168.20.110 iif eth1 mark NUMBER ip route list cache [192.168.20.110] mark NUMBER Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-22macvtap: Limit packet queue lengthHerbert Xu1-0/+2
Mark Wagner reported OOM symptoms when sending UDP traffic over a macvtap link to a kvm receiver. This appears to be caused by the fact that macvtap packet queues are unlimited in length. This means that if the receiver can't keep up with the rate of flow, then we will hit OOM. Of course it gets worse if the OOM killer then decides to kill the receiver. This patch imposes a cap on the packet queue length, in the same way as the tuntap driver, using the device TX queue length. Please note that macvtap currently has no way of giving congestion notification, that means the software device TX queue cannot be used and packets will always be dropped once the macvtap driver queue fills up. This shouldn't be a great problem for the scenario where macvtap is used to feed a kvm receiver, as the traffic is most likely external in origin so congestion notification can't be applied anyway. Of course, if anybody decides to complain about guest-to-guest UDP packet loss down the track, then we may have to revisit this. Incidentally, this patch also fixes a real memory leak when macvtap_get_queue fails. Chris Wright noticed that for this patch to work, we need a non-zero TX queue length. This patch includes his work to change the default macvtap TX queue length to 500. Reported-by: Mark Wagner <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Acked-by: Chris Wright <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-22CAN: Add Flexcan CAN controller driverMarc Kleine-Budde1-0/+20
This core is found on some Freescale SoCs and also some Coldfire SoCs. Support for Coldfire is missing though at the moment as they have an older revision of the core which does not have RX FIFO support. Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2010-07-21net: remove last uses of __attribute__((packed))Gustavo F. Padovan1-1/+1
Network code uses the __packed macro instead of __attribute__((packed)). Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-21irda: Use __packed annotation instead IRDA_PACKED macroGustavo F. Padovan2-13/+9
Remove IRDA_PACKED macro, which maps to __attribute__((packed)). IRDA is one of the last users of __attribute__((packet)). Networking code uses __packed now. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-21Bluetooth: Use __packed annotationGustavo F. Padovan4-113/+113
To make net/ and include/net/ code consistent use __packed instead of __attribute__ ((packed)). Bluetooth subsystem was one of the last net subsys still using __attribute__ ((packed)). Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Add Google's copyright to L2CAPGustavo F. Padovan1-0/+1
Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Implemented HCI frame reassembly for RX from streamSuraj Sumangala1-0/+1
Implemented frame reassembly implementation for reassembling fragments received from stream. Signed-off-by: Suraj Sumangala <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Implement hci_reassembly helper to reassemble RX packetsSuraj Sumangala1-0/+1
Implements feature to reassemble received HCI frames from any input stream Signed-off-by: Suraj Sumangala <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Add one more buffer for HCI stream reassemblySuraj Sumangala1-2/+2
Additional reassembly buffer to keep track of stream reasembly Signed-off-by: Suraj Sumangala <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Add Copyright notice to L2CAPGustavo F. Padovan1-0/+1
Copyright for the time I worked on L2CAP during the Google Summer of Code program. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Remove the send_lock spinlock from ERTMGustavo F. Padovan1-1/+0
Using a lock to deal with the ERTM race condition - interruption with new data from the hci layer - is wrong. We should use the native skb backlog queue. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Disconnect early if mode is not supportedGustavo F. Padovan1-0/+5
When mode is mandatory we shall not send connect request and report this to the userspace as well. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Reassigned copyright to Code Aurora ForumRon Shaffer1-1/+1
Qualcomm, Inc. has reassigned rights to Code Aurora Forum. Accordingly, as files are modified by Code Aurora Forum members, the copyright statement will be updated. Signed-off-by: Ron Shaffer <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Remove extraneous white spaceRon Shaffer1-7/+7
Deleted extraneous white space from the end of several lines Signed-off-by: Ron Shaffer <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-21Bluetooth: Add blacklist support for incoming connectionsJohan Hedberg2-0/+12
In some circumstances it could be desirable to reject incoming connections on the baseband level. This patch adds this feature through two new ioctl's: HCIBLOCKADDR and HCIUNBLOCKADDR. Both take a simple Bluetooth address as a parameter. BDADDR_ANY can be used with HCIUNBLOCKADDR to remove all devices from the blacklist. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-07-20Merge branch 'master' of ↵David S. Miller1-6/+1
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/vhost/net.c net/bridge/br_device.c Fix merge conflict in drivers/vhost/net.c with guidance from Stephen Rothwell. Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d since net-next-2.6 has fixes that make bridge netpoll work properly thus we don't need it disabled. Signed-off-by: David S. Miller <[email protected]>
2010-07-20wireless: correct sparse warning in wext-compat.cJohn W. Linville1-0/+4
CHECK net/wireless/wext-compat.c net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static? Add declaration in cfg80211.h. Also add an EXPORT_SYMBOL_GPL, since all the peer functions have it. Signed-off-by: John W. Linville <[email protected]>
2010-07-20wireless: only use alpha2 regulatory information from country IEJohn W. Linville1-1/+0
The meaning and/or usage of the country IE is somewhat poorly defined. In practice, this means that regulatory rulesets in a country IE are often incomplete and might be untrustworthy. This removes the code associated with interpreting those rulesets while preserving respect for country "alpha2" codes also contained in the country IE. Signed-off-by: John W. Linville <[email protected]>
2010-07-20mac80211: move QoS-enable to BSS infoJohannes Berg1-6/+5
Ever since commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d Author: Stanislaw Gruszka <[email protected]> Date: Mon Mar 29 12:18:34 2010 +0200 mac80211: explicitly disable/enable QoS mac80211 is telling drivers, in particular iwlwifi, whether QoS is enabled or not. However, this is only relevant for station mode, since only then will any device send nullfunc frames and need to know whether they should be QoS frames or not. In other modes, there are (currently) no frames the device is supposed to send. When you now consider virtual interfaces, it becomes apparent that the current mechanism is inadequate since it enables/disables QoS on a global scale, where for nullfunc frames it has to be on a per-interface scale. Due to the above considerations, we can change the way mac80211 advertises the QoS state to drivers to only ever advertise it as "off" in station mode, and make it a per-BSS setting. Tested-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-07-19ipv6: Make IP6CB(skb)->nhoff 16-bit.David S. Miller1-1/+1
Even with jumbograms I cannot see any way in which we would need to records a larger than 65535 valued next-header offset. The maximum extension header length is (256 << 3) == 2048. There are only a handful of extension headers specified which we'd even accept (say 5 or 6), therefore the largest next-header offset we'd ever have to contend with is something less than say 16k. Therefore make it a u16 instead of a u32. Signed-off-by: David S. Miller <[email protected]>
2010-07-19net: 64bit stats for netdev_queueEric Dumazet1-3/+3
Since struct netdev_queue tx_bytes/tx_packets/tx_dropped are already protected by _xmit_lock, its easy to convert these fields to u64 instead of unsigned long. This completes 64bit stats for devices using them (vlan, macvlan, ...) Strictly, we could avoid the locking in dev_txq_stats_fold() on 64bit arches, but its slow path and we prefer keep it simple. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-18net: support time stamping in phy devices.Richard Cochran3-0/+57
This patch adds a new networking option to allow hardware time stamps from PHY devices. When enabled, likely candidates among incoming and outgoing network packets are offered to the PHY driver for possible time stamping. When accepted by the PHY driver, incoming packets are deferred for later delivery by the driver. The patch also adds phylib driver methods for the SIOCSHWTSTAMP ioctl and callbacks for transmit and receive time stamping. Drivers may optionally implement these functions. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-18net: added a BPF to help drivers detect PTP packets.Richard Cochran1-0/+126
Certain kinds of hardware time stamping units in both MACs and PHYs have the limitation that they can only time stamp PTP packets. Drivers for such hardware are left with the task of correctly matching skbs to time stamps. This patch adds a BPF that drivers can use to classify PTP packets when needed. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-18net: preserve ifreq parameter when calling generic phy_mii_ioctl().Richard Cochran1-1/+1
The phy_mii_ioctl() function unnecessarily throws away the original ifreq. We need access to the ifreq in order to support PHYs that can perform hardware time stamping. Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl(). This is unnecessary since phylib will check the command in any case. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-18net: add driver hook for tx time stamping.Richard Cochran1-0/+21
This patch adds a hook for transmit time stamps. The transmit hook allows a software fallback for transmit time stamps, for MACs lacking time stamping hardware. Using the hook will still require adding an inline function call to each MAC driver. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-15tcp: sizeof struct tcp_skb_cb is 44Eric Dumazet1-5/+4
Correct comment stating sizeof(struct tcp_skb_cb) is 36 or 40, since its 44 bytes, since commit 951dbc8ac714b04 ([IPV6]: Move nextheader offset to the IP6CB). Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-14net: fix problem in reading sock TX queueTom Herbert1-6/+1
Fix problem in reading the tx_queue recorded in a socket. In dev_pick_tx, the TX queue is read by doing a check with sk_tx_queue_recorded on the socket, followed by a sk_tx_queue_get. The problem is that there is not mutual exclusion across these calls in the socket so it it is possible that the queue in the sock can be invalidated after sk_tx_queue_recorded is called so that sk_tx_queue get returns -1, which sets 65535 in queue_index and thus dev_pick_tx returns 65536 which is a bogus queue and can cause crash in dev_queue_xmit. We fix this by only calling sk_tx_queue_get which does the proper checks. The interface is that sk_tx_queue_get returns the TX queue if the sock argument is non-NULL and TX queue is recorded, else it returns -1. sk_tx_queue_recorded is no longer used so it can be completely removed. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-12inet, inet6: make tcp_sendmsg() and tcp_sendpage() through inet_sendmsg() ↵Changli Gao3-4/+9
and inet_sendpage() a new boolean flag no_autobind is added to structure proto to avoid the autobind calls when the protocol is TCP. Then sock_rps_record_flow() is called int the TCP's sendmsg() and sendpage() pathes. Signed-off-by: Changli Gao <[email protected]> ---- include/net/inet_common.h | 4 ++++ include/net/sock.h | 1 + include/net/tcp.h | 8 ++++---- net/ipv4/af_inet.c | 15 +++++++++------ net/ipv4/tcp.c | 11 +++++------ net/ipv4/tcp_ipv4.c | 3 +++ net/ipv6/af_inet6.c | 8 ++++---- net/ipv6/tcp_ipv6.c | 3 +++ 8 files changed, 33 insertions(+), 20 deletions(-) Signed-off-by: David S. Miller <[email protected]>
2010-07-12net: cleanupsChangli Gao3-192/+123
remove useless blanks. Signed-off-by: Changli Gao <[email protected]> ---- include/net/inet_common.h | 55 ++++------- include/net/tcp.h | 222 +++++++++++++++++----------------------------- include/net/udp.h | 38 +++---- 3 files changed, 123 insertions(+), 192 deletions(-) Signed-off-by: David S. Miller <[email protected]>
2010-07-09net: Document that dev_get_stats() returns the given pointerBen Hutchings1-2/+2
Document that dev_get_stats() returns the same stats pointer it was given. Remove const qualification from the returned pointer since the caller may do what it likes with that structure. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-09net: Get rid of rtnl_link_stats64 / net_device_stats unionBen Hutchings1-42/+28
In commit be1f3c2c027cc5ad735df6a45a542ed1db7ec48b "net: Enable 64-bit net device statistics on 32-bit architectures" I redefined struct net_device_stats so that it could be used in a union with struct rtnl_link_stats64, avoiding the need for explicit copying or conversion between the two. However, this is unsafe because there is no locking required and no lock consistently held around calls to dev_get_stats() and use of the statistics structure it returns. In commit 28172739f0a276eb8d6ca917b3974c2edb036da3 "net: fix 64 bit counters on 32 bit arches" Eric Dumazet dealt with that problem by requiring callers of dev_get_stats() to provide storage for the result. This means that the net_device::stats64 field and the padding in struct net_device_stats are now redundant, so remove them. Update the comment on net_device_ops::ndo_get_stats64 to reflect its new usage. Change dev_txq_stats_fold() to use struct rtnl_link_stats64, since that is what all its callers are really using and it is no longer going to be compatible with struct net_device_stats. Eric Dumazet suggested the separate function for the structure conversion. Signed-off-by: Ben Hutchings <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-09atm: propagate signal changes via notifierKarl Hiramoto1-0/+17
Add notifier chain for changes in atm_dev. Clients like br2684 will call register_atmdevice_notifier() to be notified of changes. Drivers will call atm_dev_signal_change() to notify clients like br2684 of the change. On DSL and ATM devices it's usefull to have a know if you have a carrier signal. netdevice LOWER_UP changes can be propagated to userspace via netlink monitor. Signed-off-by: Karl Hiramoto <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-07-07Merge branch 'master' of ↵David S. Miller6-8/+29
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6