Commit aa95a48d authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: release bss structure returned by cfg80211_inform_bss()

Following compilation warning is fixed by releasing referenced BSS
structure returned by cfg80211_inform_bss().

"warning: ignoring return value of cfg80211_inform_bss,
declared with attribute warn_unused_result"

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f72fa45f
...@@ -780,6 +780,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) ...@@ -780,6 +780,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv)
{ {
struct ieee80211_channel *chan; struct ieee80211_channel *chan;
struct mwifiex_bss_info bss_info; struct mwifiex_bss_info bss_info;
struct cfg80211_bss *bss;
int ie_len; int ie_len;
u8 ie_buf[IEEE80211_MAX_SSID_LEN + sizeof(struct ieee_types_header)]; u8 ie_buf[IEEE80211_MAX_SSID_LEN + sizeof(struct ieee_types_header)];
enum ieee80211_band band; enum ieee80211_band band;
...@@ -800,9 +801,10 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) ...@@ -800,9 +801,10 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv)
ieee80211_channel_to_frequency(bss_info.bss_chan, ieee80211_channel_to_frequency(bss_info.bss_chan,
band)); band));
cfg80211_inform_bss(priv->wdev->wiphy, chan, bss = cfg80211_inform_bss(priv->wdev->wiphy, chan,
bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, bss_info.bssid, 0, WLAN_CAPABILITY_IBSS,
0, ie_buf, ie_len, 0, GFP_KERNEL); 0, ie_buf, ie_len, 0, GFP_KERNEL);
cfg80211_put_bss(bss);
memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN); memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN);
return 0; return 0;
......
...@@ -1760,6 +1760,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, ...@@ -1760,6 +1760,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
cap_info_bitmap, beacon_period, cap_info_bitmap, beacon_period,
ie_buf, ie_len, rssi, GFP_KERNEL); ie_buf, ie_len, rssi, GFP_KERNEL);
*(u8 *)bss->priv = band; *(u8 *)bss->priv = band;
cfg80211_put_bss(bss);
if (priv->media_connected && !memcmp(bssid, if (priv->media_connected && !memcmp(bssid,
priv->curr_bss_params.bss_descriptor priv->curr_bss_params.bss_descriptor
......
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