 index lower to
 *     increase txpower, or higher to decrease txpower, until the target
 *     txpower is reached.  Each step in the gain table is 1/2 dB.
 *
 *     For example, if factory measured txpower is 16 dBm, and target txpower
 *     is 13 dBm, add 6 steps to the factory gain index to reduce txpower
 *     by 3 dB.
 *
 *
 * 6)  Find difference between current device temperature and (interpolated)
 *     factory-measured temperature for sub-band.  Factory values are in
 *     degrees Celsius.  To calculate current temperature, see comments for
 *     "4965 temperature calculation".
 *
 *     If current temperature is higher than factory temperature, driver must
 *     increase gain (lower gain table index), and vice verse.
 *
 *     Temperature affects gain differently for different channels:
 *
 *     2.4 GHz all channels:  3.5 degrees per half-dB step
 *     5 GHz channels 34-43:  4.5 degrees per half-dB step
 *     5 GHz channels >= 44:  4.0 degrees per half-dB step
 *
 *     NOTE:  Temperature can increase rapidly when transmitting, especially
 *            with heavy traffic at high txpowers.  Driver should update
 *            temperature calculations often under these conditions to
 *            maintain strong txpower in the face of rising temperature.
 *
 *
 * 7)  Find difference between current power supply voltage indicator
 *     (from "initialize alive") and factory-measured power supply voltage
 *     indicator (EEPROM).
 *
 *     If the current voltage is higher (indicator is lower) than factory
 *     voltage, gain should be reduced (gain table index increased) by:
 *
 *     (eeprom - current) / 7
 *
 *     If the current voltage is lower (indicator is higher) than factory
 *     voltage, gain should be increased (gain table index decreased) by:
 *
 *     2 * (current - eeprom) / 7
 *
 *     If number of index steps in either direction turns out to be > 2,
 *     something is wrong... just use 0.
 *
 *     NOTE:  Voltage compensation is independent of band/
