Commit Graph

459 Commits (2024.2)

Author SHA1 Message Date
pedro eb60d8f2a8 Revert "kernel: usb: cdc-wdm: close race between read and workqueue"
This reverts commit 2b1f8b2454.
1 year ago
pedro 2b1f8b2454 kernel: usb: cdc-wdm: close race between read and workqueue
- ref: 339f83612f
1 year ago
M_ars b093492594 build: add Netgear EX7000 support [WIP]
Note: Switch not yet working

thx to user GirlPower from www.linksysinfo.org
see https://www.linksysinfo.org/index.php?threads/add-support-for-netgear-ex7000.78502/#post-349011
1 year ago
M_ars 69f8a1b0b0 SDK6: update PCI-Express driver 1 year ago
M_ars 18fe58a885 kernel: mtd: nand: Add Winbond manufacturer
Solve/Adjust "Unknown NAND" for Netgear R7000 (v1.0.27 CFE and nvram "winbond_flash" variable) and Tenda AC18
Jan  1 01:00:04 FT-Router kern.info kernel: Northstar brcmnand NAND Flash Controller driver, Version 0.1 (c) Broadcom Inc. 2012
Jan  1 01:00:04 FT-Router kern.info kernel: NAND device: Manufacturer ID: 0xef, Chip ID: 0xf1 (Unknown NAND 128MiB 3,3V 8-bit)

see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4077ce5871304f8a78f80b74b18b6052a410f1a
1 year ago
M_ars 29ede4d50f kernel: mtd: nand: add Macronix manufacturer
Solve/Adjust "Unknown NAND"
Jan  1 01:00:04 FT-Router kern.info kernel: Northstar brcmnand NAND Flash Controller driver, Version 0.1 (c) Broadcom Inc. 2012
Jan  1 01:00:04 FT-Router kern.info kernel: NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Unknown NAND 128MiB 3,3V 8-bit)

see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c1257b4798d48b73ad1a9ca359504cd49caefa0d
1 year ago
pedro b170ce6aa1 kernel: wireguard: update module to 1.0.20220627
- some changes of course needed, because we can't port all functions/structures to FreshTomato
2 years ago
pedro 02b92f2f94 build: kernel: fix kernel warnings at generated shared_ksyms.c 2 years ago
ducky 6e21bcde62 Adding initial Netgear R6200v2 router, special thanks to M_ars. 2 years ago
pedro f08898de52 kernel: drivers: net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
- fix from the upstream: 7e01c7f704
2 years ago
pedro cf5c93c755 kernel: usbnet: optimize usbnet_bh() to reduce CPU load
Ref: fb59bf28cd
2 years ago
pedro c45bd12e0b kernel: net: usb: rndis_host: Secure rndis_query check against int overflow
Ref: c7dd13805f
3 years ago
pedro 7a71791349 kernel: net: usb: cdc_ether: add support for Thales Cinterion PLS62-W modem
Ref: eea8ce81fb
3 years ago
desertkun 8e732e2658 usb: update ch341 driver for 6.x 3 years ago
pedro 2488888654 build: kernel (all): enable compilation of ch341 usb driver 3 years ago
pedro e56699c9bf kernel sdk6: updates/fixes from the upstream (part 2)
USB: cdc-acm: use define for timeout: df574080fa
USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020): a10bc71729
USB: serial: console: move mutex_unlock() before usb_serial_put(): 61dfa797c7
3 years ago
pedro 98adff4282 kernel sdk6: updates/fixes from the upstream
usbnet: Fix linkwatch use-after-free on disconnect: a69e617e53
net: usb: qmi_wwan: Add support for Cinterion MV32: ae7107baa5
net: usb: qmi_wwan: add Quectel RM520N: e1091e226a
usbnet: Fix memory leak in usbnet_disconnect(): a432061562
net: usb: qmi_wwan: Add new usb-id for Dell branded EM7455: 797666cd5a
net: usb: qmi_wwan: add Telit 0x103a composition: e103ba3399
net: usb: qmi_wwan: add u-blox 0x1342 composition: a487069e11
net/cdc_ncm: Enable ZLP for DisplayLink ethernet devices: 266c0190ae
net/cdc_ncm: Fix multicast RX support for CDC NCM devices with ZLP: 748064b54c
3 years ago
M_ars cae1696c64 Revert "SDK6: use prebuilt"
This reverts commit 9b9b282939.
3 years ago
pedro c086d2b9ac kernel sdk6: drivers: net: usbnet: updates from the upstream
usbnet: fix memory allocation in helpers
e65af5403e

