mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-10 14:09:22 +01:00
wiphy: Rename get_ext_feature API
to has_ext_feature
This commit is contained in:
parent
933eabb6ef
commit
3b4cc1bfe2
2
src/ap.c
2
src/ap.c
@ -1566,7 +1566,7 @@ static struct l_genl_msg *ap_build_cmd_start_ap(struct ap_state *ap)
|
||||
l_genl_msg_append_attr(cmd, NL80211_ATTR_WIPHY_FREQ, 4, &ch_freq);
|
||||
l_genl_msg_append_attr(cmd, NL80211_ATTR_CHANNEL_WIDTH, 4, &ch_width);
|
||||
|
||||
if (wiphy_get_ext_feature(wiphy,
|
||||
if (wiphy_has_ext_feature(wiphy,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211)) {
|
||||
l_genl_msg_append_attr(cmd, NL80211_ATTR_SOCKET_OWNER, 0, NULL);
|
||||
l_genl_msg_append_attr(cmd,
|
||||
|
10
src/netdev.c
10
src/netdev.c
@ -394,7 +394,7 @@ static void netdev_rssi_poll(struct l_timeout *timeout, void *user_data)
|
||||
/* To be called whenever operational or rssi_levels_num are updated */
|
||||
static void netdev_rssi_polling_update(struct netdev *netdev)
|
||||
{
|
||||
if (wiphy_get_ext_feature(netdev->wiphy,
|
||||
if (wiphy_has_ext_feature(netdev->wiphy,
|
||||
NL80211_EXT_FEATURE_CQM_RSSI_LIST))
|
||||
return;
|
||||
|
||||
@ -2151,7 +2151,7 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev,
|
||||
bss->ssid_len, bss->ssid);
|
||||
l_genl_msg_append_attr(msg, NL80211_ATTR_AUTH_TYPE, 4, &auth_type);
|
||||
|
||||
if (wiphy_get_ext_feature(netdev->wiphy,
|
||||
if (wiphy_has_ext_feature(netdev->wiphy,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211))
|
||||
l_genl_msg_append_attr(msg,
|
||||
NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
|
||||
@ -3263,7 +3263,7 @@ static int netdev_control_port_frame(uint32_t ifindex,
|
||||
frame_size = sizeof(struct eapol_header) +
|
||||
L_BE16_TO_CPU(ef->header.packet_len);
|
||||
|
||||
if (!wiphy_get_ext_feature(netdev->wiphy,
|
||||
if (!wiphy_has_ext_feature(netdev->wiphy,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211))
|
||||
return netdev_control_port_write_pae(netdev, dest, proto,
|
||||
ef, noencrypt);
|
||||
@ -3396,7 +3396,7 @@ int netdev_set_rssi_report_levels(struct netdev *netdev, const int8_t *levels,
|
||||
if (levels_num > L_ARRAY_SIZE(netdev->rssi_levels))
|
||||
return -ENOSPC;
|
||||
|
||||
if (!wiphy_get_ext_feature(netdev->wiphy,
|
||||
if (!wiphy_has_ext_feature(netdev->wiphy,
|
||||
NL80211_EXT_FEATURE_CQM_RSSI_LIST))
|
||||
goto done;
|
||||
|
||||
@ -3849,7 +3849,7 @@ static void netdev_create_from_genl(struct l_genl_msg *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wiphy_get_ext_feature(wiphy,
|
||||
if (!wiphy_has_ext_feature(wiphy,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211)) {
|
||||
l_debug("No Control Port over NL80211 support for ifindex: %u,"
|
||||
" using PAE socket", *ifindex);
|
||||
|
@ -190,10 +190,10 @@ bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature)
|
||||
return wiphy->feature_flags & feature;
|
||||
}
|
||||
|
||||
bool wiphy_get_ext_feature(struct wiphy *wiphy, unsigned int idx)
|
||||
bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature)
|
||||
{
|
||||
return idx < sizeof(wiphy->ext_features) * 8 &&
|
||||
util_is_bit_set(wiphy->ext_features[idx >> 3], idx & 7);
|
||||
return feature < sizeof(wiphy->ext_features) * 8 &&
|
||||
util_is_bit_set(wiphy->ext_features[feature >> 3], feature & 7);
|
||||
}
|
||||
|
||||
uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy)
|
||||
|
@ -35,7 +35,7 @@ const char *wiphy_get_path(struct wiphy *wiphy);
|
||||
uint32_t wiphy_get_supported_bands(struct wiphy *wiphy);
|
||||
bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss);
|
||||
bool wiphy_has_feature(struct wiphy *wiphy, uint32_t feature);
|
||||
bool wiphy_has_ext_feature(struct wiphy *wiphy, unsigned int idx);
|
||||
bool wiphy_has_ext_feature(struct wiphy *wiphy, uint32_t feature);
|
||||
uint8_t wiphy_get_max_num_ssids_per_scan(struct wiphy *wiphy);
|
||||
|
||||
bool wiphy_init(struct l_genl_family *in, const char *whitelist,
|
||||
|
Loading…
Reference in New Issue
Block a user