Merge ath-next from ath.git
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / ath / ath10k / core.h
index 827b3d79ed0c97f5496b0de7064dccdd7b30dbbc..78094f23c9dd5264a66d32167680a8af8728a8ff 100644 (file)
@@ -284,15 +284,6 @@ struct ath10k_sta {
 #endif
 };
 
-struct ath10k_chanctx {
-       /* Used to story copy of chanctx_conf to avoid inconsistencies. Ideally
-        * mac80211 should allow some sort of explicit locking to guarantee
-        * that the publicly available chanctx_conf can be accessed safely at
-        * all times.
-        */
-       struct ieee80211_chanctx_conf conf;
-};
-
 #define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ)
 
 enum ath10k_beacon_state {
@@ -463,6 +454,14 @@ enum ath10k_fw_features {
        /* Don't trust error code from otp.bin */
        ATH10K_FW_FEATURE_IGNORE_OTP_RESULT,
 
+       /* Some firmware revisions pad 4th hw address to 4 byte boundary making
+        * it 8 bytes long in Native Wifi Rx decap.
+        */
+       ATH10K_FW_FEATURE_NO_NWIFI_DECAP_4ADDR_PADDING,
+
+       /* Firmware supports bypassing PLL setting on init. */
+       ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT = 9,
+
        /* keep last */
        ATH10K_FW_FEATURE_COUNT,
 };
@@ -572,6 +571,13 @@ struct ath10k {
                u32 patch_load_addr;
                int uart_pin;
 
+               /* This is true if given HW chip has a quirky Cycle Counter
+                * wraparound which resets to 0x7fffffff instead of 0. All
+                * other CC related counters (e.g. Rx Clear Count) are divided
+                * by 2 so they never wraparound themselves.
+                */
+               bool has_shifted_cc_wraparound;
+
                struct ath10k_hw_params_fw {
                        const char *dir;
                        const char *fw;
@@ -689,6 +695,14 @@ struct ath10k {
        u32 survey_last_cycle_count;
        struct survey_info survey[ATH10K_NUM_CHANS];
 
+       /* Channel info events are expected to come in pairs without and with
+        * COMPLETE flag set respectively for each channel visit during scan.
+        *
+        * However there are deviations from this rule. This flag is used to
+        * avoid reporting garbage data.
+        */
+       bool ch_info_can_report_survey;
+
        struct dfs_pattern_detector *dfs_detector;
 
        unsigned long tx_paused; /* see ATH10K_TX_PAUSE_ */