summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem/atutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atmodem/atutil.h')
-rw-r--r--drivers/atmodem/atutil.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/atmodem/atutil.h b/drivers/atmodem/atutil.h
index 9303ed4a..265a5ad4 100644
--- a/drivers/atmodem/atutil.h
+++ b/drivers/atmodem/atutil.h
@@ -55,6 +55,18 @@ static inline struct cb_data *cb_data_new(void *cb, void *data)
return ret;
}
+static inline int at_util_convert_signal_strength(int strength)
+{
+ int result;
+
+ if (strength == 99)
+ result = -1;
+ else
+ result = (strength * 100) / 31;
+
+ return result;
+}
+
#define DECLARE_FAILURE(e) \
struct ofono_error e; \
e.type = OFONO_ERROR_TYPE_FAILURE; \