#!/bin/sh

# Because cpiread is so expensive, collapse into a single read and cache the results
WIFI_CP_CACHED_FILE="/tmp/wifi_cp_cached"
if [ ! -f "$WIFI_CP_CACHED_FILE" ]; then
    cpiread -q \
        "flags/MODEL_HAS_DUAL_WIFI" \
        "info/PID" \
        "wifi/adaptivity" \
        "platform_type" \
        2>/dev/null | tail -n4 1>$WIFI_CP_CACHED_FILE
fi
