您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ath9k_eeprom.c 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /*
  2. * Copyright (c) 2008-2011 Atheros Communications Inc.
  3. *
  4. * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
  5. * Original from Linux kernel 3.0.1
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for any
  8. * purpose with or without fee is hereby granted, provided that the above
  9. * copyright notice and this permission notice appear in all copies.
  10. *
  11. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  12. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  13. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  14. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  15. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  16. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  17. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #include <ipxe/io.h>
  20. #include "hw.h"
  21. static inline u16 ath9k_hw_fbin2freq(u8 fbin, int is2GHz)
  22. {
  23. if (fbin == AR5416_BCHAN_UNUSED)
  24. return fbin;
  25. return (u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
  26. }
  27. void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val)
  28. {
  29. REG_WRITE(ah, reg, val);
  30. if (ah->config.analog_shiftreg)
  31. udelay(100);
  32. }
  33. void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask,
  34. u32 shift, u32 val)
  35. {
  36. u32 regVal;
  37. regVal = REG_READ(ah, reg) & ~mask;
  38. regVal |= (val << shift) & mask;
  39. REG_WRITE(ah, reg, regVal);
  40. if (ah->config.analog_shiftreg)
  41. udelay(100);
  42. }
  43. int16_t ath9k_hw_interpolate(u16 target, u16 srcLeft, u16 srcRight,
  44. int16_t targetLeft, int16_t targetRight)
  45. {
  46. int16_t rv;
  47. if (srcRight == srcLeft) {
  48. rv = targetLeft;
  49. } else {
  50. rv = (int16_t) (((target - srcLeft) * targetRight +
  51. (srcRight - target) * targetLeft) /
  52. (srcRight - srcLeft));
  53. }
  54. return rv;
  55. }
  56. int ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize,
  57. u16 *indexL, u16 *indexR)
  58. {
  59. u16 i;
  60. if (target <= pList[0]) {
  61. *indexL = *indexR = 0;
  62. return 1;
  63. }
  64. if (target >= pList[listSize - 1]) {
  65. *indexL = *indexR = (u16) (listSize - 1);
  66. return 1;
  67. }
  68. for (i = 0; i < listSize - 1; i++) {
  69. if (pList[i] == target) {
  70. *indexL = *indexR = i;
  71. return 1;
  72. }
  73. if (target < pList[i + 1]) {
  74. *indexL = i;
  75. *indexR = (u16) (i + 1);
  76. return 0;
  77. }
  78. }
  79. return 0;
  80. }
  81. void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,
  82. int eep_start_loc, int size)
  83. {
  84. int i = 0, j, addr;
  85. u32 addrdata[8];
  86. u32 data[8];
  87. for (addr = 0; addr < size; addr++) {
  88. addrdata[i] = AR5416_EEPROM_OFFSET +
  89. ((addr + eep_start_loc) << AR5416_EEPROM_S);
  90. i++;
  91. if (i == 8) {
  92. REG_READ_MULTI(ah, addrdata, data, i);
  93. for (j = 0; j < i; j++) {
  94. *eep_data = data[j];
  95. eep_data++;
  96. }
  97. i = 0;
  98. }
  99. }
  100. if (i != 0) {
  101. REG_READ_MULTI(ah, addrdata, data, i);
  102. for (j = 0; j < i; j++) {
  103. *eep_data = data[j];
  104. eep_data++;
  105. }
  106. }
  107. }
  108. int ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
  109. {
  110. return common->bus_ops->eeprom_read(common, off, data);
  111. }
  112. void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,
  113. u8 *pVpdList, u16 numIntercepts,
  114. u8 *pRetVpdList)
  115. {
  116. u16 i, k;
  117. u8 currPwr = pwrMin;
  118. u16 idxL = 0, idxR = 0;
  119. for (i = 0; i <= (pwrMax - pwrMin) / 2; i++) {
  120. ath9k_hw_get_lower_upper_index(currPwr, pPwrList,
  121. numIntercepts, &(idxL),
  122. &(idxR));
  123. if (idxR < 1)
  124. idxR = 1;
  125. if (idxL == numIntercepts - 1)
  126. idxL = (u16) (numIntercepts - 2);
  127. if (pPwrList[idxL] == pPwrList[idxR])
  128. k = pVpdList[idxL];
  129. else
  130. k = (u16)(((currPwr - pPwrList[idxL]) * pVpdList[idxR] +
  131. (pPwrList[idxR] - currPwr) * pVpdList[idxL]) /
  132. (pPwrList[idxR] - pPwrList[idxL]));
  133. pRetVpdList[i] = (u8) k;
  134. currPwr += 2;
  135. }
  136. }
  137. void ath9k_hw_get_legacy_target_powers(struct ath_hw *ah,
  138. struct ath9k_channel *chan,
  139. struct cal_target_power_leg *powInfo,
  140. u16 numChannels,
  141. struct cal_target_power_leg *pNewPower,
  142. u16 numRates, int isExtTarget)
  143. {
  144. struct chan_centers centers;
  145. u16 clo, chi;
  146. int i;
  147. int matchIndex = -1, lowIndex = -1;
  148. u16 freq;
  149. ath9k_hw_get_channel_centers(ah, chan, &centers);
  150. freq = (isExtTarget) ? centers.ext_center : centers.ctl_center;
  151. if (freq <= ath9k_hw_fbin2freq(powInfo[0].bChannel,
  152. IS_CHAN_2GHZ(chan))) {
  153. matchIndex = 0;
  154. } else {
  155. for (i = 0; (i < numChannels) &&
  156. (powInfo[i].bChannel != AR5416_BCHAN_UNUSED); i++) {
  157. if (freq == ath9k_hw_fbin2freq(powInfo[i].bChannel,
  158. IS_CHAN_2GHZ(chan))) {
  159. matchIndex = i;
  160. break;
  161. } else if (freq < ath9k_hw_fbin2freq(powInfo[i].bChannel,
  162. IS_CHAN_2GHZ(chan)) && i > 0 &&
  163. freq > ath9k_hw_fbin2freq(powInfo[i - 1].bChannel,
  164. IS_CHAN_2GHZ(chan))) {
  165. lowIndex = i - 1;
  166. break;
  167. }
  168. }
  169. if ((matchIndex == -1) && (lowIndex == -1))
  170. matchIndex = i - 1;
  171. }
  172. if (matchIndex != -1) {
  173. *pNewPower = powInfo[matchIndex];
  174. } else {
  175. clo = ath9k_hw_fbin2freq(powInfo[lowIndex].bChannel,
  176. IS_CHAN_2GHZ(chan));
  177. chi = ath9k_hw_fbin2freq(powInfo[lowIndex + 1].bChannel,
  178. IS_CHAN_2GHZ(chan));
  179. for (i = 0; i < numRates; i++) {
  180. pNewPower->tPow2x[i] =
  181. (u8)ath9k_hw_interpolate(freq, clo, chi,
  182. powInfo[lowIndex].tPow2x[i],
  183. powInfo[lowIndex + 1].tPow2x[i]);
  184. }
  185. }
  186. }
  187. void ath9k_hw_get_target_powers(struct ath_hw *ah,
  188. struct ath9k_channel *chan,
  189. struct cal_target_power_ht *powInfo,
  190. u16 numChannels,
  191. struct cal_target_power_ht *pNewPower,
  192. u16 numRates, int isHt40Target)
  193. {
  194. struct chan_centers centers;
  195. u16 clo, chi;
  196. int i;
  197. int matchIndex = -1, lowIndex = -1;
  198. u16 freq;
  199. ath9k_hw_get_channel_centers(ah, chan, &centers);
  200. freq = isHt40Target ? centers.synth_center : centers.ctl_center;
  201. if (freq <= ath9k_hw_fbin2freq(powInfo[0].bChannel, IS_CHAN_2GHZ(chan))) {
  202. matchIndex = 0;
  203. } else {
  204. for (i = 0; (i < numChannels) &&
  205. (powInfo[i].bChannel != AR5416_BCHAN_UNUSED); i++) {
  206. if (freq == ath9k_hw_fbin2freq(powInfo[i].bChannel,
  207. IS_CHAN_2GHZ(chan))) {
  208. matchIndex = i;
  209. break;
  210. } else
  211. if (freq < ath9k_hw_fbin2freq(powInfo[i].bChannel,
  212. IS_CHAN_2GHZ(chan)) && i > 0 &&
  213. freq > ath9k_hw_fbin2freq(powInfo[i - 1].bChannel,
  214. IS_CHAN_2GHZ(chan))) {
  215. lowIndex = i - 1;
  216. break;
  217. }
  218. }
  219. if ((matchIndex == -1) && (lowIndex == -1))
  220. matchIndex = i - 1;
  221. }
  222. if (matchIndex != -1) {
  223. *pNewPower = powInfo[matchIndex];
  224. } else {
  225. clo = ath9k_hw_fbin2freq(powInfo[lowIndex].bChannel,
  226. IS_CHAN_2GHZ(chan));
  227. chi = ath9k_hw_fbin2freq(powInfo[lowIndex + 1].bChannel,
  228. IS_CHAN_2GHZ(chan));
  229. for (i = 0; i < numRates; i++) {
  230. pNewPower->tPow2x[i] = (u8)ath9k_hw_interpolate(freq,
  231. clo, chi,
  232. powInfo[lowIndex].tPow2x[i],
  233. powInfo[lowIndex + 1].tPow2x[i]);
  234. }
  235. }
  236. }
  237. u16 ath9k_hw_get_max_edge_power(u16 freq, struct cal_ctl_edges *pRdEdgesPower,
  238. int is2GHz, int num_band_edges)
  239. {
  240. u16 twiceMaxEdgePower = MAX_RATE_POWER;
  241. int i;
  242. for (i = 0; (i < num_band_edges) &&
  243. (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED); i++) {
  244. if (freq == ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, is2GHz)) {
  245. twiceMaxEdgePower = CTL_EDGE_TPOWER(pRdEdgesPower[i].ctl);
  246. break;
  247. } else if ((i > 0) &&
  248. (freq < ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel,
  249. is2GHz))) {
  250. if (ath9k_hw_fbin2freq(pRdEdgesPower[i - 1].bChannel,
  251. is2GHz) < freq &&
  252. CTL_EDGE_FLAGS(pRdEdgesPower[i - 1].ctl)) {
  253. twiceMaxEdgePower =
  254. CTL_EDGE_TPOWER(pRdEdgesPower[i - 1].ctl);
  255. }
  256. break;
  257. }
  258. }
  259. return twiceMaxEdgePower;
  260. }
  261. void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah)
  262. {
  263. struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
  264. switch (ar5416_get_ntxchains(ah->txchainmask)) {
  265. case 1:
  266. break;
  267. case 2:
  268. regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
  269. break;
  270. case 3:
  271. regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
  272. break;
  273. default:
  274. DBG2("ath9k: "
  275. "Invalid chainmask configuration\n");
  276. break;
  277. }
  278. }
  279. void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
  280. struct ath9k_channel *chan,
  281. void *pRawDataSet,
  282. u8 *bChans, u16 availPiers,
  283. u16 tPdGainOverlap,
  284. u16 *pPdGainBoundaries, u8 *pPDADCValues,
  285. u16 numXpdGains)
  286. {
  287. int i, j, k;
  288. int16_t ss;
  289. u16 idxL = 0, idxR = 0, numPiers;
  290. static u8 vpdTableL[AR5416_NUM_PD_GAINS]
  291. [AR5416_MAX_PWR_RANGE_IN_HALF_DB];
  292. static u8 vpdTableR[AR5416_NUM_PD_GAINS]
  293. [AR5416_MAX_PWR_RANGE_IN_HALF_DB];
  294. static u8 vpdTableI[AR5416_NUM_PD_GAINS]
  295. [AR5416_MAX_PWR_RANGE_IN_HALF_DB];
  296. u8 *pVpdL, *pVpdR, *pPwrL, *pPwrR;
  297. u8 minPwrT4[AR5416_NUM_PD_GAINS];
  298. u8 maxPwrT4[AR5416_NUM_PD_GAINS];
  299. int16_t vpdStep;
  300. int16_t tmpVal;
  301. u16 sizeCurrVpdTable, maxIndex, tgtIndex;
  302. int match;
  303. int16_t minDelta = 0;
  304. struct chan_centers centers;
  305. int pdgain_boundary_default;
  306. struct cal_data_per_freq *data_def = pRawDataSet;
  307. struct cal_data_per_freq_4k *data_4k = pRawDataSet;
  308. struct cal_data_per_freq_ar9287 *data_9287 = pRawDataSet;
  309. int eeprom_4k = AR_SREV_9285(ah) || AR_SREV_9271(ah);
  310. int intercepts;
  311. if (AR_SREV_9287(ah))
  312. intercepts = AR9287_PD_GAIN_ICEPTS;
  313. else
  314. intercepts = AR5416_PD_GAIN_ICEPTS;
  315. memset(&minPwrT4, 0, AR5416_NUM_PD_GAINS);
  316. ath9k_hw_get_channel_centers(ah, chan, &centers);
  317. for (numPiers = 0; numPiers < availPiers; numPiers++) {
  318. if (bChans[numPiers] == AR5416_BCHAN_UNUSED)
  319. break;
  320. }
  321. match = ath9k_hw_get_lower_upper_index((u8)FREQ2FBIN(centers.synth_center,
  322. IS_CHAN_2GHZ(chan)),
  323. bChans, numPiers, &idxL, &idxR);
  324. if (match) {
  325. if (AR_SREV_9287(ah)) {
  326. /* FIXME: array overrun? */
  327. for (i = 0; i < numXpdGains; i++) {
  328. minPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
  329. maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
  330. ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
  331. data_9287[idxL].pwrPdg[i],
  332. data_9287[idxL].vpdPdg[i],
  333. intercepts,
  334. vpdTableI[i]);
  335. }
  336. } else if (eeprom_4k) {
  337. for (i = 0; i < numXpdGains; i++) {
  338. minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
  339. maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4];
  340. ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
  341. data_4k[idxL].pwrPdg[i],
  342. data_4k[idxL].vpdPdg[i],
  343. intercepts,
  344. vpdTableI[i]);
  345. }
  346. } else {
  347. for (i = 0; i < numXpdGains; i++) {
  348. minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
  349. maxPwrT4[i] = data_def[idxL].pwrPdg[i][4];
  350. ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
  351. data_def[idxL].pwrPdg[i],
  352. data_def[idxL].vpdPdg[i],
  353. intercepts,
  354. vpdTableI[i]);
  355. }
  356. }
  357. } else {
  358. for (i = 0; i < numXpdGains; i++) {
  359. if (AR_SREV_9287(ah)) {
  360. pVpdL = data_9287[idxL].vpdPdg[i];
  361. pPwrL = data_9287[idxL].pwrPdg[i];
  362. pVpdR = data_9287[idxR].vpdPdg[i];
  363. pPwrR = data_9287[idxR].pwrPdg[i];
  364. } else if (eeprom_4k) {
  365. pVpdL = data_4k[idxL].vpdPdg[i];
  366. pPwrL = data_4k[idxL].pwrPdg[i];
  367. pVpdR = data_4k[idxR].vpdPdg[i];
  368. pPwrR = data_4k[idxR].pwrPdg[i];
  369. } else {
  370. pVpdL = data_def[idxL].vpdPdg[i];
  371. pPwrL = data_def[idxL].pwrPdg[i];
  372. pVpdR = data_def[idxR].vpdPdg[i];
  373. pPwrR = data_def[idxR].pwrPdg[i];
  374. }
  375. minPwrT4[i] = max(pPwrL[0], pPwrR[0]);
  376. maxPwrT4[i] =
  377. min(pPwrL[intercepts - 1],
  378. pPwrR[intercepts - 1]);
  379. ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
  380. pPwrL, pVpdL,
  381. intercepts,
  382. vpdTableL[i]);
  383. ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
  384. pPwrR, pVpdR,
  385. intercepts,
  386. vpdTableR[i]);
  387. for (j = 0; j <= (maxPwrT4[i] - minPwrT4[i]) / 2; j++) {
  388. vpdTableI[i][j] =
  389. (u8)(ath9k_hw_interpolate((u16)
  390. FREQ2FBIN(centers.
  391. synth_center,
  392. IS_CHAN_2GHZ
  393. (chan)),
  394. bChans[idxL], bChans[idxR],
  395. vpdTableL[i][j], vpdTableR[i][j]));
  396. }
  397. }
  398. }
  399. k = 0;
  400. for (i = 0; i < numXpdGains; i++) {
  401. if (i == (numXpdGains - 1))
  402. pPdGainBoundaries[i] =
  403. (u16)(maxPwrT4[i] / 2);
  404. else
  405. pPdGainBoundaries[i] =
  406. (u16)((maxPwrT4[i] + minPwrT4[i + 1]) / 4);
  407. pPdGainBoundaries[i] =
  408. min((u16)MAX_RATE_POWER, pPdGainBoundaries[i]);
  409. if ((i == 0) && !AR_SREV_5416_20_OR_LATER(ah)) {
  410. minDelta = pPdGainBoundaries[0] - 23;
  411. pPdGainBoundaries[0] = 23;
  412. } else {
  413. minDelta = 0;
  414. }
  415. if (i == 0) {
  416. if (AR_SREV_9280_20_OR_LATER(ah))
  417. ss = (int16_t)(0 - (minPwrT4[i] / 2));
  418. else
  419. ss = 0;
  420. } else {
  421. ss = (int16_t)((pPdGainBoundaries[i - 1] -
  422. (minPwrT4[i] / 2)) -
  423. tPdGainOverlap + 1 + minDelta);
  424. }
  425. vpdStep = (int16_t)(vpdTableI[i][1] - vpdTableI[i][0]);
  426. vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep);
  427. while ((ss < 0) && (k < (AR5416_NUM_PDADC_VALUES - 1))) {
  428. tmpVal = (int16_t)(vpdTableI[i][0] + ss * vpdStep);
  429. pPDADCValues[k++] = (u8)((tmpVal < 0) ? 0 : tmpVal);
  430. ss++;
  431. }
  432. sizeCurrVpdTable = (u8) ((maxPwrT4[i] - minPwrT4[i]) / 2 + 1);
  433. tgtIndex = (u8)(pPdGainBoundaries[i] + tPdGainOverlap -
  434. (minPwrT4[i] / 2));
  435. maxIndex = (tgtIndex < sizeCurrVpdTable) ?
  436. tgtIndex : sizeCurrVpdTable;
  437. while ((ss < maxIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) {
  438. pPDADCValues[k++] = vpdTableI[i][ss++];
  439. }
  440. vpdStep = (int16_t)(vpdTableI[i][sizeCurrVpdTable - 1] -
  441. vpdTableI[i][sizeCurrVpdTable - 2]);
  442. vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep);
  443. if (tgtIndex >= maxIndex) {
  444. while ((ss <= tgtIndex) &&
  445. (k < (AR5416_NUM_PDADC_VALUES - 1))) {
  446. tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +
  447. (ss - maxIndex + 1) * vpdStep));
  448. pPDADCValues[k++] = (u8)((tmpVal > 255) ?
  449. 255 : tmpVal);
  450. ss++;
  451. }
  452. }
  453. }
  454. if (eeprom_4k)
  455. pdgain_boundary_default = 58;
  456. else
  457. pdgain_boundary_default = pPdGainBoundaries[i - 1];
  458. while (i < AR5416_PD_GAINS_IN_MASK) {
  459. pPdGainBoundaries[i] = pdgain_boundary_default;
  460. i++;
  461. }
  462. while (k < AR5416_NUM_PDADC_VALUES) {
  463. pPDADCValues[k] = pPDADCValues[k - 1];
  464. k++;
  465. }
  466. }
  467. int ath9k_hw_eeprom_init(struct ath_hw *ah)
  468. {
  469. int status;
  470. if (AR_SREV_9300_20_OR_LATER(ah))
  471. ah->eep_ops = &eep_ar9300_ops;
  472. else if (AR_SREV_9287(ah)) {
  473. ah->eep_ops = &eep_ar9287_ops;
  474. } else if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) {
  475. ah->eep_ops = &eep_4k_ops;
  476. } else {
  477. ah->eep_ops = &eep_def_ops;
  478. }
  479. if (!ah->eep_ops->fill_eeprom(ah))
  480. return -EIO;
  481. status = ah->eep_ops->check_eeprom(ah);
  482. return status;
  483. }