aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-10-03tcp: shrink tcp6_timewait_sock by one cache lineEric Dumazet4-7/+12
While working on tcp listener refactoring, I found that it would really make things easier if sock_common could include the IPv6 addresses needed in the lookups, instead of doing very complex games to get their values (depending on sock being SYN_RECV, ESTABLISHED, TIME_WAIT) For this to happen, I need to be sure that tcp6_timewait_sock and tcp_timewait_sock consume same number of cache lines. This is possible if we only use 32bits for tw_ttd, as we remove one 32bit hole in inet_timewait_sock inet_tw_time_stamp() is defined and used, even if its current implementation looks like tcp_time_stamp : We might need finer resolution for tcp_time_stamp in the future. Before patch : sizeof(struct tcp6_timewait_sock) = 0xc8 After patch : sizeof(struct tcp6_timewait_sock) = 0xc0 Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03atl1e: enable support for NETIF_F_RXALL and NETIF_F_RXCRC featuresAndrea Merello1-4/+42
This patch allows (optionally, via ethtool) the atl1e NIC to: - Receive bad frames (runt, bad-fcs, etc..) - Receive full frames without stripping the FCS. This has been tested on my board by injecting runt and bad-fcs frames with a FPGA-based device. The particular scenario of receiving very short frames (<4 bytes) without passing FCS to the upper layer has been also tested: This could be potentially dangerous because the driver performs a 4 byte subtraction on the frame length, but I finally have NOT added anything to avoid this because it seems the NIC always discards frames so much short.. If someone still have some reason to worry about this, please tell me.. I will add an explicit SW check.. Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03wireless: rt2x00: rt2800usb: add new devicesXose Vazquez Perez1-1/+16
0411,0241 RT5572 BUFFALO WI-U2-300D Wireless LAN Adapter 0789,0170 RT3572 Logitec LAN-W300AN/U2 0846,9013 RT3573 NETGEAR Adaptador USB Inalambrico Movistar 0df6,006e RT3573 Sitecom WiFi USB adapter N900 2001,3c1f RT3573 D-Link DWA-162 Wireless N900 Dual Band Adapter 2001,3c20 RT5372 D-Link DWA-140 Wireless N USB Adapter(rev.D) 2001,3c21 RT5572 D-Link DWA-160 Xtreme N Dual Band USB Adapter(rev.C) 2001,3c22 RT5372 D-Link DWA-132 Wireless N USB Adapter(rev.B) 2001,3c23 RT5372 D-Link GO-USB-N300 Wireless N Easy USB Adapter 2019,ab29 ? Planex GW-USMirco300 20f4,724a RT5572 TRENDnet N600 Wireless Dual Band USB Adapter Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: users@rt2x00.serialmonkey.com Cc: linux-wireless@vger.kernel.org Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8188ee: Convert driver to use new rtl_phy_scan_operation_backup() routineLarry Finger3-31/+2
Now that rtl_phy_scan_operation_backup() exists, convert rtl8188ee to use it. Routine rtl88e_phy_scan_operation_backup() is no longer used and is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8723ae: Convert driver to use new rtl_phy_scan_operation_backup() routineLarry Finger3-32/+2
Now that rtl_phy_scan_operation_backup() exists, convert rtl8723ae to use it. Routine rtl8723ae_phy_scan_operation_backup() is no longer used and is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routineLarry Finger3-31/+2
Now that rtl_phy_scan_operation_backup() exists, convert rtl8192de to use it. Routine rtl92d_phy_scan_operation_backup() is no longer used and is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192c: Remove rtl8192c_phy_scan_operation_backup()Larry Finger2-32/+0
Drivers rtl8192ce and rtl8192cu no longer rely on this routine. It is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192ce: Convert driver to use new rtl_phy_scan_operation_backup() routineLarry Finger2-3/+2
Now that rtl_phy_scan_operation_backup() exists, convert rtl8192ce to use it. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192cu: Convert to use new rtl_phy_scan_operation_backup() routineLarry Finger1-1/+2
Now that the routine exists in driver rtlwifi, convert rtl8192cu to use it. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: Implement a common rtl_phy_scan_operation_backup() routineLarry Finger2-0/+30
Several of the drivers supported by rtlwifi individually implement the same routine that supports scans. As a first step, create this routine in driver rtlwifi. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: Remove all remaining references to variable 'noise' in rtl_stats structLarry Finger4-4/+0
This completes removal of all places that reference variable 'noise' in the rtl_stats struct. The definition of the struct is unchanged. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8188ee: Fix smatch warning in rtl8188ee/hw.cLarry Finger1-0/+1
Smatch lists the following: CHECK drivers/net/wireless/rtlwifi/rtl8188ee/hw.c drivers/net/wireless/rtlwifi/rtl8188ee/hw.c:149 _rtl88ee_set_fw_clock_on() info: ignoring unreachable code. drivers/net/wireless/rtlwifi/rtl8188ee/hw.c:149 _rtl88ee_set_fw_clock_on() info: ignoring unreachable code. This info message is the result of a real error due to a missing break statement in a "while (1)" loop. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.10+] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: Fix smatch warnings in usb.cLarry Finger1-2/+4
Smatch displays the following: CHECK drivers/net/wireless/rtlwifi/usb.c drivers/net/wireless/rtlwifi/usb.c:458 _rtl_usb_rx_process_agg() warn: assigning (-98) to unsigned variable 'stats.noise' drivers/net/wireless/rtlwifi/usb.c:503 _rtl_usb_rx_process_noagg() warn: assigning (-98) to unsigned variable 'stats.noise' drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code. drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code. The variable 'stats.noise' is not used, thus the initializers are removed. The unreachable code info is fixed by including the appropriate section inside #ifdef .. #endif constructions. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: Fix smatch warning in pci.cLarry Finger1-1/+0
Smatch reports the following: CHECK drivers/net/wireless/rtlwifi/pci.c drivers/net/wireless/rtlwifi/pci.c:739 _rtl_pci_rx_interrupt() warn: assigning (-98) to unsigned variable 'stats.noise' The variable 'stats.noise' is not used. That initializer is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192_common: Fix smatch errors and warnings in rtl8192c/dm_common.cLarry Finger1-24/+1
Smatch lists the following: CHECK drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:551 rtl92c_dm_pwdb_monitor() info: ignoring unreachable code. drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:551 rtl92c_dm_pwdb_monitor() info: ignoring unreachable code. drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:870 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:870 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:882 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:883 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:891 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:892 rtl92c_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'txpwr_level' 2 <= 2 The unreachable code message is fixed by deleting the code that follows a return. The errors are fixed by increasing the size of txpwr_level. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192cu: Fix smatch warning in rtl8192cu/trx.cLarry Finger1-2/+0
Smatch lists the following: CHECK drivers/net/wireless/rtlwifi/rtl8192cu/trx.c drivers/net/wireless/rtlwifi/rtl8192cu/trx.c:367 _rtl_rx_process() warn: assigning (-98) to unsigned variable 'stats.noise' This variable is unused, thus the initializer is removed, as well as a comment referring to that variable. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192de: Fix smatch warnings in rtl8192de/hw.cLarry Finger1-18/+0
Smatch lists the following: CHECK drivers/net/wireless/rtlwifi/rtl8192de/hw.c drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code. drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code. The dead code is deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rtlwifi: rtl8192du: Fix smatch errors in /rtl8192de/dm.cLarry Finger2-3/+6
Smatch lists the following: CHECK drivers/net/wireless/rtlwifi/rtl8192de/dm.c drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1054 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'ofdm_index' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1056 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'ofdm_index' 2 <= 2 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1126 rtl92d_dm_txpower_tracking_callback_thermalmeter() debug: remove_pools: nr_children over 4000 (4596). (rtlpriv->dbg.global_debuglevel merged) drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1126 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1129 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1132 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1135 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1138 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1141 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1144 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1147 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch1ch13' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1151 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1154 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1157 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1160 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1163 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1166 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1169 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 drivers/net/wireless/rtlwifi/rtl8192de/dm.c:1172 rtl92d_dm_txpower_tracking_callback_thermalmeter() error: buffer overflow 'cckswing_table_ch14' 33 <= 255 This patch fixes several off-by-one errors. It also removes a comment referencing variable 'noise' in the rts_stats struct. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03rt2800: add support for radio chip RF3070Stanislaw Gruszka2-1/+9
Add support for new RF chip ID: 3070. It seems to be the same as 5370, maybe vendor just put wrong value on the eeprom, but add this id anyway since devices with it showed on the marked. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: rework rx path bus interfaceArend van Spriel4-35/+22
The brcmfmac has common and bus specific part. The rx function api was using sk_buff_head. Changed to sk_buff instead. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: Use fw filename and nvram based of devid for sdio.Hante Meuleman1-74/+133
SDIO firmware download routines uses one name for firmware file and nvram file for all sdio devices. This is not user friendly. Use fw filename and nvram filename based upon chip id and revision. Reported-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: fix sparse error 'bad constant expression'Arend van Spriel1-1/+1
The definition of BRCMF_EVENTING_MASK_LEN results in a sparse error message .../fweh.c:331:22: error: bad constant expression .../fweh.c:388:22: error: bad constant expression .../dhd_common.c:256:22: error: bad constant expression This is caused by the use of roundup() in BRCMF_EVENTING_MASK_LEN and it is used to allocate an array variable on the stack. Better use DIV_ROUND_UP() macro. Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: reserve memory for bus layer in sk_buff::cbFranky Lin2-5/+12
Bus layer need to share sk_buff::cb with firmware signal feature. Reserve necessary memory so they won't overwrite each other. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: add valid core index check in related functionsFranky Lin1-0/+10
Perform a valid check for core index to avoid illegal address access. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: add BCM4339 SDIO interface supportFranky Lin4-8/+30
BCM4339 is an a/b/g/n/ac 1x1 WiFi chip. This patch adds support for it through SDIO interface. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03brcmfmac: sync firmware event listFranky Lin2-3/+4
Update event list to keep sync with firmware development. Use calculated event mask length instead of hard-coded value. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-03net: heap overflow in __audit_sockaddr()Dan Carpenter2-4/+22
We need to cap ->msg_namelen or it leads to a buffer overflow when we to the memcpy() in __audit_sockaddr(). It requires CAP_AUDIT_CONTROL to exploit this bug. The call tree is: ___sys_recvmsg() move_addr_to_user() audit_sockaddr() __audit_sockaddr() Reported-by: Jüri Aedla <juri.aedla@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-033com: Fix drivers/net/ethernet/3com/Kconfig references to PCMCIA and 3c515Matthew Whitehead1-2/+2
The Vortex driver works with PCI and Cardbus devices, not PCMCIA. There never was an EISA 3c515 card, only ISA, so remove that option. Signed-off-by: Matthew Whitehead <tedheadster@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03net: ipv4: Change variable type to boolPeter Senna Tschudin1-1/+1
The variable fully_acked is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03net: myri10ge: Change variable type to boolPeter Senna Tschudin1-2/+2
There is the rc variable on both myri10ge_ss_lock_napi and myri10ge_ss_lock_poll functions. In both cases rc is only assigned the values true and false. Both functions already return bool. Change rc type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03net: bnx2x: Change variable type to boolPeter Senna Tschudin1-1/+1
The variable rc is only assigned the values true and false. The function bnx2x_prev_is_path_marked already returns bool. Change rc type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03net: atl1c: Change variable type to boolPeter Senna Tschudin1-1/+1
The variable ret is only assigned the values true and false. The function atl1c_read_eeprom already returns bool. Change ret type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03bonding: document the new xmit policy modes and update the changed onesNikolay Aleksandrov1-30/+36
Add new documentation for encap2+3 and encap3+4, also update the formula for the old modes due to the changes. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03bonding: modify the old and add new xmit hash policiesNikolay Aleksandrov5-134/+72
This patch adds two new hash policy modes which use skb_flow_dissect: 3 - Encapsulated layer 2+3 4 - Encapsulated layer 3+4 There should be a good improvement for tunnel users in those modes. It also changes the old hash functions to: hash ^= (__force u32)flow.dst ^ (__force u32)flow.src; hash ^= (hash >> 16); hash ^= (hash >> 8); Where hash will be initialized either to L2 hash, that is SRCMAC[5] XOR DSTMAC[5], or to flow->ports which should be extracted from the upper layer. Flow's dst and src are also extracted based on the xmit policy either directly from the buffer or by using skb_flow_dissect, but in both cases if the protocol is IPv6 then dst and src are obtained by ipv6_addr_hash() on the real addresses. In case of a non-dissectable packet, the algorithms fall back to L2 hashing. The bond_set_mode_ops() function is now obsolete and thus deleted because it was used only to set the proper hash policy. Also we trim a pointer from struct bonding because we no longer need to keep the hash function, now there's only a single hash function - bond_xmit_hash that works based on bond->params.xmit_policy. The hash function and skb_flow_dissect were suggested by Eric Dumazet. The layer names were suggested by Andy Gospodarek, because I suck at semantics. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03flow_dissector: factor out the ports extraction in skb_flow_get_portsNikolay Aleksandrov2-11/+29
Factor out the code that extracts the ports from skb_flow_dissect and add a new function skb_flow_get_ports which can be re-used. Suggested-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03inet: consolidate INET_TW_MATCHEric Dumazet7-40/+21
TCP listener refactoring, part 2 : We can use a generic lookup, sockets being in whatever state, if we are sure all relevant fields are at the same place in all socket types (ESTABLISH, TIME_WAIT, SYN_RECV) This patch removes these macros : inet_addrpair, inet_addrpair, tw_addrpair, tw_portpair And adds : sk_portpair, sk_addrpair, sk_daddr, sk_rcv_saddr Then, INET_TW_MATCH() is really the same than INET_MATCH() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-03Bluetooth: Only one command per L2CAP LE signalling is supportedMarcel Holtmann1-25/+19
The Bluetooth specification makes it clear that only one command should be present in the L2CAP LE signalling packet. So tighten the checks here and restrict it to exactly one command. This is different from L2CAP BR/EDR signalling where multiple commands can be part of the same packet. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Check minimum length of SMP packetsMarcel Holtmann1-2/+7
When SMP packets are received, make sure they contain at least 1 byte header for the opcode. If not, drop the packet and disconnect the link. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Drop packets on ATT fixed channel on BR/EDRMarcel Holtmann1-0/+4
The ATT fixed channel is only valid when using LE connections. On BR/EDR it is required to go through L2CAP connection oriented channel for ATT. Drop ATT packets when they are received on a BR/EDR connection. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: L2CAP connectionless channels are only valid for BR/EDRMarcel Holtmann1-0/+4
When receiving connectionless packets on a LE connection, just drop the packet. There is no concept of connectionless channels for LE. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: SMP packets are only valid on LE connectionsMarcel Holtmann1-0/+6
When receiving SMP packets on a BR/EDR connection, then just drop the packet and do not try to process it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Don't copy L2CAP LE signalling to raw socketsMarcel Holtmann1-2/+0
The L2CAP raw sockets are only used for BR/EDR signalling. Packets on LE links should not be forwarded there. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Fix switch statement order for L2CAP fixed channelsMarcel Holtmann1-3/+4
The switch statement for the various L2CAP fixed channel handlers is not really ordered. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Allow changing device class when BR/EDR is disabledMarcel Holtmann1-1/+1
Changing the device class when BR/EDR is disabled has no visible effect for remote devices. However to simplify the logic allow it as long as the controller supports BR/EDR operations. If it is not allowed, then the overall logic becomes rather complicated since the class of device values would need clearing or restoring when BR/EDR setting changes. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Restrict loading of long term keys to LE capable controllersMarcel Holtmann1-0/+6
Loading long term keys into a BR/EDR only controller make no sense. The kernel would never use any of these keys. So instead of allowing userspace to waste memory, reject such operation with a not supported error message. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Restrict loading of link keys to BR/EDR capable controllersMarcel Holtmann1-0/+6
Loading link keys into a LE only controller make no sense. The kernel would never use any of these keys. So instead of allowing userspace to waste memory, reject such operation with a not supported error message. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Allow setting static address even if LE is disabledMarcel Holtmann1-4/+2
Setting the static address does not depend on LE beeing enabled. It only depends on a controller with LE support. When depending on LE enabled this command becomes really complicated since in case LE gets disabled, it would be required to clear the static address and also its random address representation inside the controller. With future support for private addresses such complex setup should be avoided. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-03Bluetooth: Restrict SSP setting changes to BR/EDR enabled controllersMarcel Holtmann1-1/+5
Only when BR/EDR is supported and enabled, allow changing of the SSP setting. Just checking if the hardware supports SSP is not enough since it might be the case that BR/EDR is disabled. In the case that BR/EDR is disabled, but SSP supported by the controller the not supported error message is now returned. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2013-10-02ath10k: wmi: Convert use of 6 to ETH_ALENJoe Perches1-1/+1
Use the appropriate define instead of 6. Signed-off-by: Joe Perches <joe@perches.com> Noticed-by: Julia Lawall <julia.lawall@lip6.fr> via spatch script Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-02net: mv643xx_eth: fix missing device_node for port devicesSebastian Hesselbarth1-0/+1
DT-based mv643xx_eth probes and creates platform_devices for the port devices on its own. To allow fixups for ports based on the device_node, we need to set .of_node of the corresponding device with the correct node. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: David S. Miller <davem@davemloft.net>