src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/pcie/pcie_firmware.cc
// Adjust the buscore RAM size, according to the firmware binary.
Adjust the buscore RAM size, according to the firmware binary.
Adjust the buscore RAM size according to the firmware binary .
void AdjustBuscoreRamsize(std::string_view firmware, PcieBuscore* buscore) {
  if (firmware.size() < kFirmwareRamsizeOffset + 8) {
    return;
  }
  if (std::memcmp(firmware.data() + kFirmwareRamsizeOffset, &kFirmwareRamsizeMagic,
                  sizeof(kFirmwareRamsizeMagic)) != 0) {
    return;
  }
  uint32_t ramsize = 0;
  std::memcpy(&ramsize, firmware.data() + kFirmwareRamsizeOffset + sizeof(kFirmwareRamsizeMagic),
              sizeof(ramsize));
  buscore->SetRamsize(ramsize);
}
void AdjustBuscoreRamsize ( std :: string_view firmware , PcieBuscore * buscore ) { if ( firmware . size ( ) < kFirmwareRamsizeOffset + 8 ) { return ; } if ( std :: memcmp ( firmware . data ( ) + kFirmwareRamsizeOffset , & kFirmwareRamsizeMagic , sizeof ( kFirmwareRamsizeMagic ) ) != 0 ) { return ; } uint32_t ramsize = 0 ; std :: memcpy ( & ramsize , firmware . data ( ) + kFirmwareRamsizeOffset + sizeof ( kFirmwareRamsizeMagic ) , sizeof ( ramsize ) ) ; buscore -> SetRamsize ( ramsize ) ; }
Adjust the buscore RAM size, according to the firmware binary.
Adjust the buscore RAM size according to the firmware binary .