Commit 323e79d4 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Johannes Berg

wifi: mwifiex: use cfg80211_ssid_eq() instead of mwifiex_ssid_cmp()

Prefer generic 'cfg80211_ssid_eq()' over dropped 'mwifiex_ssid_cmp()'.
Compile tested only.
Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Link: https://msgid.link/20231215123859.196350-2-dmantipov@yandex.ruSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1c1c2b37
...@@ -1427,8 +1427,8 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv, ...@@ -1427,8 +1427,8 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv,
/* Check if the requested SSID is already joined */ /* Check if the requested SSID is already joined */
if (priv->curr_bss_params.bss_descriptor.ssid.ssid_len && if (priv->curr_bss_params.bss_descriptor.ssid.ssid_len &&
!mwifiex_ssid_cmp(&bss_desc->ssid, cfg80211_ssid_eq(&bss_desc->ssid,
&priv->curr_bss_params.bss_descriptor.ssid) && &priv->curr_bss_params.bss_descriptor.ssid) &&
(priv->curr_bss_params.bss_descriptor.bss_mode == (priv->curr_bss_params.bss_descriptor.bss_mode ==
NL80211_IFTYPE_ADHOC)) { NL80211_IFTYPE_ADHOC)) {
mwifiex_dbg(priv->adapter, INFO, mwifiex_dbg(priv->adapter, INFO,
......
...@@ -1152,7 +1152,6 @@ void mwifiex_queue_scan_cmd(struct mwifiex_private *priv, ...@@ -1152,7 +1152,6 @@ void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
struct cmd_ctrl_node *cmd_node); struct cmd_ctrl_node *cmd_node);
int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp); struct host_cmd_ds_command *resp);
s32 mwifiex_ssid_cmp(struct cfg80211_ssid *ssid1, struct cfg80211_ssid *ssid2);
int mwifiex_associate(struct mwifiex_private *priv, int mwifiex_associate(struct mwifiex_private *priv,
struct mwifiex_bssdescriptor *bss_desc); struct mwifiex_bssdescriptor *bss_desc);
int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
......
...@@ -179,17 +179,6 @@ mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher) ...@@ -179,17 +179,6 @@ mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
return ret; return ret;
} }
/*
* This function compares two SSIDs and checks if they match.
*/
s32
mwifiex_ssid_cmp(struct cfg80211_ssid *ssid1, struct cfg80211_ssid *ssid2)
{
if (!ssid1 || !ssid2 || (ssid1->ssid_len != ssid2->ssid_len))
return -1;
return memcmp(ssid1->ssid, ssid2->ssid, ssid1->ssid_len);
}
/* /*
* This function checks if wapi is enabled in driver and scanned network is * This function checks if wapi is enabled in driver and scanned network is
* compatible with it. * compatible with it.
......
...@@ -345,8 +345,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, ...@@ -345,8 +345,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
/* Adhoc mode */ /* Adhoc mode */
/* If the requested SSID matches current SSID, return */ /* If the requested SSID matches current SSID, return */
if (bss_desc && bss_desc->ssid.ssid_len && if (bss_desc && bss_desc->ssid.ssid_len &&
(!mwifiex_ssid_cmp(&priv->curr_bss_params.bss_descriptor. cfg80211_ssid_eq(&priv->curr_bss_params.bss_descriptor.ssid,
ssid, &bss_desc->ssid))) { &bss_desc->ssid)) {
ret = 0; ret = 0;
goto done; goto done;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment