usb: gadget: u_ether: Fix NULL pointer dereference crash

port->port_usb can be NULL if USB cable is disconnected when
net device is trying to transfer data which is causing device
to crash. Hence add changes to eliminate need of accessing
port->port_usb to see multi_xfer_pkt value.

CRs-Fixed: 452642
Change-Id: Ia28399b896ec1e069abeee8fe477826de6bb5942
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
USB: f_rndis: Check if cdev is NULL before accessing

RNDIS control path completion handlers are getting called after setting
cdev to NULL during disconnect as part of composition switch and this
is leading to a crash. Avoid this crash, by checking, if cdev is NULL
before accessing. Also don't queue request's to DCD, if composition switch
is in progress.

CRs-Fixed: 433534
Change-Id: Ic0790415ec3eaf866af2895370249e45adcbba5d
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
USB: u_ether: Check if driver_data and port_usb is NULL before accessing

Rndis tx requests are queued to the controller, while disconnect is
in progress. There is a chance of getting the completion of those requests
after ep->driver_data and dev->port_usb are set to NULL.
This leads to NULL pointer dereference crash on tx_complete().

Hence, check if ep->driver_data and dev->port_usb are NULL before
accessing them in tx_complete() and free the current request.

CRs-Fixed: 435636
Change-Id: I42a427f7e51ffe4f81768756d835d123778df260
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
Revert "net: Add back alignment for size for __alloc_skb"

This reverts commit 43e2d865c4e6509c60b19d2e43d88aba9efe5a2d.

Change-Id: Ibcb116095efc5ab02716190180c405b4faffeb8d
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
Revert "net: more accurate skb truesize"

Causing low throughput on WLAN data.

This reverts commit 937369a08f1c798e3e46a80a6b80b113718a09d3.

Change-Id: I6cc0145fc3636fa4ae60305662feadd6d474f25b
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
Merge "Revert "net: Add back alignment for size for __alloc_skb""
Merge "Revert "net: more accurate skb truesize""
Merge "USB: f_rndis: Check if cdev is NULL before accessing"
Merge "USB: u_ether: Check if driver_data and port_usb is NULL before accessing"
Merge "usb: gadget: u_ether: Fix NULL pointer dereference crash"