Merge "WiFi: Basic support for 11be"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9aaf48a2c4
@@ -42,8 +42,10 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
private boolean m80211nSupported;
|
||||
private boolean m80211acSupported;
|
||||
private boolean m80211axSupported;
|
||||
private boolean m80211beSupported;
|
||||
private boolean mChannelWidth160MhzSupported;
|
||||
private boolean mChannelWidth80p80MhzSupported;
|
||||
private boolean mChannelWidth320MhzSupported;
|
||||
private int mMaxNumberTxSpatialStreams;
|
||||
private int mMaxNumberRxSpatialStreams;
|
||||
|
||||
@@ -53,8 +55,10 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
m80211nSupported = false;
|
||||
m80211acSupported = false;
|
||||
m80211axSupported = false;
|
||||
m80211beSupported = false;
|
||||
mChannelWidth160MhzSupported = false;
|
||||
mChannelWidth80p80MhzSupported = false;
|
||||
mChannelWidth320MhzSupported = false;
|
||||
mMaxNumberTxSpatialStreams = 1;
|
||||
mMaxNumberRxSpatialStreams = 1;
|
||||
}
|
||||
@@ -76,6 +80,8 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
return m80211acSupported;
|
||||
case ScanResult.WIFI_STANDARD_11AX:
|
||||
return m80211axSupported;
|
||||
case ScanResult.WIFI_STANDARD_11BE:
|
||||
return m80211beSupported;
|
||||
default:
|
||||
Log.e(TAG, "isWifiStandardSupported called with invalid standard: " + standard);
|
||||
return false;
|
||||
@@ -100,6 +106,9 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
case ScanResult.WIFI_STANDARD_11AX:
|
||||
m80211axSupported = support;
|
||||
break;
|
||||
case ScanResult.WIFI_STANDARD_11BE:
|
||||
m80211beSupported = support;
|
||||
break;
|
||||
default:
|
||||
Log.e(TAG, "setWifiStandardSupport called with invalid standard: " + standard);
|
||||
}
|
||||
@@ -117,13 +126,16 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
case ScanResult.CHANNEL_WIDTH_20MHZ:
|
||||
return true;
|
||||
case ScanResult.CHANNEL_WIDTH_40MHZ:
|
||||
return (m80211nSupported || m80211acSupported || m80211axSupported);
|
||||
return (m80211nSupported || m80211acSupported || m80211axSupported
|
||||
|| m80211beSupported);
|
||||
case ScanResult.CHANNEL_WIDTH_80MHZ:
|
||||
return (m80211acSupported || m80211axSupported);
|
||||
return (m80211acSupported || m80211axSupported || m80211beSupported);
|
||||
case ScanResult.CHANNEL_WIDTH_160MHZ:
|
||||
return mChannelWidth160MhzSupported;
|
||||
case ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
|
||||
return mChannelWidth80p80MhzSupported;
|
||||
case ScanResult.CHANNEL_WIDTH_320MHZ:
|
||||
return mChannelWidth320MhzSupported;
|
||||
default:
|
||||
Log.e(TAG, "isChannelWidthSupported called with invalid channel width: " + chWidth);
|
||||
}
|
||||
@@ -133,8 +145,9 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
/**
|
||||
* Set support for channel bandwidth
|
||||
*
|
||||
* @param chWidth valid values are {@link ScanResult#CHANNEL_WIDTH_160MHZ} and
|
||||
* {@link ScanResult#CHANNEL_WIDTH_80MHZ_PLUS_MHZ}
|
||||
* @param chWidth valid values are {@link ScanResult#CHANNEL_WIDTH_160MHZ},
|
||||
* {@link ScanResult#CHANNEL_WIDTH_80MHZ_PLUS_MHZ} and
|
||||
* {@link ScanResult#CHANNEL_WIDTH_320MHZ}
|
||||
* @param support {@code true} if supported, {@code false} otherwise.
|
||||
*
|
||||
* @hide
|
||||
@@ -147,6 +160,9 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
case ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
|
||||
mChannelWidth80p80MhzSupported = support;
|
||||
break;
|
||||
case ScanResult.CHANNEL_WIDTH_320MHZ:
|
||||
mChannelWidth320MhzSupported = support;
|
||||
break;
|
||||
default:
|
||||
Log.e(TAG, "setChannelWidthSupported called with Invalid channel width: "
|
||||
+ chWidth);
|
||||
@@ -205,8 +221,10 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
return m80211nSupported == capa.m80211nSupported
|
||||
&& m80211acSupported == capa.m80211acSupported
|
||||
&& m80211axSupported == capa.m80211axSupported
|
||||
&& m80211beSupported == capa.m80211beSupported
|
||||
&& mChannelWidth160MhzSupported == capa.mChannelWidth160MhzSupported
|
||||
&& mChannelWidth80p80MhzSupported == capa.mChannelWidth80p80MhzSupported
|
||||
&& mChannelWidth320MhzSupported == capa.mChannelWidth320MhzSupported
|
||||
&& mMaxNumberTxSpatialStreams == capa.mMaxNumberTxSpatialStreams
|
||||
&& mMaxNumberRxSpatialStreams == capa.mMaxNumberRxSpatialStreams;
|
||||
}
|
||||
@@ -215,8 +233,9 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(m80211nSupported, m80211acSupported, m80211axSupported,
|
||||
mChannelWidth160MhzSupported, mChannelWidth80p80MhzSupported,
|
||||
mMaxNumberTxSpatialStreams, mMaxNumberRxSpatialStreams);
|
||||
m80211beSupported, mChannelWidth160MhzSupported, mChannelWidth80p80MhzSupported,
|
||||
mChannelWidth320MhzSupported, mMaxNumberTxSpatialStreams,
|
||||
mMaxNumberRxSpatialStreams);
|
||||
}
|
||||
|
||||
/** implement Parcelable interface */
|
||||
@@ -234,8 +253,10 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
out.writeBoolean(m80211nSupported);
|
||||
out.writeBoolean(m80211acSupported);
|
||||
out.writeBoolean(m80211axSupported);
|
||||
out.writeBoolean(m80211beSupported);
|
||||
out.writeBoolean(mChannelWidth160MhzSupported);
|
||||
out.writeBoolean(mChannelWidth80p80MhzSupported);
|
||||
out.writeBoolean(mChannelWidth320MhzSupported);
|
||||
out.writeInt(mMaxNumberTxSpatialStreams);
|
||||
out.writeInt(mMaxNumberRxSpatialStreams);
|
||||
}
|
||||
@@ -246,10 +267,13 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
sb.append("m80211nSupported:").append(m80211nSupported ? "Yes" : "No");
|
||||
sb.append("m80211acSupported:").append(m80211acSupported ? "Yes" : "No");
|
||||
sb.append("m80211axSupported:").append(m80211axSupported ? "Yes" : "No");
|
||||
sb.append("m80211beSupported:").append(m80211beSupported ? "Yes" : "No");
|
||||
sb.append("mChannelWidth160MhzSupported: ")
|
||||
.append(mChannelWidth160MhzSupported ? "Yes" : "No");
|
||||
sb.append("mChannelWidth80p80MhzSupported: ")
|
||||
.append(mChannelWidth80p80MhzSupported ? "Yes" : "No");
|
||||
sb.append("mChannelWidth320MhzSupported: ")
|
||||
.append(mChannelWidth320MhzSupported ? "Yes" : "No");
|
||||
sb.append("mMaxNumberTxSpatialStreams: ").append(mMaxNumberTxSpatialStreams);
|
||||
sb.append("mMaxNumberRxSpatialStreams: ").append(mMaxNumberRxSpatialStreams);
|
||||
|
||||
@@ -268,8 +292,10 @@ public final class DeviceWiphyCapabilities implements Parcelable {
|
||||
capabilities.m80211nSupported = in.readBoolean();
|
||||
capabilities.m80211acSupported = in.readBoolean();
|
||||
capabilities.m80211axSupported = in.readBoolean();
|
||||
capabilities.m80211beSupported = in.readBoolean();
|
||||
capabilities.mChannelWidth160MhzSupported = in.readBoolean();
|
||||
capabilities.mChannelWidth80p80MhzSupported = in.readBoolean();
|
||||
capabilities.mChannelWidth320MhzSupported = in.readBoolean();
|
||||
capabilities.mMaxNumberTxSpatialStreams = in.readInt();
|
||||
capabilities.mMaxNumberRxSpatialStreams = in.readInt();
|
||||
return capabilities;
|
||||
|
||||
@@ -493,6 +493,8 @@ public class WifiNl80211Manager {
|
||||
return SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
|
||||
case IApInterfaceEventCallback.BANDWIDTH_160:
|
||||
return SoftApInfo.CHANNEL_WIDTH_160MHZ;
|
||||
case IApInterfaceEventCallback.BANDWIDTH_320:
|
||||
return SoftApInfo.CHANNEL_WIDTH_320MHZ;
|
||||
default:
|
||||
return SoftApInfo.CHANNEL_WIDTH_INVALID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user