usbnet: fix memory leak in error case
b55a21b764
3 years ago
pedro 97f86757c4 kernel sdk6: drivers: net: pptp: updates from the upstream; clean-up
pptp: pptp_rcv_core() misses pskb_may_pull() call
4ea2739ea8

pptp: fix skb leak in pptp_xmit()
8bae8bd6cb

net: constify some ppp/pptp structs
756e64a0b1

pptp: fix sparse pointer warning
469230d118

pptp: lookup route with the proper net namespace
08252b3231

pptp: fix sparse pointer warning
469230d118

pptp: fix stack info leak in pptp_getname()
a5f6fc28d6

pptp: fix illegal memory access caused by multiple bind()s
9a368aff9c
3 years ago
pedro b964c49698 kernel sdk6: drivers: char: n_tty: updates from the upstream
tty: fix "IRQ45: nobody cared"
7b292b4bf9

TTY: n_tty, do not dereference user buffer
3fa10cc83f

tty: Fix possible race in n_tty_read()
00aaae033e
3 years ago
pedro 8f598eb111 kernel sdk6: net: slip: updates from the upstream
slip: remove unnecessary break after goto
8904120b52

slip: Check if rstate is initialized before uncompressing
3f01ddb962

slip: make slhc_free() silently accept an error pointer
baf76f0c58

slip: make slhc_compress() more robust against malicious packets
110a40dfb7
3 years ago
pedro 43cf590b2d kernel sdk6: net: veth: updates from the upstream
net/veth: Fix packet checksumming
0b7967503d

veth: Fix the byte counters
675071a2ef

Revert: veth: remove unneeded ifname code from veth_newlink()
6c8c44462a

veth: convert to 64 bit statistics
6311cc44a2

veth: fix 64bit stats on 32bit arches
cf05c700cf

