2022-06-08 23:46:35 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#ifndef __RTW_EEPROM_H__
|
|
|
|
#define __RTW_EEPROM_H__
|
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
#include "osdep_service.h"
|
|
|
|
#include "drv_types.h"
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define HWSET_MAX_SIZE_512 512
|
|
|
|
|
2013-07-11 18:35:36 +00:00
|
|
|
struct eeprom_priv {
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 bautoload_fail_flag;
|
|
|
|
u8 bloadfile_fail_flag;
|
|
|
|
u8 bloadmac_fail_flag;
|
2022-06-08 23:46:35 +00:00
|
|
|
u8 mac_addr[ETH_ALEN] __aligned(2); /* PermanentAddress */
|
2013-05-08 21:45:39 +00:00
|
|
|
u16 channel_plan;
|
|
|
|
u8 EepromOrEfuse;
|
2014-11-13 17:03:55 +00:00
|
|
|
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512] __aligned(4);
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2013-08-15 03:03:17 +00:00
|
|
|
void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
|
|
|
|
u16 eeprom_read16(struct adapter *padapter, u16 reg);
|
|
|
|
void read_eeprom_content(struct adapter *padapter);
|
|
|
|
void eeprom_read_sz(struct adapter *adapt, u16 reg, u8 *data, u32 sz);
|
|
|
|
void read_eeprom_content_by_attrib(struct adapter *padapter);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
#endif /* __RTL871X_EEPROM_H__ */
|