SelfRecovery: Add overlay for the recovery limit

Bug: 153395624
Test: atest com.android.server.wifi
Test: Manually crash wpa_supplicant from shell:
- Ensured that we restarted the stack the first 2 attempts.
- Ensured that we disabled wifi for all further attempts.

Change-Id: Iafcd193e373f7e6530446e69a927e2dd0056f402
diff --git a/service/res/values/config.xml b/service/res/values/config.xml
index 4d351b1..43d4a03 100644
--- a/service/res/values/config.xml
+++ b/service/res/values/config.xml
@@ -399,4 +399,9 @@
 
     <!-- Enable WPA2 to WPA3 auto-upgrade offload to capable Driver/Firmware -->
     <bool translatable="false" name="config_wifiSaeUpgradeOffloadEnabled">false</bool>
+
+    <!-- Number of self recoveries to be attempted per hour. Any fatal errors beyond this will
+         cause the wifi stack to turn wifi off and wait for user input.
+         Set to 0 to turn off recovery attempts and always turn off wifi on failures -->
+    <integer translatable="false" name="config_wifiMaxNativeFailureSelfRecoveryPerHour">2</integer>
 </resources>