drivers: wifi: eswifi: Guard net_ctx state change
Previously, a call to set the net_context state was added here to accommodate a new KConfig scenario that permitted disabling offload sockets. This code path is used by both local and offloaded sockets. While it is necessary to update the state of the net_context for a locally managed socket, setting the net_context for an offloaded socket is an error, as the net_context is invalid (in fact, it points to a hard-coded dummy socket), as observed in #52346 and #38544. A prior commit (a9ac0a88) attempting to remedy the offload socket scenario removed this line, which resulted in problems for the local socket scenario. The socket never got updated to the connected state, and thus was unusable. Adding this guard allows the eswifi socket to set the socket net_context only if the socket is NOT offloaded. Signed-off-by:Brian Dunlay <brian@nubix.io>
Loading
Please sign in to comment