diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-01 20:34:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-01 20:34:14 -0400 |
commit | 05318bc905467237d4aa68a701f6e92a2b332218 (patch) | |
tree | 3b7577383bca50aeb442568aa16cf8f2167b8694 /net/mac80211 | |
parent | ea812ca1b06113597adcd8e70c0f84a413d97544 (diff) | |
parent | 88c1f4f6dffe66e2fed8e7e3276e091ee850bed0 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/wireless/libertas/host.h
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/Kconfig | 1 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 25 | ||||
-rw-r--r-- | net/mac80211/driver-ops.h | 7 | ||||
-rw-r--r-- | net/mac80211/driver-trace.h | 22 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 42 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 39 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 3 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.h | 2 | ||||
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht_debugfs.c | 2 | ||||
-rw-r--r-- | net/mac80211/rx.c | 18 | ||||
-rw-r--r-- | net/mac80211/scan.c | 6 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 16 | ||||
-rw-r--r-- | net/mac80211/status.c | 4 |
14 files changed, 137 insertions, 52 deletions
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 83eec7a8bd1f..4d6f8653ec88 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig | |||
@@ -69,6 +69,7 @@ endchoice | |||
69 | 69 | ||
70 | config MAC80211_RC_DEFAULT | 70 | config MAC80211_RC_DEFAULT |
71 | string | 71 | string |
72 | default "minstrel_ht" if MAC80211_RC_DEFAULT_MINSTREL && MAC80211_RC_MINSTREL_HT | ||
72 | default "minstrel" if MAC80211_RC_DEFAULT_MINSTREL | 73 | default "minstrel" if MAC80211_RC_DEFAULT_MINSTREL |
73 | default "pid" if MAC80211_RC_DEFAULT_PID | 74 | default "pid" if MAC80211_RC_DEFAULT_PID |
74 | default "" | 75 | default "" |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ed8c9f5be94f..9eb02a340889 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -413,9 +413,6 @@ static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, | |||
413 | { | 413 | { |
414 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 414 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
415 | 415 | ||
416 | if (!local->ops->get_survey) | ||
417 | return -EOPNOTSUPP; | ||
418 | |||
419 | return drv_get_survey(local, idx, survey); | 416 | return drv_get_survey(local, idx, survey); |
420 | } | 417 | } |
421 | 418 | ||
@@ -1329,28 +1326,28 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) | |||
1329 | } | 1326 | } |
1330 | 1327 | ||
1331 | static int ieee80211_set_tx_power(struct wiphy *wiphy, | 1328 | static int ieee80211_set_tx_power(struct wiphy *wiphy, |
1332 | enum tx_power_setting type, int dbm) | 1329 | enum nl80211_tx_power_setting type, int mbm) |
1333 | { | 1330 | { |
1334 | struct ieee80211_local *local = wiphy_priv(wiphy); | 1331 | struct ieee80211_local *local = wiphy_priv(wiphy); |
1335 | struct ieee80211_channel *chan = local->hw.conf.channel; | 1332 | struct ieee80211_channel *chan = local->hw.conf.channel; |
1336 | u32 changes = 0; | 1333 | u32 changes = 0; |
1337 | 1334 | ||
1338 | switch (type) { | 1335 | switch (type) { |
1339 | case TX_POWER_AUTOMATIC: | 1336 | case NL80211_TX_POWER_AUTOMATIC: |
1340 | local->user_power_level = -1; | 1337 | local->user_power_level = -1; |
1341 | break; | 1338 | break; |
1342 | case TX_POWER_LIMITED: | 1339 | case NL80211_TX_POWER_LIMITED: |
1343 | if (dbm < 0) | 1340 | if (mbm < 0 || (mbm % 100)) |
1344 | return -EINVAL; | 1341 | return -EOPNOTSUPP; |
1345 | local->user_power_level = dbm; | 1342 | local->user_power_level = MBM_TO_DBM(mbm); |
1346 | break; | 1343 | break; |
1347 | case TX_POWER_FIXED: | 1344 | case NL80211_TX_POWER_FIXED: |
1348 | if (dbm < 0) | 1345 | if (mbm < 0 || (mbm % 100)) |
1349 | return -EINVAL; | 1346 | return -EOPNOTSUPP; |
1350 | /* TODO: move to cfg80211 when it knows the channel */ | 1347 | /* TODO: move to cfg80211 when it knows the channel */ |
1351 | if (dbm > chan->max_power) | 1348 | if (MBM_TO_DBM(mbm) > chan->max_power) |
1352 | return -EINVAL; | 1349 | return -EINVAL; |
1353 | local->user_power_level = dbm; | 1350 | local->user_power_level = MBM_TO_DBM(mbm); |
1354 | break; | 1351 | break; |
1355 | } | 1352 | } |
1356 | 1353 | ||
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index c33317320eee..14123dce544b 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -375,9 +375,14 @@ static inline int drv_get_survey(struct ieee80211_local *local, int idx, | |||
375 | struct survey_info *survey) | 375 | struct survey_info *survey) |
376 | { | 376 | { |
377 | int ret = -EOPNOTSUPP; | 377 | int ret = -EOPNOTSUPP; |
378 | |||
379 | trace_drv_get_survey(local, idx, survey); | ||
380 | |||
378 | if (local->ops->get_survey) | 381 | if (local->ops->get_survey) |
379 | ret = local->ops->get_survey(&local->hw, idx, survey); | 382 | ret = local->ops->get_survey(&local->hw, idx, survey); |
380 | /* trace_drv_get_survey(local, idx, survey, ret); */ | 383 | |
384 | trace_drv_return_int(local, ret); | ||
385 | |||
381 | return ret; | 386 | return ret; |
382 | } | 387 | } |
383 | 388 | ||
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index 8da31caff931..5d5d2a974668 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -761,6 +761,28 @@ TRACE_EVENT(drv_ampdu_action, | |||
761 | ) | 761 | ) |
762 | ); | 762 | ); |
763 | 763 | ||
764 | TRACE_EVENT(drv_get_survey, | ||
765 | TP_PROTO(struct ieee80211_local *local, int idx, | ||
766 | struct survey_info *survey), | ||
767 | |||
768 | TP_ARGS(local, idx, survey), | ||
769 | |||
770 | TP_STRUCT__entry( | ||
771 | LOCAL_ENTRY | ||
772 | __field(int, idx) | ||
773 | ), | ||
774 | |||
775 | TP_fast_assign( | ||
776 | LOCAL_ASSIGN; | ||
777 | __entry->idx = idx; | ||
778 | ), | ||
779 | |||
780 | TP_printk( | ||
781 | LOCAL_PR_FMT " idx:%d", | ||
782 | LOCAL_PR_ARG, __entry->idx | ||
783 | ) | ||
784 | ); | ||
785 | |||
764 | TRACE_EVENT(drv_flush, | 786 | TRACE_EVENT(drv_flush, |
765 | TP_PROTO(struct ieee80211_local *local, bool drop), | 787 | TP_PROTO(struct ieee80211_local *local, bool drop), |
766 | 788 | ||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 6f905f153ed7..a3649a86a784 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -855,6 +855,8 @@ struct ieee80211_local { | |||
855 | * this will override whatever chosen by mac80211 internally. | 855 | * this will override whatever chosen by mac80211 internally. |
856 | */ | 856 | */ |
857 | int dynamic_ps_forced_timeout; | 857 | int dynamic_ps_forced_timeout; |
858 | int dynamic_ps_user_timeout; | ||
859 | bool disable_dynamic_ps; | ||
858 | 860 | ||
859 | int user_power_level; /* in dBm */ | 861 | int user_power_level; /* in dBm */ |
860 | int power_constr_level; /* in dBm */ | 862 | int power_constr_level; /* in dBm */ |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 3cd5f7b5d693..ea13a80a476c 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -65,7 +65,6 @@ void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata) | |||
65 | { | 65 | { |
66 | atomic_inc(&sdata->u.mesh.mshstats.estab_plinks); | 66 | atomic_inc(&sdata->u.mesh.mshstats.estab_plinks); |
67 | mesh_accept_plinks_update(sdata); | 67 | mesh_accept_plinks_update(sdata); |
68 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
69 | } | 68 | } |
70 | 69 | ||
71 | static inline | 70 | static inline |
@@ -73,7 +72,6 @@ void mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata) | |||
73 | { | 72 | { |
74 | atomic_dec(&sdata->u.mesh.mshstats.estab_plinks); | 73 | atomic_dec(&sdata->u.mesh.mshstats.estab_plinks); |
75 | mesh_accept_plinks_update(sdata); | 74 | mesh_accept_plinks_update(sdata); |
76 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
77 | } | 75 | } |
78 | 76 | ||
79 | /** | 77 | /** |
@@ -115,7 +113,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | |||
115 | } | 113 | } |
116 | 114 | ||
117 | /** | 115 | /** |
118 | * mesh_plink_deactivate - deactivate mesh peer link | 116 | * __mesh_plink_deactivate - deactivate mesh peer link |
119 | * | 117 | * |
120 | * @sta: mesh peer link to deactivate | 118 | * @sta: mesh peer link to deactivate |
121 | * | 119 | * |
@@ -123,18 +121,23 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | |||
123 | * | 121 | * |
124 | * Locking: the caller must hold sta->lock | 122 | * Locking: the caller must hold sta->lock |
125 | */ | 123 | */ |
126 | static void __mesh_plink_deactivate(struct sta_info *sta) | 124 | static bool __mesh_plink_deactivate(struct sta_info *sta) |
127 | { | 125 | { |
128 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 126 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
127 | bool deactivated = false; | ||
129 | 128 | ||
130 | if (sta->plink_state == PLINK_ESTAB) | 129 | if (sta->plink_state == PLINK_ESTAB) { |
131 | mesh_plink_dec_estab_count(sdata); | 130 | mesh_plink_dec_estab_count(sdata); |
131 | deactivated = true; | ||
132 | } | ||
132 | sta->plink_state = PLINK_BLOCKED; | 133 | sta->plink_state = PLINK_BLOCKED; |
133 | mesh_path_flush_by_nexthop(sta); | 134 | mesh_path_flush_by_nexthop(sta); |
135 | |||
136 | return deactivated; | ||
134 | } | 137 | } |
135 | 138 | ||
136 | /** | 139 | /** |
137 | * __mesh_plink_deactivate - deactivate mesh peer link | 140 | * mesh_plink_deactivate - deactivate mesh peer link |
138 | * | 141 | * |
139 | * @sta: mesh peer link to deactivate | 142 | * @sta: mesh peer link to deactivate |
140 | * | 143 | * |
@@ -142,9 +145,15 @@ static void __mesh_plink_deactivate(struct sta_info *sta) | |||
142 | */ | 145 | */ |
143 | void mesh_plink_deactivate(struct sta_info *sta) | 146 | void mesh_plink_deactivate(struct sta_info *sta) |
144 | { | 147 | { |
148 | struct ieee80211_sub_if_data *sdata = sta->sdata; | ||
149 | bool deactivated; | ||
150 | |||
145 | spin_lock_bh(&sta->lock); | 151 | spin_lock_bh(&sta->lock); |
146 | __mesh_plink_deactivate(sta); | 152 | deactivated = __mesh_plink_deactivate(sta); |
147 | spin_unlock_bh(&sta->lock); | 153 | spin_unlock_bh(&sta->lock); |
154 | |||
155 | if (deactivated) | ||
156 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
148 | } | 157 | } |
149 | 158 | ||
150 | static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | 159 | static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, |
@@ -381,10 +390,16 @@ int mesh_plink_open(struct sta_info *sta) | |||
381 | 390 | ||
382 | void mesh_plink_block(struct sta_info *sta) | 391 | void mesh_plink_block(struct sta_info *sta) |
383 | { | 392 | { |
393 | struct ieee80211_sub_if_data *sdata = sta->sdata; | ||
394 | bool deactivated; | ||
395 | |||
384 | spin_lock_bh(&sta->lock); | 396 | spin_lock_bh(&sta->lock); |
385 | __mesh_plink_deactivate(sta); | 397 | deactivated = __mesh_plink_deactivate(sta); |
386 | sta->plink_state = PLINK_BLOCKED; | 398 | sta->plink_state = PLINK_BLOCKED; |
387 | spin_unlock_bh(&sta->lock); | 399 | spin_unlock_bh(&sta->lock); |
400 | |||
401 | if (deactivated) | ||
402 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
388 | } | 403 | } |
389 | 404 | ||
390 | 405 | ||
@@ -397,6 +412,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
397 | enum plink_event event; | 412 | enum plink_event event; |
398 | enum plink_frame_type ftype; | 413 | enum plink_frame_type ftype; |
399 | size_t baselen; | 414 | size_t baselen; |
415 | bool deactivated; | ||
400 | u8 ie_len; | 416 | u8 ie_len; |
401 | u8 *baseaddr; | 417 | u8 *baseaddr; |
402 | __le16 plid, llid, reason; | 418 | __le16 plid, llid, reason; |
@@ -651,8 +667,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
651 | case CNF_ACPT: | 667 | case CNF_ACPT: |
652 | del_timer(&sta->plink_timer); | 668 | del_timer(&sta->plink_timer); |
653 | sta->plink_state = PLINK_ESTAB; | 669 | sta->plink_state = PLINK_ESTAB; |
654 | mesh_plink_inc_estab_count(sdata); | ||
655 | spin_unlock_bh(&sta->lock); | 670 | spin_unlock_bh(&sta->lock); |
671 | mesh_plink_inc_estab_count(sdata); | ||
672 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
656 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", | 673 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", |
657 | sta->sta.addr); | 674 | sta->sta.addr); |
658 | break; | 675 | break; |
@@ -684,8 +701,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
684 | case OPN_ACPT: | 701 | case OPN_ACPT: |
685 | del_timer(&sta->plink_timer); | 702 | del_timer(&sta->plink_timer); |
686 | sta->plink_state = PLINK_ESTAB; | 703 | sta->plink_state = PLINK_ESTAB; |
687 | mesh_plink_inc_estab_count(sdata); | ||
688 | spin_unlock_bh(&sta->lock); | 704 | spin_unlock_bh(&sta->lock); |
705 | mesh_plink_inc_estab_count(sdata); | ||
706 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
689 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", | 707 | mpl_dbg("Mesh plink with %pM ESTABLISHED\n", |
690 | sta->sta.addr); | 708 | sta->sta.addr); |
691 | mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, | 709 | mesh_plink_frame_tx(sdata, PLINK_CONFIRM, sta->sta.addr, llid, |
@@ -702,11 +720,13 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
702 | case CLS_ACPT: | 720 | case CLS_ACPT: |
703 | reason = cpu_to_le16(MESH_CLOSE_RCVD); | 721 | reason = cpu_to_le16(MESH_CLOSE_RCVD); |
704 | sta->reason = reason; | 722 | sta->reason = reason; |
705 | __mesh_plink_deactivate(sta); | 723 | deactivated = __mesh_plink_deactivate(sta); |
706 | sta->plink_state = PLINK_HOLDING; | 724 | sta->plink_state = PLINK_HOLDING; |
707 | llid = sta->llid; | 725 | llid = sta->llid; |
708 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); | 726 | mod_plink_timer(sta, dot11MeshHoldingTimeout(sdata)); |
709 | spin_unlock_bh(&sta->lock); | 727 | spin_unlock_bh(&sta->lock); |
728 | if (deactivated) | ||
729 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON); | ||
710 | mesh_plink_frame_tx(sdata, PLINK_CLOSE, sta->sta.addr, llid, | 730 | mesh_plink_frame_tx(sdata, PLINK_CLOSE, sta->sta.addr, llid, |
711 | plid, reason); | 731 | plid, reason); |
712 | break; | 732 | break; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 85c3ca33333e..d1962650b254 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -478,6 +478,39 @@ static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata, | |||
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
481 | void ieee80211_enable_dyn_ps(struct ieee80211_vif *vif) | ||
482 | { | ||
483 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
484 | struct ieee80211_local *local = sdata->local; | ||
485 | struct ieee80211_conf *conf = &local->hw.conf; | ||
486 | |||
487 | WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION || | ||
488 | !(local->hw.flags & IEEE80211_HW_SUPPORTS_PS) || | ||
489 | (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)); | ||
490 | |||
491 | local->disable_dynamic_ps = false; | ||
492 | conf->dynamic_ps_timeout = local->dynamic_ps_user_timeout; | ||
493 | } | ||
494 | EXPORT_SYMBOL(ieee80211_enable_dyn_ps); | ||
495 | |||
496 | void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif) | ||
497 | { | ||
498 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
499 | struct ieee80211_local *local = sdata->local; | ||
500 | struct ieee80211_conf *conf = &local->hw.conf; | ||
501 | |||
502 | WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION || | ||
503 | !(local->hw.flags & IEEE80211_HW_SUPPORTS_PS) || | ||
504 | (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS)); | ||
505 | |||
506 | local->disable_dynamic_ps = true; | ||
507 | conf->dynamic_ps_timeout = 0; | ||
508 | del_timer_sync(&local->dynamic_ps_timer); | ||
509 | ieee80211_queue_work(&local->hw, | ||
510 | &local->dynamic_ps_enable_work); | ||
511 | } | ||
512 | EXPORT_SYMBOL(ieee80211_disable_dyn_ps); | ||
513 | |||
481 | /* powersave */ | 514 | /* powersave */ |
482 | static void ieee80211_enable_ps(struct ieee80211_local *local, | 515 | static void ieee80211_enable_ps(struct ieee80211_local *local, |
483 | struct ieee80211_sub_if_data *sdata) | 516 | struct ieee80211_sub_if_data *sdata) |
@@ -553,6 +586,7 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) | |||
553 | found->u.mgd.associated->beacon_ies && | 586 | found->u.mgd.associated->beacon_ies && |
554 | !(found->u.mgd.flags & (IEEE80211_STA_BEACON_POLL | | 587 | !(found->u.mgd.flags & (IEEE80211_STA_BEACON_POLL | |
555 | IEEE80211_STA_CONNECTION_POLL))) { | 588 | IEEE80211_STA_CONNECTION_POLL))) { |
589 | struct ieee80211_conf *conf = &local->hw.conf; | ||
556 | s32 beaconint_us; | 590 | s32 beaconint_us; |
557 | 591 | ||
558 | if (latency < 0) | 592 | if (latency < 0) |
@@ -575,7 +609,10 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency) | |||
575 | else | 609 | else |
576 | timeout = 100; | 610 | timeout = 100; |
577 | } | 611 | } |
578 | local->hw.conf.dynamic_ps_timeout = timeout; | 612 | local->dynamic_ps_user_timeout = timeout; |
613 | if (!local->disable_dynamic_ps) | ||
614 | conf->dynamic_ps_timeout = | ||
615 | local->dynamic_ps_user_timeout; | ||
579 | 616 | ||
580 | if (beaconint_us > latency) { | 617 | if (beaconint_us > latency) { |
581 | local->ps_sdata = NULL; | 618 | local->ps_sdata = NULL; |
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 7a04951fcb1f..52c85036660d 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -328,7 +328,8 @@ minstrel_next_sample_idx(struct minstrel_ht_sta *mi) | |||
328 | } | 328 | } |
329 | 329 | ||
330 | static void | 330 | static void |
331 | minstrel_downgrade_rate(struct minstrel_ht_sta *mi, int *idx, bool primary) | 331 | minstrel_downgrade_rate(struct minstrel_ht_sta *mi, unsigned int *idx, |
332 | bool primary) | ||
332 | { | 333 | { |
333 | int group, orig_group; | 334 | int group, orig_group; |
334 | 335 | ||
diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h index 696c0fc6e0b7..462d2b227ed5 100644 --- a/net/mac80211/rc80211_minstrel_ht.h +++ b/net/mac80211/rc80211_minstrel_ht.h | |||
@@ -29,6 +29,8 @@ struct mcs_group { | |||
29 | unsigned int duration[MCS_GROUP_RATES]; | 29 | unsigned int duration[MCS_GROUP_RATES]; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | extern const struct mcs_group minstrel_mcs_groups[]; | ||
33 | |||
32 | struct minstrel_rate_stats { | 34 | struct minstrel_rate_stats { |
33 | /* current / last sampling period attempts/success counters */ | 35 | /* current / last sampling period attempts/success counters */ |
34 | unsigned int attempts, last_attempts; | 36 | unsigned int attempts, last_attempts; |
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c index 4fb3ccbd8b40..4a5a4b3e7799 100644 --- a/net/mac80211/rc80211_minstrel_ht_debugfs.c +++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c | |||
@@ -14,8 +14,6 @@ | |||
14 | #include "rc80211_minstrel.h" | 14 | #include "rc80211_minstrel.h" |
15 | #include "rc80211_minstrel_ht.h" | 15 | #include "rc80211_minstrel_ht.h" |
16 | 16 | ||
17 | extern const struct mcs_group minstrel_mcs_groups[]; | ||
18 | |||
19 | static int | 17 | static int |
20 | minstrel_ht_stats_open(struct inode *inode, struct file *file) | 18 | minstrel_ht_stats_open(struct inode *inode, struct file *file) |
21 | { | 19 | { |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index a8aa0f2411a2..fa0f37e4afe4 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -293,7 +293,7 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
293 | skb2 = skb_clone(skb, GFP_ATOMIC); | 293 | skb2 = skb_clone(skb, GFP_ATOMIC); |
294 | if (skb2) { | 294 | if (skb2) { |
295 | skb2->dev = prev_dev; | 295 | skb2->dev = prev_dev; |
296 | netif_rx(skb2); | 296 | netif_receive_skb(skb2); |
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
@@ -304,7 +304,7 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
304 | 304 | ||
305 | if (prev_dev) { | 305 | if (prev_dev) { |
306 | skb->dev = prev_dev; | 306 | skb->dev = prev_dev; |
307 | netif_rx(skb); | 307 | netif_receive_skb(skb); |
308 | } else | 308 | } else |
309 | dev_kfree_skb(skb); | 309 | dev_kfree_skb(skb); |
310 | 310 | ||
@@ -1578,7 +1578,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) | |||
1578 | /* deliver to local stack */ | 1578 | /* deliver to local stack */ |
1579 | skb->protocol = eth_type_trans(skb, dev); | 1579 | skb->protocol = eth_type_trans(skb, dev); |
1580 | memset(skb->cb, 0, sizeof(skb->cb)); | 1580 | memset(skb->cb, 0, sizeof(skb->cb)); |
1581 | netif_rx(skb); | 1581 | netif_receive_skb(skb); |
1582 | } | 1582 | } |
1583 | } | 1583 | } |
1584 | 1584 | ||
@@ -2056,11 +2056,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2056 | nskb = skb_copy_expand(rx->skb, local->hw.extra_tx_headroom, 0, | 2056 | nskb = skb_copy_expand(rx->skb, local->hw.extra_tx_headroom, 0, |
2057 | GFP_ATOMIC); | 2057 | GFP_ATOMIC); |
2058 | if (nskb) { | 2058 | if (nskb) { |
2059 | struct ieee80211_mgmt *mgmt = (void *)nskb->data; | 2059 | struct ieee80211_mgmt *nmgmt = (void *)nskb->data; |
2060 | 2060 | ||
2061 | mgmt->u.action.category |= 0x80; | 2061 | nmgmt->u.action.category |= 0x80; |
2062 | memcpy(mgmt->da, mgmt->sa, ETH_ALEN); | 2062 | memcpy(nmgmt->da, nmgmt->sa, ETH_ALEN); |
2063 | memcpy(mgmt->sa, rx->sdata->vif.addr, ETH_ALEN); | 2063 | memcpy(nmgmt->sa, rx->sdata->vif.addr, ETH_ALEN); |
2064 | 2064 | ||
2065 | memset(nskb->cb, 0, sizeof(nskb->cb)); | 2065 | memset(nskb->cb, 0, sizeof(nskb->cb)); |
2066 | 2066 | ||
@@ -2244,7 +2244,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2244 | skb2 = skb_clone(skb, GFP_ATOMIC); | 2244 | skb2 = skb_clone(skb, GFP_ATOMIC); |
2245 | if (skb2) { | 2245 | if (skb2) { |
2246 | skb2->dev = prev_dev; | 2246 | skb2->dev = prev_dev; |
2247 | netif_rx(skb2); | 2247 | netif_receive_skb(skb2); |
2248 | } | 2248 | } |
2249 | } | 2249 | } |
2250 | 2250 | ||
@@ -2255,7 +2255,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2255 | 2255 | ||
2256 | if (prev_dev) { | 2256 | if (prev_dev) { |
2257 | skb->dev = prev_dev; | 2257 | skb->dev = prev_dev; |
2258 | netif_rx(skb); | 2258 | netif_receive_skb(skb); |
2259 | skb = NULL; | 2259 | skb = NULL; |
2260 | } else | 2260 | } else |
2261 | goto out_free_skb; | 2261 | goto out_free_skb; |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index e1b0be7a57b9..439c98d93a79 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -286,6 +286,8 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) | |||
286 | local->scanning = 0; | 286 | local->scanning = 0; |
287 | local->scan_channel = NULL; | 287 | local->scan_channel = NULL; |
288 | 288 | ||
289 | drv_sw_scan_complete(local); | ||
290 | |||
289 | /* we only have to protect scan_req and hw/sw scan */ | 291 | /* we only have to protect scan_req and hw/sw scan */ |
290 | mutex_unlock(&local->scan_mtx); | 292 | mutex_unlock(&local->scan_mtx); |
291 | 293 | ||
@@ -295,8 +297,6 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) | |||
295 | 297 | ||
296 | ieee80211_configure_filter(local); | 298 | ieee80211_configure_filter(local); |
297 | 299 | ||
298 | drv_sw_scan_complete(local); | ||
299 | |||
300 | ieee80211_offchannel_return(local, true); | 300 | ieee80211_offchannel_return(local, true); |
301 | 301 | ||
302 | done: | 302 | done: |
@@ -734,7 +734,7 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata, | |||
734 | { | 734 | { |
735 | struct ieee80211_local *local = sdata->local; | 735 | struct ieee80211_local *local = sdata->local; |
736 | int ret = -EBUSY; | 736 | int ret = -EBUSY; |
737 | enum nl80211_band band; | 737 | enum ieee80211_band band; |
738 | 738 | ||
739 | mutex_lock(&local->scan_mtx); | 739 | mutex_lock(&local->scan_mtx); |
740 | 740 | ||
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 10d0fcb417ae..54262e72376d 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
@@ -427,20 +427,20 @@ void for_each_sta_info_type_check(struct ieee80211_local *local, | |||
427 | { | 427 | { |
428 | } | 428 | } |
429 | 429 | ||
430 | #define for_each_sta_info(local, _addr, sta, nxt) \ | 430 | #define for_each_sta_info(local, _addr, _sta, nxt) \ |
431 | for ( /* initialise loop */ \ | 431 | for ( /* initialise loop */ \ |
432 | sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\ | 432 | _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\ |
433 | nxt = sta ? rcu_dereference(sta->hnext) : NULL; \ | 433 | nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \ |
434 | /* typecheck */ \ | 434 | /* typecheck */ \ |
435 | for_each_sta_info_type_check(local, (_addr), sta, nxt), \ | 435 | for_each_sta_info_type_check(local, (_addr), _sta, nxt),\ |
436 | /* continue condition */ \ | 436 | /* continue condition */ \ |
437 | sta; \ | 437 | _sta; \ |
438 | /* advance loop */ \ | 438 | /* advance loop */ \ |
439 | sta = nxt, \ | 439 | _sta = nxt, \ |
440 | nxt = sta ? rcu_dereference(sta->hnext) : NULL \ | 440 | nxt = _sta ? rcu_dereference(_sta->hnext) : NULL \ |
441 | ) \ | 441 | ) \ |
442 | /* compare address and run code only if it matches */ \ | 442 | /* compare address and run code only if it matches */ \ |
443 | if (memcmp(sta->sta.addr, (_addr), ETH_ALEN) == 0) | 443 | if (memcmp(_sta->sta.addr, (_addr), ETH_ALEN) == 0) |
444 | 444 | ||
445 | /* | 445 | /* |
446 | * Get STA info by index, BROKEN! | 446 | * Get STA info by index, BROKEN! |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 34da67995d94..10caec5ea8fa 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -377,7 +377,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
377 | skb2 = skb_clone(skb, GFP_ATOMIC); | 377 | skb2 = skb_clone(skb, GFP_ATOMIC); |
378 | if (skb2) { | 378 | if (skb2) { |
379 | skb2->dev = prev_dev; | 379 | skb2->dev = prev_dev; |
380 | netif_rx(skb2); | 380 | netif_receive_skb(skb2); |
381 | } | 381 | } |
382 | } | 382 | } |
383 | 383 | ||
@@ -386,7 +386,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
386 | } | 386 | } |
387 | if (prev_dev) { | 387 | if (prev_dev) { |
388 | skb->dev = prev_dev; | 388 | skb->dev = prev_dev; |
389 | netif_rx(skb); | 389 | netif_receive_skb(skb); |
390 | skb = NULL; | 390 | skb = NULL; |
391 | } | 391 | } |
392 | rcu_read_unlock(); | 392 | rcu_read_unlock(); |