int synth_freq;
        int range = 10;
        int freq_offset = 0;
-       int mode;
-       u8* spurChansPtr;
+       u8 *spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah, IS_CHAN_2GHZ(chan));
        unsigned int i;
-       struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
-
-       if (IS_CHAN_5GHZ(chan)) {
-               spurChansPtr = &(eep->modalHeader5G.spurChans[0]);
-               mode = 0;
-       }
-       else {
-               spurChansPtr = &(eep->modalHeader2G.spurChans[0]);
-               mode = 1;
-       }
 
-       if (spurChansPtr[0] == 0)
+       if (spur_fbin_ptr[0] == 0)
                return; /* No spur in the mode */
 
        if (IS_CHAN_HT40(chan)) {
 
        ar9003_hw_spur_ofdm_clear(ah);
 
-       for (i = 0; i < AR_EEPROM_MODAL_SPURS && spurChansPtr[i]; i++) {
-               freq_offset = ath9k_hw_fbin2freq(spurChansPtr[i], mode);
+       for (i = 0; i < AR_EEPROM_MODAL_SPURS && spur_fbin_ptr[i]; i++) {
+               freq_offset = ath9k_hw_fbin2freq(spur_fbin_ptr[i],
+                                                IS_CHAN_2GHZ(chan));
                freq_offset -= synth_freq;
                if (abs(freq_offset) < range) {
                        ar9003_hw_spur_ofdm_work(ah, chan, freq_offset,
                                                 range, synth_freq);
 
                        if (AR_SREV_9565(ah) && (i < 4)) {
-                               freq_offset = ath9k_hw_fbin2freq(spurChansPtr[i + 1],
-                                                                mode);
+                               freq_offset =
+                                       ath9k_hw_fbin2freq(spur_fbin_ptr[i + 1],
+                                                          IS_CHAN_2GHZ(chan));
                                freq_offset -= synth_freq;
                                if (abs(freq_offset) < range)
                                        ar9003_hw_spur_ofdm_9565(ah, freq_offset);