diff options
| author | Yang You (UU) <[email protected]> | 2025-11-20 11:45:37 -0800 |
|---|---|---|
| committer | Yang You (UU) <[email protected]> | 2025-11-20 11:45:37 -0800 |
| commit | dd61a12239a771573bc87117119eceb082b9762b (patch) | |
| tree | 217d018bd8e0132a97a7515a19e8674e9601b87c /network/wlan/WIFICX/drivercode/adapter.cpp | |
| parent | 25de639a793266bde0116816b86f8ada28808186 (diff) | |
have the Infrastructure ready to have the driver install success and able to start handling the WifiRequest
Diffstat (limited to 'network/wlan/WIFICX/drivercode/adapter.cpp')
| -rw-r--r-- | network/wlan/WIFICX/drivercode/adapter.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/network/wlan/WIFICX/drivercode/adapter.cpp b/network/wlan/WIFICX/drivercode/adapter.cpp index f532ae02..958f69ea 100644 --- a/network/wlan/WIFICX/drivercode/adapter.cpp +++ b/network/wlan/WIFICX/drivercode/adapter.cpp @@ -27,20 +27,24 @@ NTSTATUS WifiIhvAdapterStart(NETADAPTER netAdapter) { TraceEntry(); - ULONG64 maxXmitLinkSpeed = WIFI_MEDIA_MAX_SPEED; - ULONG64 maxRcvLinkSpeed = WIFI_MEDIA_MAX_SPEED; - - NET_ADAPTER_LINK_LAYER_CAPABILITIES linkLayerCapabilities; - NET_ADAPTER_LINK_LAYER_CAPABILITIES_INIT(&linkLayerCapabilities, maxXmitLinkSpeed, maxRcvLinkSpeed); - - NetAdapterSetLinkLayerCapabilities(netAdapter, &linkLayerCapabilities); - - NetAdapterSetLinkLayerMtuSize(netAdapter, WIFI_MAX_PACKET_SIZE); - static WDI_MAC_ADDRESS STAAddress = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05}; NET_ADAPTER_LINK_LAYER_ADDRESS permanentLinkLayerAddress; NET_ADAPTER_LINK_LAYER_ADDRESS_INIT(&permanentLinkLayerAddress, sizeof(WDI_MAC_ADDRESS), STAAddress.Address); + NetAdapterSetCurrentLinkLayerAddress(netAdapter, &permanentLinkLayerAddress); NetAdapterSetPermanentLinkLayerAddress(netAdapter, &permanentLinkLayerAddress); + + // Sample Phase 1 has no datapath support, so setting those values to the default one. + NET_ADAPTER_TX_CAPABILITIES txCaps; + NET_ADAPTER_RX_CAPABILITIES rxCaps; + NET_ADAPTER_LINK_LAYER_CAPABILITIES linkLayerCaps; + + NET_ADAPTER_TX_CAPABILITIES_INIT(&txCaps, 1); + NET_ADAPTER_RX_CAPABILITIES_INIT_SYSTEM_MANAGED(&rxCaps, 1514, 1); + NET_ADAPTER_LINK_LAYER_CAPABILITIES_INIT(&linkLayerCaps, 0, 0); + + NetAdapterSetLinkLayerMtuSize(netAdapter, 1500); + NetAdapterSetLinkLayerCapabilities(netAdapter, &linkLayerCaps); + NetAdapterSetDataPathCapabilities(netAdapter, &txCaps, &rxCaps); WIFI_ADAPTER_WAKE_CAPABILITIES wakeCap{}; WIFI_ADAPTER_WAKE_CAPABILITIES_INIT(&wakeCap); |
