Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 1 | #include "headers.h" |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Procedure: vendorextnGetSectionInfo |
| 4 | * |
| 5 | * Description: Finds the type of NVM used. |
| 6 | * |
| 7 | * Arguments: |
| 8 | * Adapter - ptr to Adapter object instance |
| 9 | * pNVMType - ptr to NVM type. |
| 10 | * Returns: |
| 11 | * STATUS_SUCCESS/STATUS_FAILURE |
| 12 | * |
| 13 | */ |
Kevin McKinney | 2fe119f | 2012-12-01 01:15:53 -0500 | [diff] [blame] | 14 | INT vendorextnGetSectionInfo(PVOID pContext, struct bcm_flash2x_vendor_info *pVendorInfo) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 15 | { |
| 16 | return STATUS_FAILURE; |
| 17 | } |
| 18 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 19 | /* |
| 20 | * Procedure: vendorextnInit |
| 21 | * |
| 22 | * Description: Initializing the vendor extension NVM interface |
| 23 | * |
| 24 | * Arguments: |
| 25 | * Adapter - Pointer to MINI Adapter Structure |
| 26 | * Returns: |
| 27 | * STATUS_SUCCESS/STATUS_FAILURE |
| 28 | * |
| 29 | * |
| 30 | */ |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 31 | INT vendorextnInit(struct bcm_mini_adapter *Adapter) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 32 | { |
| 33 | return STATUS_SUCCESS; |
| 34 | } |
| 35 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 36 | /* |
| 37 | * Procedure: vendorextnExit |
| 38 | * |
| 39 | * Description: Free the resource associated with vendor extension NVM interface |
| 40 | * |
| 41 | * Arguments: |
| 42 | * |
| 43 | * Returns: |
| 44 | * STATUS_SUCCESS/STATUS_FAILURE |
| 45 | * |
| 46 | * |
| 47 | */ |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 48 | INT vendorextnExit(struct bcm_mini_adapter *Adapter) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 49 | { |
| 50 | return STATUS_SUCCESS; |
| 51 | } |
| 52 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 53 | /* |
| 54 | * Procedure: vendorextnIoctl |
| 55 | * |
| 56 | * Description: execute the vendor extension specific ioctl |
| 57 | * |
| 58 | * Arguments: |
| 59 | * Adapter -Beceem private Adapter Structure |
| 60 | * cmd -vendor extension specific Ioctl commad |
| 61 | * arg -input parameter sent by vendor |
| 62 | * |
| 63 | * Returns: |
| 64 | * CONTINUE_COMMON_PATH in case it is not meant to be processed by vendor ioctls |
| 65 | * STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL return value |
| 66 | */ |
| 67 | |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 68 | INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 69 | { |
| 70 | return CONTINUE_COMMON_PATH; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 75 | /* |
| 76 | * Procedure: vendorextnReadSection |
| 77 | * |
| 78 | * Description: Reads from a section of NVM |
| 79 | * |
| 80 | * Arguments: |
| 81 | * pContext - ptr to Adapter object instance |
| 82 | * pBuffer - Read the data from Vendor Area to this buffer |
| 83 | * SectionVal - Value of type of Section |
| 84 | * Offset - Read from the Offset of the Vendor Section. |
| 85 | * numOfBytes - Read numOfBytes from the Vendor section to Buffer |
| 86 | * |
| 87 | * Returns: |
| 88 | * STATUS_SUCCESS/STATUS_FAILURE |
| 89 | */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 90 | |
Kevin McKinney | ff4e065 | 2012-11-22 14:48:50 -0500 | [diff] [blame] | 91 | INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 92 | UINT offset, UINT numOfBytes) |
| 93 | { |
| 94 | return STATUS_FAILURE; |
| 95 | } |
| 96 | |
| 97 | |
| 98 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 99 | /* |
| 100 | * Procedure: vendorextnWriteSection |
| 101 | * |
| 102 | * Description: Write to a Section of NVM |
| 103 | * |
| 104 | * Arguments: |
| 105 | * pContext - ptr to Adapter object instance |
| 106 | * pBuffer - Write the data provided in the buffer |
| 107 | * SectionVal - Value of type of Section |
| 108 | * Offset - Writes to the Offset of the Vendor Section. |
| 109 | * numOfBytes - Write num Bytes after reading from pBuffer. |
| 110 | * bVerify - the Buffer Written should be verified. |
| 111 | * |
| 112 | * Returns: |
| 113 | * STATUS_SUCCESS/STATUS_FAILURE |
| 114 | */ |
Kevin McKinney | ff4e065 | 2012-11-22 14:48:50 -0500 | [diff] [blame] | 115 | INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 116 | UINT offset, UINT numOfBytes, bool bVerify) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 117 | { |
| 118 | return STATUS_FAILURE; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | |
Severin Gsponer | e4476d5 | 2013-05-22 02:13:58 +0200 | [diff] [blame] | 123 | /* |
| 124 | * Procedure: vendorextnWriteSectionWithoutErase |
| 125 | * |
| 126 | * Description: Write to a Section of NVM without erasing the sector |
| 127 | * |
| 128 | * Arguments: |
| 129 | * pContext - ptr to Adapter object instance |
| 130 | * pBuffer - Write the data provided in the buffer |
| 131 | * SectionVal - Value of type of Section |
| 132 | * Offset - Writes to the Offset of the Vendor Section. |
| 133 | * numOfBytes - Write num Bytes after reading from pBuffer. |
| 134 | * |
| 135 | * Returns: |
| 136 | * STATUS_SUCCESS/STATUS_FAILURE |
| 137 | */ |
Kevin McKinney | ff4e065 | 2012-11-22 14:48:50 -0500 | [diff] [blame] | 138 | INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 139 | UINT offset, UINT numOfBytes) |
| 140 | { |
| 141 | return STATUS_FAILURE; |
| 142 | } |