aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-13 09:17:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-22 14:51:18 -0500
commit8860020e0be1f03d83dc9e9e93e18a4ddbe01038 (patch)
tree09fa9089770e8a42e913f6c11abbba04bec20fad /net/mac80211/tx.c
parent4e3bc141d480661634d0fadad7dbb1ddde70b4d4 (diff)
cfg80211: restructure AP/GO mode API
The AP/GO mode API isn't very clearly defined, it has "set beacon" and "new beacon" etc. Modify the API to the following: * start AP -- all settings * change beacon -- new beacon data * stop AP -- stop AP mode operation This also reflects in the nl80211 API, rename the commands there correspondingly (but keep the old names for compatibility.) Overall, this makes it much clearer what's going on in the API. Kalle developed the ath6kl changes, I created the rest of the patch. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1be0ca2b5936..c6eadac9ca4e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2206,7 +2206,8 @@ void ieee80211_tx_pending(unsigned long data)
2206 2206
2207/* functions for drivers to get certain frames */ 2207/* functions for drivers to get certain frames */
2208 2208
2209static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss, 2209static void ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata,
2210 struct ieee80211_if_ap *bss,
2210 struct sk_buff *skb, 2211 struct sk_buff *skb,
2211 struct beacon_data *beacon) 2212 struct beacon_data *beacon)
2212{ 2213{
@@ -2223,7 +2224,7 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
2223 IEEE80211_MAX_AID+1); 2224 IEEE80211_MAX_AID+1);
2224 2225
2225 if (bss->dtim_count == 0) 2226 if (bss->dtim_count == 0)
2226 bss->dtim_count = beacon->dtim_period - 1; 2227 bss->dtim_count = sdata->vif.bss_conf.dtim_period - 1;
2227 else 2228 else
2228 bss->dtim_count--; 2229 bss->dtim_count--;
2229 2230
@@ -2231,7 +2232,7 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
2231 *pos++ = WLAN_EID_TIM; 2232 *pos++ = WLAN_EID_TIM;
2232 *pos++ = 4; 2233 *pos++ = 4;
2233 *pos++ = bss->dtim_count; 2234 *pos++ = bss->dtim_count;
2234 *pos++ = beacon->dtim_period; 2235 *pos++ = sdata->vif.bss_conf.dtim_period;
2235 2236
2236 if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf)) 2237 if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf))
2237 aid0 = 1; 2238 aid0 = 1;
@@ -2324,12 +2325,14 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2324 * of the tim bitmap in mac80211 and the driver. 2325 * of the tim bitmap in mac80211 and the driver.
2325 */ 2326 */
2326 if (local->tim_in_locked_section) { 2327 if (local->tim_in_locked_section) {
2327 ieee80211_beacon_add_tim(ap, skb, beacon); 2328 ieee80211_beacon_add_tim(sdata, ap, skb,
2329 beacon);
2328 } else { 2330 } else {
2329 unsigned long flags; 2331 unsigned long flags;
2330 2332
2331 spin_lock_irqsave(&local->tim_lock, flags); 2333 spin_lock_irqsave(&local->tim_lock, flags);
2332 ieee80211_beacon_add_tim(ap, skb, beacon); 2334 ieee80211_beacon_add_tim(sdata, ap, skb,
2335 beacon);
2333 spin_unlock_irqrestore(&local->tim_lock, flags); 2336 spin_unlock_irqrestore(&local->tim_lock, flags);
2334 } 2337 }
2335 2338