[PATCH v2 2/6] nl80211: Use macro to reference netlink object.
greearb at candelatech.com
greearb
Thu Oct 20 13:21:20 PDT 2011
From: Ben Greear <greearb at candelatech.com>
This will allow us to change it later without having
to touch so much code.
Signed-off-by: Ben Greear <greearb at candelatech.com>
---
:100644 100644 23fe8f2... ddd4ebc... M src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.c | 112 +++++++++++++++++++++--------------------
1 files changed, 57 insertions(+), 55 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 23fe8f2..ddd4ebc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -104,6 +104,8 @@ static void nl80211_handle_destroy(struct nl_handle *handle)
#define IF_OPER_UP 6
#endif
+#define DRVNL nl80211
+
/* TODO: Move this somewhere central and put struct_ids
* in all structs that are passed around as void* so that
* we can look at things in the debugger (if nothing else)
@@ -655,7 +657,7 @@ static unsigned int nl80211_get_assoc_freq(struct wpa_driver_nl80211_data *drv)
if (!msg)
goto nla_put_failure;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, NLM_F_DUMP,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, NLM_F_DUMP,
NL80211_CMD_GET_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -1239,7 +1241,7 @@ static int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -1307,7 +1309,7 @@ static int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
NLM_F_DUMP, NL80211_CMD_GET_SURVEY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -1693,7 +1695,7 @@ static int wpa_driver_nl80211_set_country(void *priv, const char *alpha2_arg)
alpha2[1] = alpha2_arg[1];
alpha2[2] = '\0';
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_REQ_SET_REG, 0);
NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2, alpha2);
@@ -1876,7 +1878,7 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->first_bss.ifindex);
@@ -2020,8 +2022,8 @@ static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
}
#endif /* CONFIG_LIBNL20 */
- drv->nl80211 = genl_ctrl_search_by_name(drv->nl_cache, "nl80211");
- if (drv->nl80211 == NULL) {
+ drv->DRVNL = genl_ctrl_search_by_name(drv->nl_cache, "nl80211");
+ if (drv->DRVNL == NULL) {
wpa_printf(MSG_ERROR, "nl80211: 'nl80211' generic netlink not "
"found");
goto err4;
@@ -2232,7 +2234,7 @@ failed:
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
- genl_family_put(drv->nl80211);
+ genl_family_put(drv->DRVNL);
nl_cache_free(drv->nl_cache);
nl80211_handle_destroy(drv->nl_handle);
nl_cb_put(drv->nl_cb);
@@ -2254,7 +2256,7 @@ static int nl80211_register_frame(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_REGISTER_ACTION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -2415,7 +2417,7 @@ static int wpa_driver_nl80211_del_beacon(struct wpa_driver_nl80211_data *drv)
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_DEL_BEACON, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -2497,7 +2499,7 @@ static void wpa_driver_nl80211_deinit(void *priv)
close(drv->ioctl_sock);
eloop_unregister_read_sock(nl_socket_get_fd(drv->nl_handle_event));
- genl_family_put(drv->nl80211);
+ genl_family_put(drv->DRVNL);
nl_cache_free(drv->nl_cache);
nl_cache_free(drv->nl_cache_event);
nl80211_handle_destroy(drv->nl_handle);
@@ -2566,7 +2568,7 @@ static int wpa_driver_nl80211_scan(void *priv,
params->filter_ssids = NULL;
drv->num_filter_ssids = params->num_filter_ssids;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_TRIGGER_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -2697,7 +2699,7 @@ static int wpa_driver_nl80211_sched_scan(void *priv,
params->filter_ssids = NULL;
drv->num_filter_ssids = params->num_filter_ssids;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_START_SCHED_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -2793,7 +2795,7 @@ static int wpa_driver_nl80211_stop_sched_scan(void *priv)
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_STOP_SCHED_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -3122,7 +3124,7 @@ nl80211_get_scan_results(struct wpa_driver_nl80211_data *drv)
if (!msg)
goto nla_put_failure;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, NLM_F_DUMP,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, NLM_F_DUMP,
NL80211_CMD_GET_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -3209,10 +3211,10 @@ static int wpa_driver_nl80211_set_key(const char *ifname, void *priv,
return -ENOMEM;
if (alg == WPA_ALG_NONE) {
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_DEL_KEY, 0);
} else {
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_NEW_KEY, 0);
NLA_PUT(msg, NL80211_ATTR_KEY_DATA, key_len, key);
switch (alg) {
@@ -3294,7 +3296,7 @@ static int wpa_driver_nl80211_set_key(const char *ifname, void *priv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_KEY, 0);
NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, key_idx);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
@@ -3466,7 +3468,7 @@ static int wpa_driver_nl80211_mlme(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0, cmd, 0);
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0, cmd, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
NLA_PUT_U16(msg, NL80211_ATTR_REASON_CODE, reason_code);
@@ -3559,7 +3561,7 @@ retry:
wpa_printf(MSG_DEBUG, "nl80211: Authenticate (ifindex=%d)",
drv->ifindex);
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_AUTHENTICATE, 0);
for (i = 0; i < 4; i++) {
@@ -4040,7 +4042,7 @@ static int nl80211_set_ht40_flags(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_REG, 0);
return send_and_recv_msgs(drv, msg, nl80211_get_reg, results);
}
@@ -4064,7 +4066,7 @@ wpa_driver_nl80211_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
if (!msg)
return NULL;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -4186,7 +4188,7 @@ static int nl80211_set_ap_isolate(struct i802_bss *bss, int enabled)
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_BSS, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
@@ -4208,7 +4210,7 @@ static int nl80211_set_bss(struct i802_bss *bss, int cts, int preamble,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_BSS, 0);
if (cts >= 0)
@@ -4252,7 +4254,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
if (beacon_set)
cmd = NL80211_CMD_SET_BEACON;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, cmd, 0);
NLA_PUT(msg, NL80211_ATTR_BEACON_HEAD, params->head_len, params->head);
NLA_PUT(msg, NL80211_ATTR_BEACON_TAIL, params->tail_len, params->tail);
@@ -4390,7 +4392,7 @@ static int wpa_driver_nl80211_set_freq(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -4452,7 +4454,7 @@ static int wpa_driver_nl80211_sta_add(void *priv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_NEW_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
@@ -4495,7 +4497,7 @@ static int wpa_driver_nl80211_sta_remove(void *priv, const u8 *addr)
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_DEL_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
@@ -4527,7 +4529,7 @@ static void nl80211_remove_iface(struct wpa_driver_nl80211_data *drv,
if (!msg)
goto nla_put_failure;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_DEL_INTERFACE, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifidx);
@@ -4575,7 +4577,7 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_NEW_INTERFACE, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, ifname);
@@ -5139,7 +5141,7 @@ static int wpa_driver_nl80211_sta_set_flags(void *priv, const u8 *addr,
return -ENOMEM;
}
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
@@ -5221,7 +5223,7 @@ static int nl80211_leave_ibss(struct wpa_driver_nl80211_data *drv)
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_LEAVE_IBSS, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
@@ -5262,7 +5264,7 @@ retry:
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_JOIN_IBSS, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -5328,7 +5330,7 @@ static unsigned int nl80211_get_assoc_bssid(struct wpa_driver_nl80211_data *drv,
if (!msg)
goto nla_put_failure;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, NLM_F_DUMP,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, NLM_F_DUMP,
NL80211_CMD_GET_SCAN, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -5380,7 +5382,7 @@ static int wpa_driver_nl80211_connect(
return -1;
wpa_printf(MSG_DEBUG, "nl80211: Connect (ifindex=%d)", drv->ifindex);
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_CONNECT, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -5566,7 +5568,7 @@ static int wpa_driver_nl80211_associate(
wpa_printf(MSG_DEBUG, "nl80211: Associate (ifindex=%d)",
drv->ifindex);
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_ASSOCIATE, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -5688,7 +5690,7 @@ static int nl80211_set_mode(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_INTERFACE, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, mode);
@@ -5813,7 +5815,7 @@ static int wpa_driver_nl80211_set_supp_port(void *priv, int authorized)
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
@@ -5884,7 +5886,7 @@ static int i802_get_seqnum(const char *iface, void *priv, const u8 *addr,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_KEY, 0);
if (addr)
@@ -5914,7 +5916,7 @@ static int i802_set_rate_sets(void *priv, int *supp_rates, int *basic_rates,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_BSS, 0);
for (i = 0; i < NL80211_MAX_SUPP_RATES && basic_rates[i] >= 0; i++)
@@ -5947,7 +5949,7 @@ static int i802_set_rts(void *priv, int rts)
else
val = rts;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_RTS_THRESHOLD, val);
@@ -5979,7 +5981,7 @@ static int i802_set_frag(void *priv, int frag)
else
val = frag;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FRAG_THRESHOLD, val);
@@ -6004,7 +6006,7 @@ static int i802_flush(void *priv)
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_DEL_STATION, 0);
/*
@@ -6082,7 +6084,7 @@ static int i802_read_sta_data(void *priv, struct hostap_sta_driver_data *data,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_GET_STATION, 0);
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
@@ -6106,7 +6108,7 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_WIPHY, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
@@ -6164,7 +6166,7 @@ static int i802_set_sta_vlan(void *priv, const u8 *addr,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_STATION, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
@@ -6504,7 +6506,7 @@ failed:
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
- genl_family_put(drv->nl80211);
+ genl_family_put(drv->DRVNL);
nl_cache_free(drv->nl_cache);
nl80211_handle_destroy(drv->nl_handle);
nl_cb_put(drv->nl_cb);
@@ -6767,7 +6769,7 @@ static int nl80211_send_frame_cmd(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_FRAME, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -6847,7 +6849,7 @@ static void wpa_driver_nl80211_send_action_cancel_wait(void *priv)
if (!msg)
return;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_FRAME_WAIT_CANCEL, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -6877,7 +6879,7 @@ static int wpa_driver_nl80211_remain_on_channel(void *priv, unsigned int freq,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_REMAIN_ON_CHANNEL, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -6923,7 +6925,7 @@ static int wpa_driver_nl80211_cancel_remain_on_channel(void *priv)
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
@@ -7025,7 +7027,7 @@ static int nl80211_disable_11b_rates(struct wpa_driver_nl80211_data *drv,
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_TX_BITRATE_MASK, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
@@ -7156,7 +7158,7 @@ static int nl80211_signal_monitor(void *priv, int threshold, int hysteresis)
if (!msg)
return -1;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0,
0, NL80211_CMD_SET_CQM, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
@@ -7271,7 +7273,7 @@ static int nl80211_pmkid(struct i802_bss *bss, int cmd, const u8 *bssid,
if (!msg)
return -ENOMEM;
- genlmsg_put(msg, 0, 0, genl_family_get_id(bss->drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(bss->drv->DRVNL), 0, 0,
cmd, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
@@ -7323,7 +7325,7 @@ static void nl80211_set_rekey_info(void *priv, const u8 *kek, const u8 *kck,
if (!msg)
return;
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->DRVNL), 0, 0,
NL80211_CMD_SET_REKEY_OFFLOAD, 0);
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
--
1.7.3.4
More information about the Hostap
mailing list