veth: Allow to create peer link with given ifindex
e6f8f1a739
3 years ago
pedro 12299c4646 kernel sdk6: drivers: net: ppp: move PFC decompression to PPP generic layer
Extract "Protocol" field decompression code from transport protocols to
PPP generic layer, where it actually belongs. As a consequence, this
patch fixes incorrect place of PFC decompression in L2TP driver (when
it's not PPPOX_BOUND) and also enables this decompression for other
protocols, like PPPoE.

Protocol field decompression also happens in PPP Multilink Protocol
code and in PPP compression protocols implementations (bsd, deflate,
mppe). It looks like there is no easy way to get rid of that, so it was
decided to leave it as is, but provide those cases with appropriate
comments instead.

Changes in v2:
  - Fix the order of checking skb data room and proto decompression
  - Remove "inline" keyword from ppp_decompress_proto()
  - Don't split line before function name
  - Prefix ppp_decompress_proto() function with "__"
  - Add ppp_decompress_proto() function with skb data room checks
  - Add description for introduced functions
  - Fix comments (as per review on mailing list)

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 7fb1b8ca8f
3 years ago
pedro e5ad8e8281 kernel sdk6: net: l2tp: updates from the upstream
l2tp: Fix PPP header erasure and memory leak
55b92b7a11

l2tp: Correctly return -EBADF from pppol2tp_getname
4ac36a4ada

l2tp: Fix the connect status check in pppol2tp_getname
56cff471d0
3 years ago
pedro 9fcac880a6 kernel sdk6: drivers: net: ppp_deflate: updates from the upstream
ppp: deflate: never return len larger than output buffer
e2a4800e75

ppp: deflate: Fix possible crash in deflate_init
3ebe1bca58

ppp: deflate: Remove useless call "zlib_inflateEnd"
dc5fa2073f
3 years ago
pedro 0a4ccbfdc8 kernel sdk7: drivers: net: ppp_mppe: updates from the upstream
ppp: mppe: sanity error path rework
325301892a

ppp: mppe: discard late packet in stateless mode
0365476314

ppp: mppe: Use vsnprintf extension %phN
4f5a98410d
3 years ago
pedro 2758f2d33e kernel sdk6: drivers: net: ppp_synctty: updates from the upstream
ppp: avoid false drop_monitor false positives (forgottrn only for ppp_synctty.c)
968d70184d

tty: Fix recursive deadlock in tty_perform_flush()
e7f3880cd9

ppp: reuse print_hex_dump_bytes
167bfa7184
3 years ago
pedro d1c01fe1bc kernel sdk6: drivers: net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 89bf67f1f0
3 years ago
pedro 6c38f3e3be Revert "kernel sdk6: drivers: tty: make tiocgicount a handler"
This reverts commit 680f7cb515.

Problem with tuxera driver
3 years ago
pedro 047ca07772 Revert "kernel sdk6: drivers: usb: convert the USB drivers to the new icount interface"
This reverts commit 6da581e134.

Problem with tuxera driver
3 years ago
pedro d7d071eaa8 kernel sdk6: drivers: net: pppoe: revert 4 latest commits because of possible problems with CTF
- revert (from newest):

pppoe: fix memory corruption in padt work structure
fe53985aaa

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f
3 years ago
pedro 3c2dd8cbb7 kernel sdk6: drivers: net: pppoe: updates from the upstream
pppoe: remove unused return value from two methods
3b12bb6043

ppp: slight optimization of addr compare
7ed8ca5b1e

net: pppoe: use correct channel MTU when using Multilink PPP
a8a3e41c67

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f

pppoe: Lacks DST MAC address check
a068833bbf

pppoe: drop pppoe device in pppoe_unbind_sock_work
665a6cd809

ppp: don't override sk->sk_state in pppoe_flush_dev()
e6740165b8

ppp: fix pppoe_dev deletion condition in pppoe_release()
1acea4f6ce

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

pppoe: fix memory corruption in padt work structure
fe53985aaa

pppoe: only process PADT targeted at local interfaces
b8c1583951
3 years ago
pedro 6988d3d912 kernel sdk6: drivers: net: ppp_generic: updates from the upstream
ppp: fix truesize underestimation
19c6c8f58b

ppp: fix 'ppp_mp_reconstruct bad seq' errors
8a49ad6e89

ppp: Don't stop and restart queue on every TX packet
e675f0cc9a

ppp: Fix race condition with queue start/stop
9a5d2bd99e

ppp: avoid false drop_monitor false positives
968d70184d

net: ppp: reset nextseq counter when enabling SC_MULTILINK
d762d03849

net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined
a9f559c37b

fix misuses of f_count() in ppp and netlink
24dff96a37

ppp: fix lockdep splat in ppp_dev_uninit()
58a89ecaca

ppp, slip: Validate VJ compression slot parameters completely
4ab42d78e3

ppp: clarify parsing of user supplied data in ppp_set_compress()
555d5b70f1

ppp: lock ppp->flags in ppp_read() and ppp_poll()
edffc2178d

ppp: release rtnl mutex when interface creation fails
6faac63a69

ppp: ensure file->private_data can't be overridden
e8e56ffd9d

ppp: take reference on channels netns
1f461dcdd2
3 years ago
pedro 5bcfedc63c kernel sdk6: drivers: usb: usbnet: revert commit 861981f 3 years ago
M_ars b232e735b1 SDK6: enable USB2 and USB3 power at boot up by default
Note: remove code to manually enable/disable USB power at start_usb()/stop_usb(). Follow cfe/board_data default config.
3 years ago
pedro 71a5d4a30c kernel sdk6: drivers: usb: serial: usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)
Some devices (ex ZTE 2726) simply don't respond at all when data is sent
to some of their USB interfaces.  The data gets stuck in the TTYs queue
and sits there until close(2), which them blocks because closing_wait
defaults to 30 seconds (even though the fd is O_NONBLOCK).  This is
rarely desired.  Implement the standard mechanism to adjust closing_wait
and let applications handle it how they want to.

Signed-off-by: Dan Williams <dcbw@redhat.com>

