]> granicus.if.org Git - esp-idf/commitdiff
Reset WIFI mac when wifi start and update wifi lib
authorXiaXiaotian <xiaxiaotian@espressif.com>
Thu, 23 Mar 2017 03:33:46 +0000 (11:33 +0800)
committerXiaXiaotian <xiaxiaotian@espressif.com>
Thu, 23 Mar 2017 06:28:27 +0000 (14:28 +0800)
1. reset wifi mac when wifi start

2. roll back rx hung workaround for beacon timeout

3. fix amsdu ap interface wrong issue

4. fix amsdu header parse error

5. fix amsdu flag wrong issue

6. PHY: V350, fix BT rssi bug

7. RTC: V225, fix bt will be not work when wifi is reset

components/esp32/component.mk
components/esp32/include/esp_phy_init.h
components/esp32/ld/esp32.common.ld
components/esp32/lib
components/esp32/phy_init.c

index e7a88571ff8b2848d131077d463a1f31f7293f79..ae0f331cdcf9c5e7dff57f8d7683bd3617516dd4 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 COMPONENT_SRCDIRS := . hwcrypto
-LIBS := core rtc rtc_clk
+LIBS := core rtc rtc_clk rtc_pm
 ifdef CONFIG_PHY_ENABLED # BT || WIFI
 LIBS += phy coexist
 endif
index 9990957e2c7643e4621dee5645039fd4591a64b5..347d8acaca90d13dbe3281b7ca9bb88663c93377 100644 (file)
@@ -232,12 +232,11 @@ esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_da
  *                   function.
  * @param mode  Calibration mode (Full, partial, or no calibration)
  * @param[inout] calibration_data
- * @param is_sleep WiFi wakes up from sleep or not
  * @return ESP_OK on success.
  * @return ESP_FAIL on fail.
  */
 esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data,
-        esp_phy_calibration_mode_t mode, esp_phy_calibration_data_t* calibration_data, bool is_sleep);
+        esp_phy_calibration_mode_t mode, esp_phy_calibration_data_t* calibration_data);
 
 /**
  * @brief De-initialize PHY and RF module
index bc28e5ca99c9803c1cb0ab7e8f2f8cb8ce94a5ce..30fa04d1c498a985a64d2c2cfc11ea08764a0144 100644 (file)
@@ -84,6 +84,7 @@ SECTIONS
     *libphy.a:(.literal .text .literal.* .text.*)
     *librtc.a:(.literal .text .literal.* .text.*)
     *librtc_clk.a:(.literal .text .literal.* .text.*)
+    *librtc_pm.a:(.literal .text .literal.* .text.*)
     *libpp.a:pp.o(.literal .text .literal.* .text.*)
     *libpp.a:lmac.o(.literal .text .literal.* .text.*)
     *libpp.a:wdev.o(.literal .text .literal.* .text.*)
index c88869b1aca5a062d1ebc5e0199fd8720cb08710..a5287f9300491b423ffd30ba83e4e1cec6f96125 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c88869b1aca5a062d1ebc5e0199fd8720cb08710
+Subproject commit a5287f9300491b423ffd30ba83e4e1cec6f96125
index 5fbeeb7c88262d0ff635a156301b58560480c98e..fb11589162391b2dbd2c792b621416a1c2bab5b1 100644 (file)
@@ -41,24 +41,16 @@ static const char* TAG = "phy_init";
 
 /* Count value to indicate if there is peripheral that has initialized PHY and RF */
 static int s_phy_rf_init_count = 0;
-static bool s_mac_rst_flag = false;
 
 static _lock_t s_phy_rf_init_lock;
 
 esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data,
-        esp_phy_calibration_mode_t mode, esp_phy_calibration_data_t* calibration_data, bool is_sleep)
+        esp_phy_calibration_mode_t mode, esp_phy_calibration_data_t* calibration_data)
 {
     assert((s_phy_rf_init_count <= 1) && (s_phy_rf_init_count >= 0));
 
     _lock_acquire(&s_phy_rf_init_lock);
     if (s_phy_rf_init_count == 0) {
-        if (is_sleep == false) {
-            if (s_mac_rst_flag == false) {
-                s_mac_rst_flag = true;
-                REG_SET_BIT(DPORT_CORE_RST_EN_REG, DPORT_MAC_RST);
-                REG_CLR_BIT(DPORT_CORE_RST_EN_REG, DPORT_MAC_RST);
-            }
-        }
         // Enable WiFi peripheral clock
         SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_WIFI_EN | DPORT_WIFI_CLK_RNG_EN);
         ESP_LOGV(TAG, "register_chipv7_phy, init_data=%p, cal_data=%p, mode=%d",
@@ -289,7 +281,7 @@ void esp_phy_load_cal_and_init(void)
         calibration_mode = PHY_RF_CAL_FULL;
     }
 
-    esp_phy_rf_init(init_data, calibration_mode, cal_data, false);
+    esp_phy_rf_init(init_data, calibration_mode, cal_data);
 
     if (calibration_mode != PHY_RF_CAL_NONE && err != ESP_OK) {
         err = esp_phy_store_cal_data_to_nvs(cal_data);
@@ -299,7 +291,7 @@ void esp_phy_load_cal_and_init(void)
     esp_phy_release_init_data(init_data);
     free(cal_data); // PHY maintains a copy of calibration data, so we can free this
 #else
-    esp_phy_rf_init(NULL, PHY_RF_CAL_NONE, NULL, false);
+    esp_phy_rf_init(NULL, PHY_RF_CAL_NONE, NULL);
 #endif
 }