init.c (9cf8d1a3b8cb19fa49494c1b8f0f9e3a37f2c218) | init.c (cac4220b2e93e6344f987581d52d5bd71ff2cc0e) |
---|---|
1/* 2 * Copyright (c) 2008-2009 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 467 unchanged lines hidden (view full) --- 476 477 return -EIO; 478} 479 480static int ath9k_init_channels_rates(struct ath_softc *sc) 481{ 482 void *channels; 483 | 1/* 2 * Copyright (c) 2008-2009 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 467 unchanged lines hidden (view full) --- 476 477 return -EIO; 478} 479 480static int ath9k_init_channels_rates(struct ath_softc *sc) 481{ 482 void *channels; 483 |
484 BUILD_BUG_ON(ARRAY_SIZE(ath9k_2ghz_chantable) + 485 ARRAY_SIZE(ath9k_5ghz_chantable) != 486 ATH9K_NUM_CHANNELS); 487 |
|
484 if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) { 485 channels = kmemdup(ath9k_2ghz_chantable, 486 sizeof(ath9k_2ghz_chantable), GFP_KERNEL); 487 if (!channels) 488 return -ENOMEM; 489 490 sc->sbands[IEEE80211_BAND_2GHZ].channels = channels; 491 sc->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ; --- 411 unchanged lines hidden --- | 488 if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) { 489 channels = kmemdup(ath9k_2ghz_chantable, 490 sizeof(ath9k_2ghz_chantable), GFP_KERNEL); 491 if (!channels) 492 return -ENOMEM; 493 494 sc->sbands[IEEE80211_BAND_2GHZ].channels = channels; 495 sc->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ; --- 411 unchanged lines hidden --- |