From 4293bec1d5af5e928d358686d675870e953e51d0 Mon Sep 17 00:00:00 2001 From: jow Date: Fri, 29 Oct 2010 21:29:42 +0000 Subject: [PATCH] [backfire] backport r23715 git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23717 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../hostapd/patches/430-oper_state_fix.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/package/hostapd/patches/430-oper_state_fix.patch b/package/hostapd/patches/430-oper_state_fix.patch index 5a685a23e..8ea0e1236 100644 --- a/package/hostapd/patches/430-oper_state_fix.patch +++ b/package/hostapd/patches/430-oper_state_fix.patch @@ -23,3 +23,25 @@ DORMANT state does not prevent normal operations after that. return 0; } +--- a/src/drivers/driver_wext.c ++++ b/src/drivers/driver_wext.c +@@ -2245,11 +2245,14 @@ int wpa_driver_wext_set_operstate(void * + { + struct wpa_driver_wext_data *drv = priv; + +- wpa_printf(MSG_DEBUG, "%s: operstate %d->%d (%s)", +- __func__, drv->operstate, state, state ? "UP" : "DORMANT"); +- drv->operstate = state; +- return netlink_send_oper_ifla(drv->netlink, drv->ifindex, -1, +- state ? IF_OPER_UP : IF_OPER_DORMANT); ++ if (drv != NULL) ++ { ++ wpa_printf(MSG_DEBUG, "%s: operstate %d->%d (%s)", ++ __func__, drv->operstate, state, state ? "UP" : "DORMANT"); ++ drv->operstate = state; ++ return netlink_send_oper_ifla(drv->netlink, drv->ifindex, -1, ++ state ? IF_OPER_UP : IF_OPER_DORMANT); ++ } + } + + -- 2.35.1