diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 17:54:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 17:54:29 -0400 |
commit | cc998ff8811530be521f6b316f37ab7676a07938 (patch) | |
tree | a054b3bf4b2ef406bf756a6cfc9be2f9115f17ae /drivers/net/wireless/iwlwifi/mvm/mvm.h | |
parent | 57d730924d5cc2c3e280af16a9306587c3a511db (diff) | |
parent | 0d40f75bdab241868c0eb6f97aef9f8b3a66f7b3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller:
"Noteworthy changes this time around:
1) Multicast rejoin support for team driver, from Jiri Pirko.
2) Centralize and simplify TCP RTT measurement handling in order to
reduce the impact of bad RTO seeding from SYN/ACKs. Also, when
both timestamps and local RTT measurements are available prefer
the later because there are broken middleware devices which
scramble the timestamp.
From Yuchung Cheng.
3) Add TCP_NOTSENT_LOWAT socket option to limit the amount of kernel
memory consumed to queue up unsend user data. From Eric Dumazet.
4) Add a "physical port ID" abstraction for network devices, from
Jiri Pirko.
5) Add a "suppress" operation to influence fib_rules lookups, from
Stefan Tomanek.
6) Add a networking development FAQ, from Paul Gortmaker.
7) Extend the information provided by tcp_probe and add ipv6 support,
from Daniel Borkmann.
8) Use RCU locking more extensively in openvswitch data paths, from
Pravin B Shelar.
9) Add SCTP support to openvswitch, from Joe Stringer.
10) Add EF10 chip support to SFC driver, from Ben Hutchings.
11) Add new SYNPROXY netfilter target, from Patrick McHardy.
12) Compute a rate approximation for sending in TCP sockets, and use
this to more intelligently coalesce TSO frames. Furthermore, add
a new packet scheduler which takes advantage of this estimate when
available. From Eric Dumazet.
13) Allow AF_PACKET fanouts with random selection, from Daniel
Borkmann.
14) Add ipv6 support to vxlan driver, from Cong Wang"
Resolved conflicts as per discussion.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1218 commits)
openvswitch: Fix alignment of struct sw_flow_key.
netfilter: Fix build errors with xt_socket.c
tcp: Add missing braces to do_tcp_setsockopt
caif: Add missing braces to multiline if in cfctrl_linkup_request
bnx2x: Add missing braces in bnx2x:bnx2x_link_initialize
vxlan: Fix kernel panic on device delete.
net: mvneta: implement ->ndo_do_ioctl() to support PHY ioctls
net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
icplus: Use netif_running to determine device state
ethernet/arc/arc_emac: Fix huge delays in large file copies
tuntap: orphan frags before trying to set tx timestamp
tuntap: purge socket error queue on detach
qlcnic: use standard NAPI weights
ipv6:introduce function to find route for redirect
bnx2x: VF RSS support - VF side
bnx2x: VF RSS support - PF side
vxlan: Notify drivers for listening UDP port changes
net: usbnet: update addr_assign_type if appropriate
driver/net: enic: update enic maintainers and driver
driver/net: enic: Exposing symbols for Cisco's low latency driver
...
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 112 |
1 files changed, 91 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 420e82d379d9..b0389279cc1e 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -76,6 +76,7 @@ | |||
76 | #include "iwl-trans.h" | 76 | #include "iwl-trans.h" |
77 | #include "sta.h" | 77 | #include "sta.h" |
78 | #include "fw-api.h" | 78 | #include "fw-api.h" |
79 | #include "constants.h" | ||
79 | 80 | ||
80 | #define IWL_INVALID_MAC80211_QUEUE 0xff | 81 | #define IWL_INVALID_MAC80211_QUEUE 0xff |
81 | #define IWL_MVM_MAX_ADDRESSES 5 | 82 | #define IWL_MVM_MAX_ADDRESSES 5 |
@@ -91,6 +92,9 @@ enum iwl_mvm_tx_fifo { | |||
91 | }; | 92 | }; |
92 | 93 | ||
93 | extern struct ieee80211_ops iwl_mvm_hw_ops; | 94 | extern struct ieee80211_ops iwl_mvm_hw_ops; |
95 | extern const struct iwl_mvm_power_ops pm_legacy_ops; | ||
96 | extern const struct iwl_mvm_power_ops pm_mac_ops; | ||
97 | |||
94 | /** | 98 | /** |
95 | * struct iwl_mvm_mod_params - module parameters for iwlmvm | 99 | * struct iwl_mvm_mod_params - module parameters for iwlmvm |
96 | * @init_dbg: if true, then the NIC won't be stopped if the INIT fw asserted. | 100 | * @init_dbg: if true, then the NIC won't be stopped if the INIT fw asserted. |
@@ -149,6 +153,22 @@ enum iwl_power_scheme { | |||
149 | }; | 153 | }; |
150 | 154 | ||
151 | #define IWL_CONN_MAX_LISTEN_INTERVAL 70 | 155 | #define IWL_CONN_MAX_LISTEN_INTERVAL 70 |
156 | #define IWL_UAPSD_AC_INFO (IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\ | ||
157 | IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\ | ||
158 | IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\ | ||
159 | IEEE80211_WMM_IE_STA_QOSINFO_AC_BE) | ||
160 | #define IWL_UAPSD_MAX_SP IEEE80211_WMM_IE_STA_QOSINFO_SP_2 | ||
161 | |||
162 | struct iwl_mvm_power_ops { | ||
163 | int (*power_update_mode)(struct iwl_mvm *mvm, | ||
164 | struct ieee80211_vif *vif); | ||
165 | int (*power_disable)(struct iwl_mvm *mvm, struct ieee80211_vif *vif); | ||
166 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
167 | int (*power_dbgfs_read)(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | ||
168 | char *buf, int bufsz); | ||
169 | #endif | ||
170 | }; | ||
171 | |||
152 | 172 | ||
153 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 173 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
154 | enum iwl_dbgfs_pm_mask { | 174 | enum iwl_dbgfs_pm_mask { |
@@ -160,10 +180,11 @@ enum iwl_dbgfs_pm_mask { | |||
160 | MVM_DEBUGFS_PM_DISABLE_POWER_OFF = BIT(5), | 180 | MVM_DEBUGFS_PM_DISABLE_POWER_OFF = BIT(5), |
161 | MVM_DEBUGFS_PM_LPRX_ENA = BIT(6), | 181 | MVM_DEBUGFS_PM_LPRX_ENA = BIT(6), |
162 | MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD = BIT(7), | 182 | MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD = BIT(7), |
183 | MVM_DEBUGFS_PM_SNOOZE_ENABLE = BIT(8), | ||
163 | }; | 184 | }; |
164 | 185 | ||
165 | struct iwl_dbgfs_pm { | 186 | struct iwl_dbgfs_pm { |
166 | u8 keep_alive_seconds; | 187 | u16 keep_alive_seconds; |
167 | u32 rx_data_timeout; | 188 | u32 rx_data_timeout; |
168 | u32 tx_data_timeout; | 189 | u32 tx_data_timeout; |
169 | bool skip_over_dtim; | 190 | bool skip_over_dtim; |
@@ -171,6 +192,7 @@ struct iwl_dbgfs_pm { | |||
171 | bool disable_power_off; | 192 | bool disable_power_off; |
172 | bool lprx_ena; | 193 | bool lprx_ena; |
173 | u32 lprx_rssi_threshold; | 194 | u32 lprx_rssi_threshold; |
195 | bool snooze_ena; | ||
174 | int mask; | 196 | int mask; |
175 | }; | 197 | }; |
176 | 198 | ||
@@ -180,24 +202,28 @@ enum iwl_dbgfs_bf_mask { | |||
180 | MVM_DEBUGFS_BF_ENERGY_DELTA = BIT(0), | 202 | MVM_DEBUGFS_BF_ENERGY_DELTA = BIT(0), |
181 | MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA = BIT(1), | 203 | MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA = BIT(1), |
182 | MVM_DEBUGFS_BF_ROAMING_STATE = BIT(2), | 204 | MVM_DEBUGFS_BF_ROAMING_STATE = BIT(2), |
183 | MVM_DEBUGFS_BF_TEMPERATURE_DELTA = BIT(3), | 205 | MVM_DEBUGFS_BF_TEMP_THRESHOLD = BIT(3), |
184 | MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER = BIT(4), | 206 | MVM_DEBUGFS_BF_TEMP_FAST_FILTER = BIT(4), |
185 | MVM_DEBUGFS_BF_DEBUG_FLAG = BIT(5), | 207 | MVM_DEBUGFS_BF_TEMP_SLOW_FILTER = BIT(5), |
186 | MVM_DEBUGFS_BF_ESCAPE_TIMER = BIT(6), | 208 | MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER = BIT(6), |
187 | MVM_DEBUGFS_BA_ESCAPE_TIMER = BIT(7), | 209 | MVM_DEBUGFS_BF_DEBUG_FLAG = BIT(7), |
188 | MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT = BIT(8), | 210 | MVM_DEBUGFS_BF_ESCAPE_TIMER = BIT(8), |
211 | MVM_DEBUGFS_BA_ESCAPE_TIMER = BIT(9), | ||
212 | MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT = BIT(10), | ||
189 | }; | 213 | }; |
190 | 214 | ||
191 | struct iwl_dbgfs_bf { | 215 | struct iwl_dbgfs_bf { |
192 | u8 bf_energy_delta; | 216 | u32 bf_energy_delta; |
193 | u8 bf_roaming_energy_delta; | 217 | u32 bf_roaming_energy_delta; |
194 | u8 bf_roaming_state; | 218 | u32 bf_roaming_state; |
195 | u8 bf_temperature_delta; | 219 | u32 bf_temp_threshold; |
196 | u8 bf_enable_beacon_filter; | 220 | u32 bf_temp_fast_filter; |
197 | u8 bf_debug_flag; | 221 | u32 bf_temp_slow_filter; |
222 | u32 bf_enable_beacon_filter; | ||
223 | u32 bf_debug_flag; | ||
198 | u32 bf_escape_timer; | 224 | u32 bf_escape_timer; |
199 | u32 ba_escape_timer; | 225 | u32 ba_escape_timer; |
200 | u8 ba_enable_beacon_abort; | 226 | u32 ba_enable_beacon_abort; |
201 | int mask; | 227 | int mask; |
202 | }; | 228 | }; |
203 | #endif | 229 | #endif |
@@ -209,6 +235,21 @@ enum iwl_mvm_smps_type_request { | |||
209 | }; | 235 | }; |
210 | 236 | ||
211 | /** | 237 | /** |
238 | * struct iwl_mvm_vif_bf_data - beacon filtering related data | ||
239 | * @bf_enabled: indicates if beacon filtering is enabled | ||
240 | * @ba_enabled: indicated if beacon abort is enabled | ||
241 | * @last_beacon_signal: last beacon rssi signal in dbm | ||
242 | * @ave_beacon_signal: average beacon signal | ||
243 | * @last_cqm_event: rssi of the last cqm event | ||
244 | */ | ||
245 | struct iwl_mvm_vif_bf_data { | ||
246 | bool bf_enabled; | ||
247 | bool ba_enabled; | ||
248 | s8 ave_beacon_signal; | ||
249 | s8 last_cqm_event; | ||
250 | }; | ||
251 | |||
252 | /** | ||
212 | * struct iwl_mvm_vif - data per Virtual Interface, it is a MAC context | 253 | * struct iwl_mvm_vif - data per Virtual Interface, it is a MAC context |
213 | * @id: between 0 and 3 | 254 | * @id: between 0 and 3 |
214 | * @color: to solve races upon MAC addition and removal | 255 | * @color: to solve races upon MAC addition and removal |
@@ -233,8 +274,7 @@ struct iwl_mvm_vif { | |||
233 | bool uploaded; | 274 | bool uploaded; |
234 | bool ap_active; | 275 | bool ap_active; |
235 | bool monitor_active; | 276 | bool monitor_active; |
236 | /* indicate whether beacon filtering is enabled */ | 277 | struct iwl_mvm_vif_bf_data bf_data; |
237 | bool bf_enabled; | ||
238 | 278 | ||
239 | u32 ap_beacon_time; | 279 | u32 ap_beacon_time; |
240 | 280 | ||
@@ -268,7 +308,7 @@ struct iwl_mvm_vif { | |||
268 | 308 | ||
269 | #if IS_ENABLED(CONFIG_IPV6) | 309 | #if IS_ENABLED(CONFIG_IPV6) |
270 | /* IPv6 addresses for WoWLAN */ | 310 | /* IPv6 addresses for WoWLAN */ |
271 | struct in6_addr target_ipv6_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS]; | 311 | struct in6_addr target_ipv6_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_MAX]; |
272 | int num_target_ipv6_addrs; | 312 | int num_target_ipv6_addrs; |
273 | #endif | 313 | #endif |
274 | #endif | 314 | #endif |
@@ -402,6 +442,8 @@ struct iwl_mvm { | |||
402 | 442 | ||
403 | struct iwl_notif_wait_data notif_wait; | 443 | struct iwl_notif_wait_data notif_wait; |
404 | 444 | ||
445 | struct mvm_statistics_rx rx_stats; | ||
446 | |||
405 | unsigned long transport_queue_stop; | 447 | unsigned long transport_queue_stop; |
406 | u8 queue_to_mac80211[IWL_MAX_HW_QUEUES]; | 448 | u8 queue_to_mac80211[IWL_MAX_HW_QUEUES]; |
407 | atomic_t queue_stop_count[IWL_MAX_HW_QUEUES]; | 449 | atomic_t queue_stop_count[IWL_MAX_HW_QUEUES]; |
@@ -459,6 +501,9 @@ struct iwl_mvm { | |||
459 | */ | 501 | */ |
460 | u8 vif_count; | 502 | u8 vif_count; |
461 | 503 | ||
504 | /* -1 for always, 0 for never, >0 for that many times */ | ||
505 | s8 restart_fw; | ||
506 | |||
462 | struct led_classdev led; | 507 | struct led_classdev led; |
463 | 508 | ||
464 | struct ieee80211_vif *p2p_device_vif; | 509 | struct ieee80211_vif *p2p_device_vif; |
@@ -482,6 +527,8 @@ struct iwl_mvm { | |||
482 | /* Thermal Throttling and CTkill */ | 527 | /* Thermal Throttling and CTkill */ |
483 | struct iwl_mvm_tt_mgmt thermal_throttle; | 528 | struct iwl_mvm_tt_mgmt thermal_throttle; |
484 | s32 temperature; /* Celsius */ | 529 | s32 temperature; /* Celsius */ |
530 | |||
531 | const struct iwl_mvm_power_ops *pm_ops; | ||
485 | }; | 532 | }; |
486 | 533 | ||
487 | /* Extract MVM priv from op_mode and _hw */ | 534 | /* Extract MVM priv from op_mode and _hw */ |
@@ -525,6 +572,7 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, | |||
525 | enum ieee80211_band band); | 572 | enum ieee80211_band band); |
526 | u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); | 573 | u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); |
527 | void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm); | 574 | void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm); |
575 | void iwl_mvm_dump_sram(struct iwl_mvm *mvm); | ||
528 | u8 first_antenna(u8 mask); | 576 | u8 first_antenna(u8 mask); |
529 | u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx); | 577 | u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx); |
530 | 578 | ||
@@ -660,10 +708,26 @@ int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, | |||
660 | u8 flags, bool init); | 708 | u8 flags, bool init); |
661 | 709 | ||
662 | /* power managment */ | 710 | /* power managment */ |
663 | int iwl_mvm_power_update_mode(struct iwl_mvm *mvm, struct ieee80211_vif *vif); | 711 | static inline int iwl_mvm_power_update_mode(struct iwl_mvm *mvm, |
664 | int iwl_mvm_power_disable(struct iwl_mvm *mvm, struct ieee80211_vif *vif); | 712 | struct ieee80211_vif *vif) |
665 | void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 713 | { |
666 | struct iwl_powertable_cmd *cmd); | 714 | return mvm->pm_ops->power_update_mode(mvm, vif); |
715 | } | ||
716 | |||
717 | static inline int iwl_mvm_power_disable(struct iwl_mvm *mvm, | ||
718 | struct ieee80211_vif *vif) | ||
719 | { | ||
720 | return mvm->pm_ops->power_disable(mvm, vif); | ||
721 | } | ||
722 | |||
723 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
724 | static inline int iwl_mvm_power_dbgfs_read(struct iwl_mvm *mvm, | ||
725 | struct ieee80211_vif *vif, | ||
726 | char *buf, int bufsz) | ||
727 | { | ||
728 | return mvm->pm_ops->power_dbgfs_read(mvm, vif, buf, bufsz); | ||
729 | } | ||
730 | #endif | ||
667 | 731 | ||
668 | int iwl_mvm_leds_init(struct iwl_mvm *mvm); | 732 | int iwl_mvm_leds_init(struct iwl_mvm *mvm); |
669 | void iwl_mvm_leds_exit(struct iwl_mvm *mvm); | 733 | void iwl_mvm_leds_exit(struct iwl_mvm *mvm); |
@@ -707,6 +771,12 @@ int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, | |||
707 | struct ieee80211_vif *vif); | 771 | struct ieee80211_vif *vif); |
708 | int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, | 772 | int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, |
709 | struct ieee80211_vif *vif); | 773 | struct ieee80211_vif *vif); |
774 | int iwl_mvm_beacon_filter_send_cmd(struct iwl_mvm *mvm, | ||
775 | struct iwl_beacon_filter_cmd *cmd); | ||
776 | int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, | ||
777 | struct ieee80211_vif *vif, bool enable); | ||
778 | int iwl_mvm_update_beacon_filter(struct iwl_mvm *mvm, | ||
779 | struct ieee80211_vif *vif); | ||
710 | 780 | ||
711 | /* SMPS */ | 781 | /* SMPS */ |
712 | void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 782 | void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, |