Ref: 02303f7337
3 years ago
pedro 6da581e134 kernel sdk6: drivers: usb: convert the USB drivers to the new icount interface
Simple pasting job using the new ops function. Also fix a couple of devices
directly returning the internal struct (which happens at this point to match
for the fields that matter but isn't correct or futureproof)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Ref: 0bca1b913a
3 years ago
pedro 680f7cb515 kernel sdk6: drivers: tty: make tiocgicount a handler
Dan Rosenberg noted that various drivers return the struct with uncleared
fields. Instead of spending forever trying to stomp all the drivers that
get it wrong (and every new driver) do the job in one place.

This first patch adds the needed operations and hooks them up, including
the needed USB midlayer and serial core plumbing.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Ref: d281da7ff6
3 years ago
pedro 0a4a90cf2b kernel sdk6: drivers: serial-core: restore termios settings when resume console ports
The commit 4547be7 rewrites suspend and resume functions. According
to this rewrite, when a serial port is a printk console device and
can suspend(without set no_console_suspend flag), it will definitely
call set_termios function during its resume, but parameter termios
isn't initialized, this will pass an unpredictable config to the
serial port. If this serial port is not a userspace opened tty device
, a suspend and resume action will make this serial port unusable.
I.E. ttyS0 is a printk console device, ttyS1 or keyboard+display is
userspace tty device, a suspend/resume action will make ttyS0
unusable.

If a serial port is both a printk console device and an opened tty
device, this issue can be overcome because it will call set_termios
again with the correct parameter in the uart_change_speed function.

Refer to the deleted content of commit 4547be7, revert parts relate
to restore settings into parameter termios. It is safe because if
a serial port is a printk console only device, the only meaningful
field in termios is c_cflag and its old config is saved in
uport->cons->cflag, if this port is also an opened tty device,
it will clear uport->cons->cflag in the uart_open and the old config
is saved in tty->termios.

Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Acked-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Ref: 891b9dd107
3 years ago
pedro ced92f0fe6 kernel sdk6: drivers: serial-core: skip call set_termios/console_start when no_console_suspend
The commit 4547be7 rewrites suspend and resume functions, this
introduces a problem on the OMAP3EVM platoform. when the kernel boots
with no_console_suspend and we suspend the kernel, then resume it,
the serial console will be not usable. This problem should be common
for all platforms.
The cause for this problem is that when enter suspend, if we choose
no_console_suspend, the console_stop will be skiped. But in resume
function, the console port will be set to uninitialized state by
calling set_termios function and the console_start is called without
checking whether the no_console_suspend is set, Now fix it.

Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Acked-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Ref: ca2e71aa8c
3 years ago
pedro 4f2c89311d kernel sdk6: drivers: usb: class: cdc-acm: updates from the upstream 3 years ago
pedro ead66873de kernel sdk6: drivers: usb: cdc-wdm: fix reading stuck on device close
- very important fix for E3372 modem users

Ref: 01e01f5c89
3 years ago
pedro 58b62d65d9 kernel sdk6: drivers: usb: ucblp: remove dbg() usage
Ref: 4f306309fc
3 years ago
pedro 57eb0af11a kernel sdk6: drivers: usb: convert drivers/usb/* to use module_usb_driver()
Ref: 65db430540
3 years ago
pedro c04efb9478 kernel sdk6: drivers: net: usb: cdc_ncm: don't spew notifications
Ref: de658a195e
3 years ago
pedro 6b743185d4 kernel sdk6: drivers: net: usb: qmi_wwan: updates from the upstream 3 years ago
pedro 41c29c8196 kernel sdk6: drivers: net: usb: usbnet: export usbnet_cdc_zte_rx_fixup (add forgotten part of the code)
Ref: 64b97df995
3 years ago
pedro 2db1ed230f kernel sdk6: drivers: net: usb: rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether
Certain ZTE modems, namely: MF823. MF831, MF910, built-in modem from
MF286R, expose both CDC-ECM and RNDIS network interfaces.
They have a trait of ignoring the locally-administered MAC address
configured on the interface both in CDC-ECM and RNDIS part,
and this leads to dropping of incoming traffic by the host.
However, the workaround was only present in CDC-ECM, and MF286R
explicitly requires it in RNDIS mode.

Re-use the workaround in rndis_host as well, to fix operation of MF286R
module, some versions of which expose only the RNDIS interface. Do so by
introducing new flag, RNDIS_DRIVER_DATA_DST_MAC_FIXUP, and testing for it
in rndis_rx_fixup. This is required, as RNDIS uses frame batching, and all
of the packets inside the batch need the fixup. This might introduce a
performance penalty, because test is done for every returned Ethernet
frame.

Apply the workaround to both "flavors" of RNDIS interfaces, as older ZTE
modems, like MF823 found in the wild, report the USB_CLASS_COMM class
interfaces, while MF286R reports USB_CLASS_WIRELESS_CONTROLLER.

Suggested-by: Bjørn Mork <bjorn@mork.no>
Cc: Kristian Evensen <kristian.evensen@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Ref: 36e747972d
3 years ago
pedro 3977db05f0 kernel sdk6: drivers: net: usb: rndis_host: support Hytera digital radios
Ref: 29262e1f77
3 years ago