diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-11 13:49:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 14:28:49 -0500 |
commit | 731f8e1c41a4d0ffb589e2395f931f8a1aa6c6a4 (patch) | |
tree | 138618901ae2defc515d72cd1919b238302adc75 /drivers/net | |
parent | 6d377cdbe3d35d67468fcfe7473fc3f0f74fa647 (diff) |
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: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 4fcd653bddc4..89f34ad8d34a 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -485,6 +485,7 @@ static int lbs_cfg_set_channel(struct wiphy *wiphy, | |||
485 | static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, | 485 | static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, |
486 | struct cmd_header *resp) | 486 | struct cmd_header *resp) |
487 | { | 487 | { |
488 | struct cfg80211_bss *bss; | ||
488 | struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp; | 489 | struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp; |
489 | int bsssize; | 490 | int bsssize; |
490 | const u8 *pos; | 491 | const u8 *pos; |
@@ -632,12 +633,14 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, | |||
632 | LBS_SCAN_RSSI_TO_MBM(rssi)/100); | 633 | LBS_SCAN_RSSI_TO_MBM(rssi)/100); |
633 | 634 | ||
634 | if (channel && | 635 | if (channel && |
635 | !(channel->flags & IEEE80211_CHAN_DISABLED)) | 636 | !(channel->flags & IEEE80211_CHAN_DISABLED)) { |
636 | cfg80211_inform_bss(wiphy, channel, | 637 | bss = cfg80211_inform_bss(wiphy, channel, |
637 | bssid, le64_to_cpu(*(__le64 *)tsfdesc), | 638 | bssid, le64_to_cpu(*(__le64 *)tsfdesc), |
638 | capa, intvl, ie, ielen, | 639 | capa, intvl, ie, ielen, |
639 | LBS_SCAN_RSSI_TO_MBM(rssi), | 640 | LBS_SCAN_RSSI_TO_MBM(rssi), |
640 | GFP_KERNEL); | 641 | GFP_KERNEL); |
642 | cfg80211_put_bss(bss); | ||
643 | } | ||
641 | } else | 644 | } else |
642 | lbs_deb_scan("scan response: missing BSS channel IE\n"); | 645 | lbs_deb_scan("scan response: missing BSS channel IE\n"); |
643 | 646 | ||
@@ -1720,6 +1723,7 @@ static void lbs_join_post(struct lbs_private *priv, | |||
1720 | 2 + 2 + /* atim */ | 1723 | 2 + 2 + /* atim */ |
1721 | 2 + 8]; /* extended rates */ | 1724 | 2 + 8]; /* extended rates */ |
1722 | u8 *fake = fake_ie; | 1725 | u8 *fake = fake_ie; |
1726 | struct cfg80211_bss *bss; | ||
1723 | 1727 | ||
1724 | lbs_deb_enter(LBS_DEB_CFG80211); | 1728 | lbs_deb_enter(LBS_DEB_CFG80211); |
1725 | 1729 | ||
@@ -1763,14 +1767,15 @@ static void lbs_join_post(struct lbs_private *priv, | |||
1763 | *fake++ = 0x6c; | 1767 | *fake++ = 0x6c; |
1764 | lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie); | 1768 | lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie); |
1765 | 1769 | ||
1766 | cfg80211_inform_bss(priv->wdev->wiphy, | 1770 | bss = cfg80211_inform_bss(priv->wdev->wiphy, |
1767 | params->channel, | 1771 | params->channel, |
1768 | bssid, | 1772 | bssid, |
1769 | 0, | 1773 | 0, |
1770 | capability, | 1774 | capability, |
1771 | params->beacon_interval, | 1775 | params->beacon_interval, |
1772 | fake_ie, fake - fake_ie, | 1776 | fake_ie, fake - fake_ie, |
1773 | 0, GFP_KERNEL); | 1777 | 0, GFP_KERNEL); |
1778 | cfg80211_put_bss(bss); | ||
1774 | 1779 | ||
1775 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); | 1780 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); |
1776 | priv->wdev->ssid_len = params->ssid_len; | 1781 | priv->wdev->ssid_len = params->ssid_len; |