Cache scan results per interface while preserving legacy attributes.
(self, interface, networks)
| 201 | is 2.4 GHz only. |
| 202 | |
| 203 | The payoff is that the AP never has to come down: hostapd keeps the |
| 204 | built-in radio while the dongle joins, scans and roams independently. |
| 205 | On a single-radio box this returns the same interface as the AP, and |
| 206 | behaviour is unchanged. |
| 207 | """ |
| 208 | # Cached briefly: this is consulted on every connection check, and the |
| 209 | # underlying lookup shells out to nmcli. |
| 210 | now = time.time() |
| 211 | if self._client_iface_cache and (now - self._client_iface_cache_ts) < 10.0: |
| 212 | return self._client_iface_cache |
| 213 | iface = self._find_secondary_wifi_interface() or self.default_wifi_interface |
| 214 | self._client_iface_cache = iface |
no test coverage detected