qmi: new current access technology logic
Submitted by Aleksander Morgado
Assigned to ModemManager bug user
Originally reported at: https://bugzilla.gnome.org/show_bug.cgi?id=697586 Please refer to the original bug report if more details are needed.
QMI modems have different ways to report access technology and signal strength. In particular, signal strength indications and responses will give values per-acccess technology (which we already expose in the new "Signal" interface).
But, the logic to compute which is the current access technology shoulnd't be based on which is the last one reported. Instead, we should be tracking these 3 items all the time:
- radio signal strengths on a per-radio (eg, GSM, UMTS, CDMA1x, EVDO, LTE) basis
- current data service capability if registered with a network
- current data bearer access technology if data is active
The new logic to compute current access tech would go as follows:
- If 3) given, that is already the result.
- If a bearer is connected, the last 3) value is given as result.
- If all bearers are disconnected, 2) will be available as a set of access techs, and the current one will be that with the higher strength reported in 1).