blob: f6b07bd0270266d73f4d7f2b5d8a9b825c7bda6d [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include <zircon/types.h>
#include <vector>
#include "src/iwlwifi/iwl-trans.h"
#include "src/iwlwifi/test/sim.h"
namespace wlan::testing {
// A sub-module of simulated MVM firmware that simulates NVM behavior.
class SimNvm {
explicit SimNvm() {}
~SimNvm() {}
// Handle the NVM_ACCESS_CMD host command.
// Args:
// cmd: the input command.
// [out] resp: the response back to caller.
zx_status_t HandleCommand(struct iwl_host_cmd* cmd, SimMvmResponse* resp);
// Read a chunk from a segment (aka type).
// Args:
// target: enum iwl_nvm_access_target
// type: enum iwl_nvm_section_type, aka section in driver.
// offset: starting offset to read
// length: num of bytes to read
std::vector<uint8_t> HandleChunkRead(uint8_t target, uint16_t type, uint16_t offset,
uint16_t length);
} // namespace wlan::testing