Print this page
7154 arn(7D) walks out of bounds when byteswapping the 4K eeprom
7152 weird condition in arn(7D) needs clarification
7153 delete unused code in arn(7D)
7155 arn(7D) should include the mac fields in the eeprom enumeration

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/arn/arn_eeprom.c
          +++ new/usr/src/uts/common/io/arn/arn_eeprom.c
↓ open down ↓ 463 lines elided ↑ open up ↑
 464  464  
 465  465                  word = swab16(eep->baseEepHeader.blueToothOptions);
 466  466                  eep->baseEepHeader.blueToothOptions = word;
 467  467  
 468  468                  word = swab16(eep->baseEepHeader.deviceCap);
 469  469                  eep->baseEepHeader.deviceCap = word;
 470  470  
 471  471                  integer = swab32(eep->modalHeader.antCtrlCommon);
 472  472                  eep->modalHeader.antCtrlCommon = integer;
 473  473  
 474      -                for (i = 0; i < AR5416_MAX_CHAINS; i++) {
      474 +                for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) {
 475  475                          integer = swab32(eep->modalHeader.antCtrlChain[i]);
 476  476                          eep->modalHeader.antCtrlChain[i] = integer;
 477  477                  }
 478  478  
 479  479                  for (i = 0; i < AR5416_EEPROM_MODAL_SPURS; i++) {
 480  480                          word = swab16(eep->modalHeader.spurChans[i].spurChan);
 481  481                          eep->modalHeader.spurChans[i].spurChan = word;
 482  482                  }
 483  483          }
 484  484  
↓ open down ↓ 2452 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX