1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

hostapd: merge operstate cleanup from r23738

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23740 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2010-10-31 13:53:47 +00:00
parent b1b81f3461
commit e72eaac003
2 changed files with 12 additions and 32 deletions

View File

@@ -23,25 +23,3 @@ 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);
+ }
}