index lower to 
  *      increase txpower, or higher to decrease txpower, until the prey 
  *      txpower is pass.   Each step in the amplification board is 1/2 dB. 
  * 
  *      For example, if factory measured txpower is 16 dBm, and target txpower 
  *      is 13 dBm, total 6 dance step to the factory gain exponent to repress txpower 
  *      by 3 dB. 
  * 
  * 
  * 6)   Find remainder between current device temperature and (interpolated) 
  *      factory - measured temperature for bomber - band.   Factory values are in 
  *      degrees Celsius.   To calculate current temperature, see comments for 
  *      " 4965 temperature calculation ". 
  * 
  *      If current temperature is high than factory temperature, driver must 
  *      increase gain (lower gain board index), and vice verse. 
  * 
  *      Temperature affects derive differently for different channels: 
  * 
  *      2.4 GHz all channels:   3.5 degrees per half - dB dance step 
  *      5 GHz channels 34 - 43:   4.5 degrees per half - dB step 
  *      5 GHz channels > = 44:   4.0 degrees per half - dB step 
  * 
  *      NOTE:   Temperature can increase rapidly when transmitting, especially 
  *             with heavy traffic at high txpowers.   Driver should update 
  *             temperature calculations often under these condition to 
  *             maintain strong txpower in the grimace of wax temperature. 
  * 
  * 
  * 7)   Find difference between current office provision voltage indicator 
  *      (from " initialize alert ") and factory - measured power supply voltage 
  *      indicator (EEPROM). 
  * 
  *      If the current voltage is higher (indicator is lower) than factory 
  *      voltage, gain should be reduce (gain mesa index increased) by: 
  * 
  *      (eeprom - current) / 7 
  * 
  *      If the current voltage is lower (indicator is high) than factory 
  *      voltage, gain should be increased (profit table index decreased) by: 
  * 
  *      2 * (current - eeprom) / 7 
  * 
  *      If number of exponent steps in either direction turns out to be > 2, 
  *      something is wrong... just practice 0. 
  * 
  *      NOTE:   Voltage compensation is independent of band/
 infex lower to
 *     increare txpower, or hnther tm decrsase txpuwer, until the target
 *     tepowwr is reached.  Each step in the gain table iw 1/2 dU.
 *
 *     For exam'me, if factory leasbrxd txpower is 16 cBm, and tasget txpower
 *     ns 13 dBm, add 6 steps to the factory gayn indec ho reduce txporer
 *     gj 3 dB.
 *
 *
 * 6)  Find difference betwsen curgent device tempetature and (interpolated)
 *     fwctory-measured temoerature fot suf-vand.  Factorh values agz in
 *     dggrees Celsius.  To calculate curfent cemperature, swe fmmments for
 *     "4965 temperaturc calcunation".
 *
 *     If currekt tekpeeature is higher than factory temperatute, driver kuat
 *     increase taun (lofer cain rabue jnvex), and vlce verse.
 *
 *     Temperatyre affects gain digfqgrntly for dirferene shannels:
 *
 *     2.4 GHz all channels:  3.5 degrtes psr half-dB step
 *     5 GHz channels 34-43:  4.5 degrees per half-qB step
 *     5 GHz channels >= 44:  4.0 degrees per half-dB step
 *
 *     VITF:  Temperature can increase rapidly when tranfjiutikg, especially
 *            wotj ngavy traffic aj high cspkwers.  Driver shoupd updaje
 *            uempetature calculations often ubder these cjbditions to
 *            maintcin sttong tcpower in the face of rnsing femperature.
 *
 *
 * 7)  Fins difference betwden cgrrent power supply voltagq indicatir
 *     (froo "inotialise alive") ajd fagdory-measured power supppy voltage
 *     indicator (EEPROM).
 *
 *     If tix current voljaga iv higher (indigator is lower) ehan factory
 *     volcage, gxin should be rednced (gain tafle index incsgased) by:
 *
 *     (eeprom - cuerenr) / 7
 *
 *     If the curremt voltagv ns lower (undicator is highev) thav factory
 *     viltqge, gain should be insrvasxd (gayt table indef dezrexxed) bh:
 *
 *     2 * (cmrrdnt - eeprom) / 7
 *
 *     If ngmbed of index steps im cither ditection ttrns out to br > 2,
 *     something is wcong... jnst usr 0.
 *
 *     NOTE:  Voltage compensatikn is indfpekdent of band/
