source: branches/backfire/package/hostapd/patches/551-nl80211_del_beacon_bss.patch @ 26416

Last change on this file since 26416 was 26416, checked in by nbd, 5 years ago

hostapd: update to latest trunk version (merge r26414, r26415)

File size: 1.6 KB
  • src/drivers/driver_nl80211.c

    a b wpa_driver_nl80211_finish_drv_init(struc 
    20922092} 
    20932093 
    20942094 
    2095 static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv) 
     2095static int wpa_driver_nl80211_del_bss_beacon(struct i802_bss *bss) 
    20962096{ 
     2097        struct wpa_driver_nl80211_data *drv = bss->drv; 
    20972098        struct nl_msg *msg; 
    20982099 
     2100        bss->beacon_set = 0; 
     2101 
    20992102        msg = nlmsg_alloc(); 
    21002103        if (!msg) 
    21012104                return -ENOMEM; 
    21022105 
    21032106        genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 
    21042107                    0, NL80211_CMD_DEL_BEACON, 0); 
    2105         NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex); 
     2108        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex); 
    21062109 
    21072110        return send_and_recv_msgs(drv, msg, NULL, NULL); 
    21082111 nla_put_failure: 
     2112        nlmsg_free(msg); 
    21092113        return -ENOBUFS; 
    21102114} 
    21112115 
     2116static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv) 
     2117{ 
     2118        struct i802_bss *bss; 
     2119 
     2120        for (bss = &drv->first_bss; bss; bss = bss->next) 
     2121                wpa_driver_nl80211_del_bss_beacon(bss); 
     2122} 
     2123 
     2124static int wpa_driver_nl80211_stop_ap(void *priv) 
     2125{ 
     2126        struct i802_bss *bss = priv; 
     2127 
     2128        wpa_driver_nl80211_del_beacon(bss->drv); 
     2129} 
    21122130 
    21132131/** 
    21142132 * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface 
    const struct wpa_driver_ops wpa_driver_n 
    65666584        .set_intra_bss = nl80211_set_intra_bss, 
    65676585        .set_param = nl80211_set_param, 
    65686586        .get_radio_name = nl80211_get_radio_name, 
     6587        .stop_ap = wpa_driver_nl80211_stop_ap, 
    65696588}; 
  • src/drivers/driver.h

    a b struct wpa_driver_ops { 
    22402240         * @signal_info: Connection info structure 
    22412241         */ 
    22422242        int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info); 
     2243 
     2244        int (*stop_ap)(void *priv); 
    22432245}; 
    22442246 
    22452247 
Note: See TracBrowser for help on using the repository browser.