Commit 731f8e1c authored by John W. Linville's avatar John W. Linville

libertas: release bss references and avoid warning from cfg80211_inform_bss

  CC [M]  drivers/net/wireless/libertas/cfg.o
drivers/net/wireless/libertas/cfg.c: In function ‘lbs_ret_scan’:
drivers/net/wireless/libertas/cfg.c:636:24: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
drivers/net/wireless/libertas/cfg.c: In function ‘lbs_join_post’:
drivers/net/wireless/libertas/cfg.c:1766:21: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6d377cdb
...@@ -485,6 +485,7 @@ static int lbs_cfg_set_channel(struct wiphy *wiphy, ...@@ -485,6 +485,7 @@ static int lbs_cfg_set_channel(struct wiphy *wiphy,
static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
struct cmd_header *resp) struct cmd_header *resp)
{ {
struct cfg80211_bss *bss;
struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp; struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp;
int bsssize; int bsssize;
const u8 *pos; const u8 *pos;
...@@ -632,12 +633,14 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, ...@@ -632,12 +633,14 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
LBS_SCAN_RSSI_TO_MBM(rssi)/100); LBS_SCAN_RSSI_TO_MBM(rssi)/100);
if (channel && if (channel &&
!(channel->flags & IEEE80211_CHAN_DISABLED)) !(channel->flags & IEEE80211_CHAN_DISABLED)) {
cfg80211_inform_bss(wiphy, channel, bss = cfg80211_inform_bss(wiphy, channel,
bssid, le64_to_cpu(*(__le64 *)tsfdesc), bssid, le64_to_cpu(*(__le64 *)tsfdesc),
capa, intvl, ie, ielen, capa, intvl, ie, ielen,
LBS_SCAN_RSSI_TO_MBM(rssi), LBS_SCAN_RSSI_TO_MBM(rssi),
GFP_KERNEL); GFP_KERNEL);
cfg80211_put_bss(bss);
}
} else } else
lbs_deb_scan("scan response: missing BSS channel IE\n"); lbs_deb_scan("scan response: missing BSS channel IE\n");
...@@ -1720,6 +1723,7 @@ static void lbs_join_post(struct lbs_private *priv, ...@@ -1720,6 +1723,7 @@ static void lbs_join_post(struct lbs_private *priv,
2 + 2 + /* atim */ 2 + 2 + /* atim */
2 + 8]; /* extended rates */ 2 + 8]; /* extended rates */
u8 *fake = fake_ie; u8 *fake = fake_ie;
struct cfg80211_bss *bss;
lbs_deb_enter(LBS_DEB_CFG80211); lbs_deb_enter(LBS_DEB_CFG80211);
...@@ -1763,14 +1767,15 @@ static void lbs_join_post(struct lbs_private *priv, ...@@ -1763,14 +1767,15 @@ static void lbs_join_post(struct lbs_private *priv,
*fake++ = 0x6c; *fake++ = 0x6c;
lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie); lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie);
cfg80211_inform_bss(priv->wdev->wiphy, bss = cfg80211_inform_bss(priv->wdev->wiphy,
params->channel, params->channel,
bssid, bssid,
0, 0,
capability, capability,
params->beacon_interval, params->beacon_interval,
fake_ie, fake - fake_ie, fake_ie, fake - fake_ie,
0, GFP_KERNEL); 0, GFP_KERNEL);
cfg80211_put_bss(bss);
memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); memcpy(priv->wdev->ssid, params->ssid, params->ssid_len);
priv->wdev->ssid_len = params->ssid_len; priv->wdev->ssid_len = params->ssid_len;
......
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