aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-10Bluetooth: Check the SDU size against the MTU valueGustavo F. Padovan1-0/+5
If the SDU size is greater than the MTU something is wrong, so report an error. Signed-off-by: Gustavo F. Padovan <[email protected]> [[email protected]: set err to appropriate errno value] Signed-off-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Add le16 macro to Retransmission and Monitor Timeouts valuesGustavo F. Padovan1-6/+8
Fix a possible problem with Big Endian machines. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix configuration of the MPS valueGustavo F. Padovan2-17/+22
We were accepting values bigger than we can accept. This was leading ERTM to drop packets because of wrong FCS checks. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Read RFC conf option on a successful Conf RSPGustavo F. Padovan1-1/+38
On Enhanced Retransmission Mode and Streaming Mode a entity can send, on a successful Conf RSP, new values for the RFC fields. For example, the entity can send txWindow and MPS values less than the value received on a Conf REQ. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Ignore Tx Window value with Streaming modeGustavo F. Padovan1-1/+0
Tx Window value shall not be used with Streaming Mode and the receiver of the config Request shall ignore its value. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Add timer to Acknowledge I-framesGustavo F. Padovan2-0/+19
We ack I-frames on each txWindow/5 I-frames received, but if the sender stop to send I-frames and it's not a txWindow multiple we can leave some frames unacked. So I added a timer to ack I-frames on this case. The timer expires in 200ms. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Finish implementation for Rec RR (P=1) on ERTMGustavo F. Padovan1-2/+11
Now the code handles the case under SREJ_SENT state. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Remove duplicate use of __get_reqseq() macro on L2CAPGustavo F. Padovan1-1/+1
tx_seq var already has the value of __get_reqseq(). Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Group the ack of I-frames into l2cap_data_channel_rrframe()Gustavo F. Padovan1-6/+3
It also fix a bug: we weren't acknowledging I-frames when P=1. Note that when F=1 we are acknowledging packets before setting RemoteBusy to False. The spec says we should do that in the opposite order, but acknowledment of packets doesn't care about RemoteBusy flag so we can do that in the order we want. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Handle all cases of receipt of RNR-frames into L2CAPGustavo F. Padovan1-4/+28
We weren't handling the receipt under SREJ_SENT state table. It also introduce l2cap_send_srejtail(). It will be used in the nexts commits too. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Split l2cap_data_channel_sframe()Gustavo F. Padovan1-89/+115
Create a function for each type fo S-frame and avoid a lot of nested code. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Add Recv RR (P=0)(F=0) for SREJ_SENT state on ERTMGustavo F. Padovan1-1/+4
This finishes the implementation of Recv RR (P=0)(F=0) for the Enhanced Retransmission Mode on L2CAP. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Move set of P-bit to l2cap_send_sframe()Gustavo F. Padovan1-4/+5
Abstract the send of of P-bit and avoids code duplication like we did with the setting of F-bit. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Implement SendAck() Action on ERTM.Gustavo F. Padovan1-12/+29
Shall be used to ack received frames, It must decide type of acknowledgment between a RR frame, a RNR frame or transmission of pending I-frames. It also modifies l2cap_ertm_send() to report the number of frames sent. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Check if SDU size is greater than MTU on L2CAPGustavo F. Padovan1-1/+5
After reassembly the SDU we need to check his size. It can't overflow the MTU size. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Check the minimum {I,S}-frame size into L2CAPGustavo F. Padovan1-3/+11
All packets with size fewer than the minimum specified is dropped. Note that the size of the l2cap basic header, FCS and SAR fields are already subtracted of len at the moment of the size check. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Support case with F bit set under WAIT_F state.Gustavo F. Padovan1-8/+14
On receipt of a F=1 under WAIT_F state ERTM shall stop monitor timer and start retransmission timer (if there are unacked frames). Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Implement 'Send IorRRorRNR' eventGustavo F. Padovan2-13/+50
After receive a RR with P bit set ERTM shall use this funcion to choose what type of frame to reply with F bit = 1. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Use a l2cap_pinfo struct instead l2cap_pi() macroGustavo F. Padovan1-6/+6
Trivial clean up. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix ACL MTU issueGustavo F. Padovan1-0/+4
ERTM and Streaming Modes was having problems when the ACL MTU is lower than MPS. The 'minus 10' is to take in account the header and fcs lenghts. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix expected_tx_seq calculation on L2CAPGustavo F. Padovan1-1/+1
All operation related to the txWindow should be modulo 64. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix memory leak of S-frames into L2CAPGustavo F. Padovan1-0/+1
l2cap_data_channel do not free the S-frame, so we free it here. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Move specific Basic Mode code to the right placeGustavo F. Padovan1-5/+6
Inside "case L2CAP_MODE_BASIC:" we don't need to check for sk_type and L2CAP mode. So only the length check is fine. Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Trivial clean ups to SCOGustavo F. Padovan1-12/+11
Remove extra braces and labels, break over column 80 lines, etc Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Make hci_send_sco() voidGustavo F. Padovan3-11/+3
It also removes an unneeded check for the MTU. The check is done before on sco_send_frame() Signed-off-by: Gustavo F. Padovan <[email protected]> Reviewed-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix wrong packet type count incrementGustavo F. Padovan1-1/+1
Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Use the proper function cast to get hdr dataGustavo F. Padovan1-3/+3
Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-10Bluetooth: Fix return value when bt_skb_alloc failsGustavo F. Padovan2-2/+2
Set the proper error(ENOMEM), instead of just return 0. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2010-05-08ipv4: remove ip_rt_secret timer (v4)Neil Horman3-102/+8
A while back there was a discussion regarding the rt_secret_interval timer. Given that we've had the ability to do emergency route cache rebuilds for awhile now, based on a statistical analysis of the various hash chain lengths in the cache, the use of the flush timer is somewhat redundant. This patch removes the rt_secret_interval sysctl, allowing us to rely solely on the statistical analysis mechanism to determine the need for route cache flushes. Signed-off-by: Neil Horman <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-07Revert "microblaze: Kill NET_SKB_PAD and NET_IP_ALIGN overrides."David S. Miller1-0/+10
This reverts commit 39e0786d3cf39c6d2f47b4818ae2da8b8ebc9ce2. On request from microblaze developers, they are going to handle this differently. Signed-off-by: David S. Miller <[email protected]>
2010-05-06bnx2: Add prefetches to rx path.Michael Chan2-3/+14
Add prefetches of the skb and the next rx descriptor to speed up rx path. Use prefetchw() for the skb [suggested by Eric Dumazet]. The rx descriptor is in skb->data which is mapped for streaming mode DMA. Eric Dumazet pointed out that we should not prefetch the data before dma_sync. So we prefetch only if dma_sync is no_op on the system. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06bnx2: Add GRO support.Michael Chan1-3/+3
And turn on NETIF_F_GRO by default [requested by DaveM]. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06tehuti: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06sunhme: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06smc9194: Remove unnecessary memset of netdev private dataTobias Klauser1-3/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06ethoc: Remove unnecessary memset of napi member in netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set the napi member it to 0 explicitely. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06bcm63xx_enet: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06KS8695: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-063c523: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-063c507: Remove unnecessary memset of netdev private dataTobias Klauser1-1/+0
The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06rps: Various optimizationsEric Dumazet1-6/+22
Introduce ____napi_schedule() helper for callers in irq disabled contexts. rps_trigger_softirq() becomes a leaf function. Use container_of() in process_backlog() instead of accessing per_cpu address. Use a custom inlined version of __napi_complete() in process_backlog() to avoid one locked instruction : only current cpu owns and manipulates this napi, and NAPI_STATE_SCHED is the only possible flag set on backlog. we can use a plain write instead of clear_bit(), and we dont need an smp_mb() memory barrier, since RPS is on, backlog is protected by a spinlock. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06microblaze: Kill NET_SKB_PAD and NET_IP_ALIGN overrides.David S. Miller1-10/+0
NET_IP_ALIGN defaults to 2, no need to override. NET_SKB_PAD is now 64, which is much larger than microblaze's L1_CACHE_SIZE so no need to override that either. Signed-off-by: David S. Miller <[email protected]>
2010-05-06net: Increase NET_SKB_PAD to 64 bytesEric Dumazet1-1/+4
eth_type_trans() & get_rps_cpus() currently need two 64bytes cache lines in packet to compute rxhash. Increasing NET_SKB_PAD from 32 to 64 reduces the need to one cache line only, and makes RPS faster. NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06ipv6: udp: make short packet logging consistent with ipv4Bjørn Mork1-3/+8
Adding addresses and ports to the short packet log message, like ipv4/udp.c does it, makes these messages a lot more useful: [ 822.182450] UDPv6: short packet: From [2001:db8:ffb4:3::1]:47839 23715/178 to [2001:db8:ffb4:3:5054:ff:feff:200]:1234 This requires us to drop logging in case pskb_may_pull() fails, which also is consistent with ipv4/udp.c Signed-off-by: Bjørn Mork <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06net: emaclite: Use resource_sizeTobias Klauser1-2/+2
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06e1000e: Reset 82577/82578 PHY before first PHY register readBruce Allan1-0/+10
Reset the PHY before first accessing it. Doing so, ensure that the PHY is in a known good state before we read/write PHY registers. This fixes a driver probe failure. Signed-off-by: Bruce Allan <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06e1000e: reset MAC-PHY interconnect on 82577/82578 during Sx->S0Bruce Allan2-0/+22
During Sx->S0 transitions, the interconnect between the MAC and PHY on 82577/82578 can remain in SMBus mode instead of transitioning to the PCIe-like mode required during normal operation. Toggling the LANPHYPC Value bit essentially resets the interconnect forcing it to the correct mode. Signed-off-by: Bruce Allan <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06netpoll: Use 'bool' for netpoll_rx() return type.David S. Miller1-4/+4
Signed-off-by: David S. Miller <[email protected]>
2010-05-06bonding: make bonding support netpollWANG Cong1-1/+98
Based on Andy's work, but I modified a lot. Similar to the patch for bridge, this patch does: 1) implement the 2 methods to support netpoll for bonding; 2) modify netpoll during forwarding packets via bonding; 3) disable netpoll support of bonding when a netpoll-unabled device is added to bonding; 4) enable netpoll support when all underlying devices support netpoll. Cc: Andy Gospodarek <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Matt Mackall <[email protected]> Cc: Neil Horman <[email protected]> Cc: Jay Vosburgh <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-05-06bridge: make bridge support netpollWANG Cong4-1/+108
Based on the previous patch, make bridge support netpoll by: 1) implement the 2 methods to support netpoll for bridge; 2) modify netpoll during forwarding packets via bridge; 3) disable netpoll support of bridge when a netpoll-unabled device is added to bridge; 4) enable netpoll support when all underlying devices support netpoll. Cc: David Miller <[email protected]> Cc: Neil Horman <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: David S. Miller <[email protected]>