source: trunk/package/hostapd/patches/551-nl80211_del_beacon_bss.patch @ 26751

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

hostapd: fix a few compile errors and warnings

File size: 1.7 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        return 0; 
     2124} 
     2125 
     2126static int wpa_driver_nl80211_stop_ap(void *priv) 
     2127{ 
     2128        struct i802_bss *bss = priv; 
     2129 
     2130        return wpa_driver_nl80211_del_beacon(bss->drv); 
     2131} 
    21122132 
    21132133/** 
    21142134 * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface 
    const struct wpa_driver_ops wpa_driver_n 
    65816601        .set_intra_bss = nl80211_set_intra_bss, 
    65826602        .set_param = nl80211_set_param, 
    65836603        .get_radio_name = nl80211_get_radio_name, 
     6604        .stop_ap = wpa_driver_nl80211_stop_ap, 
    65846605}; 
  • src/drivers/driver.h

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