diff options
author | Roshan Pius <rpius@google.com> | 2018-05-11 10:59:09 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-05-11 11:09:26 -0700 |
commit | 49ad9d4f0c52b44dcfce54bc594df902dda3df0c (patch) | |
tree | 3fd6571e9ef9f7186b0239f2a719cad7362a3bfb /service | |
parent | f9f970b1fa45d917adb3ff7bac12cf1c1e06bb8f (diff) |
WifiVendorHal: Change radio mode info parsing logic
Change the parsing logic based on clarification from the vendor.
Each RadioModeInfo instance represents a single
independently controllable hardware MAC at the chip level. So, for the
time sharing modes (SCC or MCC), the number of RadioModeInfo instances
will be 1 which represents the single active hardware MAC.
The previous parsing logic assumed that the time sharing modes will
contain 2 RadioModeInfo instances.
Bug: 78576621
Test: Modified Unit tests to meet new expectations.
Test: Manually verified the mode change callbacks with STA + AP.
Change-Id: I207cc1f1ec178eab1b797a5892cd0babe7a344e9
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiVendorHal.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java index 08d03d7de..d8fd62753 100644 --- a/service/java/com/android/server/wifi/WifiVendorHal.java +++ b/service/java/com/android/server/wifi/WifiVendorHal.java @@ -2965,13 +2965,12 @@ public class WifiVendorHal { mLog.e("Unexpected number of radio info in list " + radioModeInfoList.size()); return; } - // Not concurrency scenario, uninteresting... - if (radioModeInfoList.size() == 1) return; - RadioModeInfo radioModeInfo0 = radioModeInfoList.get(0); - RadioModeInfo radioModeInfo1 = radioModeInfoList.get(1); + RadioModeInfo radioModeInfo1 = + radioModeInfoList.size() == 2 ? radioModeInfoList.get(1) : null; // Number of ifaces on each radio should be equal. - if (radioModeInfo0.ifaceInfos.size() != radioModeInfo1.ifaceInfos.size()) { + if (radioModeInfo1 != null + && radioModeInfo0.ifaceInfos.size() != radioModeInfo1.ifaceInfos.size()) { mLog.e("Unexpected number of iface info in list " + radioModeInfo0.ifaceInfos.size() + ", " + radioModeInfo1.ifaceInfos.size()); @@ -2984,7 +2983,7 @@ public class WifiVendorHal { return; } // 2 ifaces simultaneous on 2 radios. - if (numIfacesOnEachRadio == 1) { + if (radioModeInfoList.size() == 2 && numIfacesOnEachRadio == 1) { // Iface on radio0 should be different from the iface on radio1 for DBS & SBS. if (areSameIfaceNames(radioModeInfo0.ifaceInfos, radioModeInfo1.ifaceInfos)) { mLog.e("Unexpected for both radio infos to have same iface"); @@ -2995,18 +2994,8 @@ public class WifiVendorHal { } else { handler.onSbs(radioModeInfo0.bandInfo); } - // 2 ifaces time sharing on 2 radios. - } else { - // Ifaces on radio0 & radio1 should be the same for MCC & SCC. - if (!areSameIfaces(radioModeInfo0.ifaceInfos, radioModeInfo1.ifaceInfos)) { - mLog.e("Unexpected for both radio infos to have different ifaces"); - return; - } - // Both radio0 & radio1 should now be in the same band (could be 5G or 2G). - if (radioModeInfo0.bandInfo != radioModeInfo1.bandInfo) { - mLog.e("Unexpected for both radio infos to have different band"); - return; - } + // 2 ifaces time sharing on 1 radio. + } else if (radioModeInfoList.size() == 1 && numIfacesOnEachRadio == 2) { IfaceInfo ifaceInfo0 = radioModeInfo0.ifaceInfos.get(0); IfaceInfo ifaceInfo1 = radioModeInfo0.ifaceInfos.get(1); if (ifaceInfo0.channel != ifaceInfo1.channel) { @@ -3014,6 +3003,8 @@ public class WifiVendorHal { } else { handler.onScc(radioModeInfo0.bandInfo); } + } else { + // Not concurrency scenario, uninteresting... } } } |