diff options
Diffstat (limited to 'drivers/net/wireless/orinoco/scan.c')
-rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index e99ca1c1e0d8..96e39edfec77 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -76,6 +76,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
76 | { | 76 | { |
77 | struct wiphy *wiphy = priv_to_wiphy(priv); | 77 | struct wiphy *wiphy = priv_to_wiphy(priv); |
78 | struct ieee80211_channel *channel; | 78 | struct ieee80211_channel *channel; |
79 | struct cfg80211_bss *cbss; | ||
79 | u8 *ie; | 80 | u8 *ie; |
80 | u8 ie_buf[46]; | 81 | u8 ie_buf[46]; |
81 | u64 timestamp; | 82 | u64 timestamp; |
@@ -121,9 +122,10 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
121 | beacon_interval = le16_to_cpu(bss->a.beacon_interv); | 122 | beacon_interval = le16_to_cpu(bss->a.beacon_interv); |
122 | signal = SIGNAL_TO_MBM(le16_to_cpu(bss->a.level)); | 123 | signal = SIGNAL_TO_MBM(le16_to_cpu(bss->a.level)); |
123 | 124 | ||
124 | cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, | 125 | cbss = cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, |
125 | capability, beacon_interval, ie_buf, ie_len, | 126 | capability, beacon_interval, ie_buf, ie_len, |
126 | signal, GFP_KERNEL); | 127 | signal, GFP_KERNEL); |
128 | cfg80211_put_bss(cbss); | ||
127 | } | 129 | } |
128 | 130 | ||
129 | void orinoco_add_extscan_result(struct orinoco_private *priv, | 131 | void orinoco_add_extscan_result(struct orinoco_private *priv, |
@@ -132,6 +134,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
132 | { | 134 | { |
133 | struct wiphy *wiphy = priv_to_wiphy(priv); | 135 | struct wiphy *wiphy = priv_to_wiphy(priv); |
134 | struct ieee80211_channel *channel; | 136 | struct ieee80211_channel *channel; |
137 | struct cfg80211_bss *cbss; | ||
135 | const u8 *ie; | 138 | const u8 *ie; |
136 | u64 timestamp; | 139 | u64 timestamp; |
137 | s32 signal; | 140 | s32 signal; |
@@ -152,9 +155,10 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
152 | ie = bss->data; | 155 | ie = bss->data; |
153 | signal = SIGNAL_TO_MBM(bss->level); | 156 | signal = SIGNAL_TO_MBM(bss->level); |
154 | 157 | ||
155 | cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, | 158 | cbss = cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, |
156 | capability, beacon_interval, ie, ie_len, | 159 | capability, beacon_interval, ie, ie_len, |
157 | signal, GFP_KERNEL); | 160 | signal, GFP_KERNEL); |
161 | cfg80211_put_bss(cbss); | ||
158 | } | 162 | } |
159 | 163 | ||
160 | void orinoco_add_hostscan_results(struct orinoco_private *priv, | 164 | void orinoco_add_hostscan_results(struct orinoco_private *priv, |