Add one more boundary check of maxNumSpatialStream
Due to the missing NL80211 PHY attribute parsing and incorrect
initialization of BandInfo in wificond, throughputPredictor's
maxNumSpatialStream is set to 0 which results in 0 Mbps throughput
To avoid similar issue due to incorrect implementation of wificond
or WifiHAL, add a safety check in throughputPredictor to ensure
maxNumSpatialStream >= 1.
Bug: 149415717
Test: atest com.android.server.wifi
Change-Id: Ib19a897d3fadfe4f43bbfa2522b2f971ea90f588
2 files changed