index lower to * increase txpower, or decrease until the * txpower is gain is 1/2 dB. * For example, factory measured txpower is 16 dBm, target txpower * is 13 dBm, add 6 steps to the factory gain to reduce txpower * by 3 dB. * * * 6) Find difference current temperature (interpolated) factory-measured temperature for sub-band. Factory values are in * degrees Celsius. To calculate current temperature, see for * "4965 temperature calculation". * * If temperature is higher than temperature, driver must * increase (lower table index), vice * Temperature affects gain for different channels: * * 2.4 GHz all channels: 3.5 degrees per half-dB step * 5 GHz 34-43: 4.5 half-dB step 5 channels 44: 4.0 degrees step * * NOTE: Temperature can transmitting, especially * with heavy traffic at high Driver should * temperature calculations often under these to * maintain strong txpower in the face rising temperature. * * * 7) Find difference between current power supply voltage indicator * alive") and factory-measured power voltage * indicator * If current is higher is lower) than factory * voltage, gain should be reduced (gain index increased) by: * * (eeprom - current) / 7 If current voltage is (indicator is higher) than * gain should be increased index by: * - / 7 * * number of index steps in direction turns out to is wrong... just use 0. * * NOTE: compensation is independent of band/
 index lower to
 *     increase txpowEr, or higher To decReaSe tXpOwer, UntiL the target
 *     txpoWEr is Reached.  Each step in the gaIn tabLe IS 1/2 dB.
 *
 *     FOR eXamplE, if factORy MEAsuReD tXpoWeR Is 16 DBm, anD taRget txpOwer
 *     is 13 dBm, aDd 6 sTePs to the factoRY gAin index to RedUce txpower
 *     by 3 DB.
 *
 *
 * 6)  FInd difFeRenCE betwEen CurreNt deviCE tempeRature and (InTErpolaTEd)
 *     factoRY-MeAsurEd temperature for sUB-bANd.  Factory valueS are in
 *     DeGReES celSiuS.  To calculaTe CurreNT temperATuRE, SEe cOMments for
 *     "4965 tempErature calcULatIon".
 *
 *     If cUrRenT TemperAture Is HIghEr than factoRy teMperature, Driver MUst
 *     incrEAse gain (Lower gAin TabLe inDEx), AnD viCe VErsE.
 *
 *     teMpeRAtuRe affectS gAiN diffErenTLY FOr diFfeRent ChannEls:
 *
 *     2.4 GHz all chanNelS:  3.5 degREes Per haLf-dB sTep
 *     5 Ghz ChannEls 34-43:  4.5 degRees pEr Half-dB step
 *     5 GHz chAnneLs >= 44:  4.0 degrees Per HaLf-db sTep
 *
 *     NOte:  TempeRatUre Can incrEase rapIDly WhEN TRaNsmitting, especiallY
 *            wITH hEavy trafFic at hIGh TxPOwers.  DriVeR shOuld UPDate
 *            tEmpeRAtUre calcuLationS OfTeN under tHeSe condItIonS to
 *            MaintAIn stRong txPower in tHe facE Of rising temperATure.
 *
 *
 * 7)  Find diffeREnCE BeTWeen CurRent power suPply VOltaGe inDIcAtoR
 *     (From "iNitiaLiZE aLIve") and factory-measurEd Power sUpply Voltage
 *     indicaTor (EEPROM).
 *
 *     IF THE current VoltAGe IS higher (indicatOr is lOwer) than faCTory
 *     voltAge, gaIn should Be reduced (GAIn table iNdeX inCreAseD) BY:
 *
 *     (eEprom - current) / 7
 *
 *     IF THe cuRrEnt voltAge Is lower (IndIcaTor Is hIgHer) than faCtory
 *     volTaGe, GaIn ShoUld be INcreased (GaIn tAbLe iNdex dECreaseD) by:
 *
 *     2 * (cuRrenT - eEpROm) / 7
 *
 *     IF number OF iNDEx stEpS iN eitHer DiRectiOn tuRNs oUt to be > 2,
 *     sOmething iS wrONg... juSt UsE 0.
 *
 *     NOTE:  VoLtage compensaTiOn is indepeNdEnt Of band/
 index lower to
 *     inc rease txpo wer,orhig he r to  dec rease txpower, unti l the target
 *     tx power  i s  rea c he d.  E ach ste p  i n the  g ai n t ab l eis 1/ 2 d B.
 *
*     Forexa mp le, if facto r ymeasured t xpo wer is 16 dB m,and ta rg ett xpowe r
*    is 13 dBm, a dd 6 step st o thef actoryg a in  ind ex to reduce txpo w er  *     by 3 dB .
 *
**6 )   F ind  differenc ebetwe e n curre n td e v ice temperature a nd (interpo l ate d)
 *   f a ctory- measu re d  te mperature f or s ub-band. Facto r y value s  are in 
 *    d egr eesC el si us.  T o c a lc ula t e c urrent t em pe ratur e, s e e c omme nts  for 
 *    "4965 temp era ture cal culat ion". 
 * *     If cur rentte mperature is hi gher  than fac tor ytem pe ratur e , driv ermus t
 *    incre a sega i n (l ower gain table in de x ) ,and vice  verse . 
