Ignore:
Timestamp:
2011-11-23T15:01:44+01:00 (4 years ago)
Author:
nbd
Message:

hostapd: update to latest version from trunk (fixes #10455)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/hostapd/patches/320-nl80211_multicall_fixes.patch

    r27031 r29298  
    11--- a/src/drivers/driver_nl80211.c 
    22+++ b/src/drivers/driver_nl80211.c 
    3 @@ -1890,6 +1890,7 @@ static void * wpa_driver_nl80211_init(vo 
     3@@ -2289,6 +2289,7 @@ static void * wpa_driver_nl80211_init(vo 
    44        drv->monitor_ifidx = -1; 
    55        drv->monitor_sock = -1; 
    6         drv->ioctl_sock = -1; 
     6        drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED; 
    77+       drv->nlmode = NL80211_IFTYPE_STATION; 
    88  
    99        if (wpa_driver_nl80211_init_nl(drv)) { 
    1010                os_free(drv); 
    11 @@ -2056,29 +2057,29 @@ wpa_driver_nl80211_finish_drv_init(struc 
     11@@ -2446,37 +2447,37 @@ wpa_driver_nl80211_finish_drv_init(struc 
    1212        drv->ifindex = if_nametoindex(bss->ifname); 
    1313        drv->first_bss.ifindex = drv->ifindex; 
    1414  
    1515-#ifndef HOSTAPD 
    16 -       if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) { 
    17 -               wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to " 
     16-       /* 
     17-        * Make sure the interface starts up in station mode unless this is a 
     18-        * dynamically added interface (e.g., P2P) that was already configured 
     19-        * with proper iftype. 
     20-        */ 
     21-       if ((drv->global == NULL || 
     22-            drv->ifindex != drv->global->if_add_ifindex) && 
     23-           wpa_driver_nl80211_set_mode(bss, NL80211_IFTYPE_STATION) < 0) { 
     24-               wpa_printf(MSG_ERROR, "nl80211: Could not configure driver to " 
    1825-                          "use managed mode"); 
     26-               return -1; 
    1927-       } 
    20 +       if (drv->nlmode == NL80211_IFTYPE_STATION) { 
    21 +               if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) { 
    22 +                       wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to " 
    23 +                                  "use managed mode"); 
    24 +               } 
    25   
    26 -       if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) { 
     28- 
     29-       if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) { 
    2730-               if (rfkill_is_blocked(drv->rfkill)) { 
    2831-                       wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable " 
     
    3437-                       wpa_printf(MSG_ERROR, "nl80211: Could not set " 
    3538-                                  "interface '%s' UP", bss->ifname); 
    36 -                       return -1; 
    37 +               if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) { 
     39+       if (drv->nlmode == NL80211_IFTYPE_STATION) { 
     40+               /* 
     41+                * Make sure the interface starts up in station mode unless this is a 
     42+                * dynamically added interface (e.g., P2P) that was already configured 
     43+                * with proper iftype. 
     44+                */ 
     45+               if ((drv->global == NULL || 
     46+                        drv->ifindex != drv->global->if_add_ifindex) && 
     47+                       wpa_driver_nl80211_set_mode(bss, NL80211_IFTYPE_STATION) < 0) { 
     48+                       wpa_printf(MSG_ERROR, "nl80211: Could not configure driver to " 
     49+                                  "use managed mode"); 
     50                        return -1; 
     51                } 
     52-       } 
     53  
     54-       netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 
     55-                              1, IF_OPER_DORMANT); 
     56-#endif /* HOSTAPD */ 
     57+               if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) { 
    3858+                       if (rfkill_is_blocked(drv->rfkill)) { 
    3959+                               wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable " 
     
    4767+                               return -1; 
    4868+                       } 
    49                 } 
    50 -       } 
    51   
    52 -       netlink_send_oper_ifla(drv->netlink, drv->ifindex, 
    53 -                              1, IF_OPER_DORMANT); 
    54 -#endif /* HOSTAPD */ 
    55 +               netlink_send_oper_ifla(drv->netlink, drv->ifindex, 
    56 +                                      1, IF_OPER_DORMANT); 
     69+               } 
     70+ 
     71+               netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 
     72+                                          1, IF_OPER_DORMANT); 
    5773+       } 
    5874  
    5975        if (wpa_driver_nl80211_capa(drv)) 
    6076                return -1; 
    61 @@ -3849,7 +3850,8 @@ static void nl80211_remove_iface(struct  
    62   
    63  #ifdef HOSTAPD 
    64         /* stop listening for EAPOL on this interface */ 
    65 -       del_ifidx(drv, ifidx); 
    66 +       if (drv->nlmode == NL80211_IFTYPE_AP) 
    67 +               del_ifidx(drv, ifidx); 
    68  #endif /* HOSTAPD */ 
    69   
    70         msg = nlmsg_alloc(); 
    71 @@ -3922,7 +3924,8 @@ static int nl80211_create_iface_once(str 
    72   
    73  #ifdef HOSTAPD 
    74         /* start listening for EAPOL on this interface */ 
    75 -       add_ifidx(drv, ifidx); 
    76 +       if (drv->nlmode == NL80211_IFTYPE_AP) 
    77 +               add_ifidx(drv, ifidx); 
    78  #endif /* HOSTAPD */ 
    79   
    80         if (addr && iftype != NL80211_IFTYPE_MONITOR && 
Note: See TracChangeset for help on using the changeset viewer.