#include <linux/completion.h>
#include <linux/firmware.h>
#include <crypto/hash.h>
#include <crypto/sha1.h>
#include "s3fwrn5.h"
#include "firmware.h"
struct s3fwrn5_fw_version { … };
static int s3fwrn5_fw_send_msg(struct s3fwrn5_fw_info *fw_info,
struct sk_buff *msg, struct sk_buff **rsp)
{ … }
static int s3fwrn5_fw_prep_msg(struct s3fwrn5_fw_info *fw_info,
struct sk_buff **msg, u8 type, u8 code, const void *data, u16 len)
{ … }
static int s3fwrn5_fw_get_bootinfo(struct s3fwrn5_fw_info *fw_info,
struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo)
{ … }
static int s3fwrn5_fw_enter_update_mode(struct s3fwrn5_fw_info *fw_info,
const void *hash_data, u16 hash_size,
const void *sig_data, u16 sig_size)
{ … }
static int s3fwrn5_fw_update_sector(struct s3fwrn5_fw_info *fw_info,
u32 base_addr, const void *data)
{ … }
static int s3fwrn5_fw_complete_update_mode(struct s3fwrn5_fw_info *fw_info)
{ … }
#define S3FWRN5_FW_IMAGE_HEADER_SIZE …
int s3fwrn5_fw_request_firmware(struct s3fwrn5_fw_info *fw_info)
{ … }
static void s3fwrn5_fw_release_firmware(struct s3fwrn5_fw_info *fw_info)
{ … }
static int s3fwrn5_fw_get_base_addr(
struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo, u32 *base_addr)
{ … }
static inline bool
s3fwrn5_fw_is_custom(const struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo)
{ … }
int s3fwrn5_fw_setup(struct s3fwrn5_fw_info *fw_info)
{ … }
bool s3fwrn5_fw_check_version(const struct s3fwrn5_fw_info *fw_info, u32 version)
{ … }
int s3fwrn5_fw_download(struct s3fwrn5_fw_info *fw_info)
{ … }
void s3fwrn5_fw_init(struct s3fwrn5_fw_info *fw_info, const char *fw_name)
{ … }
void s3fwrn5_fw_cleanup(struct s3fwrn5_fw_info *fw_info)
{ … }
int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
{ … }