diff --git a/jni/android_hardware_fm.cpp b/jni/android_hardware_fm.cpp
index 622d4e9..bf0b1a5 100644
--- a/jni/android_hardware_fm.cpp
+++ b/jni/android_hardware_fm.cpp
@@ -81,11 +81,6 @@
     SCAN_DN
 };
 
-enum fm_prop_t {
-    FMWAN_RATCONF,
-    FMBTWLAN_LPFENABLER
-};
-
 static JavaVM *g_jVM = NULL;
 
 namespace android {
@@ -1252,26 +1247,6 @@
     return ret;
 }
 
-static jint android_hardware_fmradio_FmReceiverJNI_getFmCoexPropNative
-(JNIEnv * env, jobject thiz, jint fd, jint prop)
-{
-    jint ret;
-    int property = (int)prop;
-    char value[PROPERTY_VALUE_MAX] = {'\0'};
-
-    if (property == FMWAN_RATCONF) {
-        get_property(FM_PROP_WAN_RATCONF, value);
-    } else if (property == FMBTWLAN_LPFENABLER) {
-        get_property(FM_PROP_BTWLAN_LPFENABLER, value);
-    } else {
-        ALOGE("%s: invalid get property prop = %d\n", __func__, property);
-    }
-
-    ret = atoi(value);
-    ALOGI("%d:: ret  = %d",property, ret);
-    return ret;
-}
-
 static jint android_hardware_fmradio_FmReceiverJNI_enableSoftMuteNative
  (JNIEnv * env, jobject thiz, jint fd, jint val)
 {
@@ -1441,8 +1416,6 @@
              (void*) android_hardware_fmradio_FmReceiverJNI_getSocNameNative},
         {"getFmStatsPropNative", "()Z",
              (void*) android_hardware_fmradio_FmReceiverJNI_getFmStatsPropNative},
-        { "getFmCoexPropNative", "(II)I",
-            (void*)android_hardware_fmradio_FmReceiverJNI_getFmCoexPropNative},
 };
 
 int register_android_hardware_fm_fmradio(JNIEnv* env)
diff --git a/qcom/fmradio/FmReceiver.java b/qcom/fmradio/FmReceiver.java
index b7c1613..39974d6 100644
--- a/qcom/fmradio/FmReceiver.java
+++ b/qcom/fmradio/FmReceiver.java
@@ -343,13 +343,6 @@
    private static final int SEARCH_MPXDCC = 0;
    private static final int SEARCH_SINR_INT = 1;
 
-   /**
-    * Fm Coex property type
-    */
-   private static final int WAN_RATCONF = 0;
-   private static final int BTWLAN_LPFENABLER = 1;
-
-
    public boolean isSmdTransportLayer() {
        String chip = getSocName();
        if (chip.equals("pronto"))
@@ -409,7 +402,7 @@
            if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(intent.getAction())) {
                int newState = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
                        WifiManager.WIFI_STATE_UNKNOWN);
-               int mBtWlanLpf = getFmWanWlanCoexProp(BTWLAN_LPFENABLER);
+               int mBtWlanLpf = SystemProperties.getInt("persist.btwlan.lpfenabler", 0);
                if (newState == WifiManager.WIFI_STATE_ENABLED) {
                    Log.d (TAG, "enable LPF on wifi enabled " + newState);
                    if ((mBtWlanLpf & mIsWlanLpfEnabled) == mIsWlanLpfEnabled)
@@ -2962,7 +2955,7 @@
      return;
    }
    public void FMcontrolLowPassFilter(int state, int net_type, int enable) {
-       int RatConf = getFmWanWlanCoexProp(WAN_RATCONF);
+       int RatConf = SystemProperties.getInt("persist.fm_wan.ratconf", 0);
        Log.v (TAG, "FMcontrolLowPassFilter " + RatConf);
        switch (net_type)
        {
@@ -3103,8 +3096,4 @@
    public boolean getFmStatsProp() {
      return FmReceiverJNI.getFmStatsPropNative();
    }
-
-   public int getFmWanWlanCoexProp(int property) {
-     return FmReceiverJNI.getFmCoexPropNative(sFd, property);
-   }
 }
diff --git a/qcom/fmradio/FmReceiverJNI.java b/qcom/fmradio/FmReceiverJNI.java
index 86a7df7..937027e 100644
--- a/qcom/fmradio/FmReceiverJNI.java
+++ b/qcom/fmradio/FmReceiverJNI.java
@@ -494,5 +494,4 @@
     static native int enableSoftMute(int fd, int val);
     static native String getSocNameNative();
     static native boolean getFmStatsPropNative();
-    static native int getFmCoexPropNative(int fd, int property);
 }