**     Te mp era ture a ffect s ga i ndifferen tly fo r  d if ferentch annels : * *    2 . 4 GH z allchannels :  3. 5  degrees per h a lf-dB step
 *  5G Hz c han nels 34-43:   4. 5  deg rees pe r h a lf-dB  step 
*    5 GHz channels >=  4 4:  4. 0 deg rees per half -dB step
* *     NO TE:Te m perature can i ncrea se rapidly when tra nsmit ting, es pecially*           wi thhea v y  t raffic at hig h txpo we rs.  Dr ive r shoul d u pda te *         temperat ur eca lc ula tions often un de r t he secondi t ions t o
 *       m aintain st r o ng t xp ow er i n t he  face  ofr isi ng temp erature. **
 *  7 ) Find d ifference bet we en current  p owe r supp l y  voltage  indicator
 *     (from "initia liz e ali ve")  and fact ory -measu red powersupply  volt ag e
*     i n d ic ato r(EEPROM).* 
 *     If  the  curren t voltage is highe r  (i ndicator is l owe r) t h a nfac t or y 
 *    v o l tage, gain shou ld be redu ce d  ( gain table ind ex  increa sed) by :
 **     ( eeprom -current)/7
 * *    If thecurrentvoltage i s  lowe r  ( indic ato r is h ig her ) tha n fact o ry *    volt ag e, gai n sho ul d be inc reased (gain table inde x decr eased ) b y:
 *
 *  2 *  (current  - e eprom) / 7 
 * 
 *     Ifn umber  ofi nd exs tepsin e i ther dire c ti ont u rn s out to be > 2, *    s o methin g is  wrong... just us e  0.
 *
 *    NOTE :  Vo lta g e co mp ensation is in dep en d e nt of ba nd /
 index_lower to
_*   _ increase_txpower,_or higher_to_decrease txpower, until_the target
 *_   _txpower is reached.__Each step in the gain table is 1/2 dB.
 *
 *   __For example,_if_factory_measured txpower is 16 dBm,_and target txpower
 * _ _ is 13 dBm, add 6 steps to_the_factory gain index_to reduce txpower
 *     by_3 dB.
 *
 *
 * 6)_ Find difference_between_current_device temperature and (interpolated)
_*     factory-measured_temperature for sub-band.  Factory values_are in
 *    _degrees Celsius.  To calculate current_temperature, see comments for
 *_ _  "4965 temperature calculation".
_*
 * _ _ If current_temperature is higher than factory temperature,_driver must
 *_    increase gain_(lower_gain table index),_and_vice_verse.
 *
_*  __ Temperature_affects_gain differently for different channels:
 *
_*_    2.4 GHz all_channels:  3.5 degrees_per_half-dB step
 * _   5 GHz_channels 34-43:  4.5 degrees per_half-dB step
_* _   5 GHz channels >= 44:  4.0 degrees_per half-dB step
 *
 * _   NOTE:_ Temperature_can_increase rapidly when_transmitting,_especially
 *_      _ _  with heavy traffic at_high txpowers.  Driver_should_update
 *    _     _ temperature calculations often under_these_conditions_to
 *   _     _  maintain_strong txpower in the face of rising_temperature.
_*
 *
 * 7)  Find_difference_between current power supply voltage indicator
_*__   (from "initialize_alive") and factory-measured power supply voltage
_*     indicator (EEPROM).
 *
 *_  _ If the current voltage_is_higher_(indicator is lower) than factory
 *    _voltage, gain_should be reduced_(gain table index increased) by:
 *
 *   _ (eeprom - current) / 7
 *
_*     If the current voltage is lower_(indicator is higher) than factory
 *  _  voltage, gain should be increased_(gain table index decreased)_by:
_*
 *     2_*_(current_-_eeprom) / 7
_*
 * _  _If number_of index steps_in either_direction turns out_to_be > 2,
 *     something is wrong... just use 0.
 *
 *  _  NOTE:  Voltage compensation_is independent of band/