rpms/kernel/F-7 git-iwlwifi.patch, 1.12, 1.13 linux-2.6-rtl8187.patch, NONE, 1.1 git-wireless-dev.patch, 1.13, 1.14 kernel-2.6.spec, 1.3267, 1.3268
John W. Linville (linville)
fedora-extras-commits at redhat.com
Wed Jul 11 18:51:38 UTC 2007
Author: linville
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20847
Modified Files:
git-wireless-dev.patch kernel-2.6.spec
Added Files:
git-iwlwifi.patch linux-2.6-rtl8187.patch
Log Message:
wireless updates
git-iwlwifi.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.12 -r 1.13 git-iwlwifi.patch
Index: git-iwlwifi.patch
===================================================================
RCS file: git-iwlwifi.patch
diff -N git-iwlwifi.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ git-iwlwifi.patch 11 Jul 2007 18:51:30 -0000 1.13
@@ -0,0 +1,5808 @@
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-channel.h.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-channel.h 2007-07-11 13:53:43.000000000 -0400
+@@ -136,13 +136,15 @@ static inline int is_channel_radar(const
+
+ static inline u8 is_channel_a_band(const struct iwl_channel_info *ch_info)
+ {
+- return (ch_info->phymode == MODE_IEEE80211A) ? 1 : 0;
++ return ((ch_info->phymode == MODE_IEEE80211A) ||
++ (ch_info->phymode == MODE_ATHEROS_TURBO)) ? 1 : 0;
+ }
+
+ static inline u8 is_channel_bg_band(const struct iwl_channel_info *ch_info)
+ {
+- return (ch_info->phymode == MODE_IEEE80211B ||
+- ch_info->phymode == MODE_IEEE80211G) ? 1 : 0;
++ return ((ch_info->phymode == MODE_IEEE80211B) ||
++ (ch_info->phymode == MODE_IEEE80211G) ||
++ (ch_info->phymode == MODE_ATHEROS_TURBOG)) ? 1 : 0;
+ }
+
+ static inline int is_channel_passive(const struct iwl_channel_info *ch)
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/Makefile.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/Makefile 2007-07-11 13:53:43.000000000 -0400
+@@ -2,7 +2,7 @@
+ # specific binaries based on the #define IWL -- the target
+ # setup below creates a specific driver target from base.c
+ #
+-# NOTE2: base-XXXX.o has -D"KBUILD_MODNAME=KBUILD_STR(...)" in order to
++# NOTE2: base-XXXX.o has -D"KBUILD_MODNAME=KBUILD_STR(...)" in order to
+ # prevent the following kbuild error:
+ # include/linux/pci.h:603: error: `KBUILD_MODNAME' undeclared (first \
+ # use in this function)
+@@ -11,8 +11,8 @@
+
+ obj-$(CONFIG_IWL3945) += iwl3945.o
+ iwl3945-objs = base-3945.o iwl-3945.o iwl-3945-rs.o
+-CFLAGS_iwl-3945-rs.o = -DIWL=3945
+ CFLAGS_iwl-3945.o = -DIWL=3945
++CFLAGS_iwl-3945-rs.o = -DIWL=3945
+ CFLAGS_base-3945.o = -DIWL=3945 -D"KBUILD_MODNAME=KBUILD_STR(iwl3945)"
+ $(obj)/base-3945.o: $(src)/base.c FORCE
+ $(call cmd,force_checksrc)
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965-rs.c.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965-rs.c 2007-07-11 13:53:43.000000000 -0400
+@@ -52,13 +52,16 @@
+ #define IWL_HT_NUMBER_TRY 1
+
+ #define IWL_RATE_MAX_WINDOW 62
+-#define IWL_RATE_HIGH_TH 11520
+-#define IWL_RATE_MIN_FAILURE_TH 3
++#define IWL_RATE_HIGH_TH 10880
++#define IWL_RATE_MIN_FAILURE_TH 6
+ #define IWL_RATE_MIN_SUCCESS_TH 8
+ #define IWL_RATE_DECREASE_TH 1920
++#define IWL_RATE_INCREASE_TH 8960
+ #define IWL_RATE_SCALE_FLUSH_INTVL (2*HZ) /*2 seconds */
+
+ static u8 rs_ht_to_legacy[] = {
++ IWL_RATE_6M_INDEX, IWL_RATE_6M_INDEX,
++ IWL_RATE_6M_INDEX, IWL_RATE_6M_INDEX,
+ IWL_RATE_6M_INDEX,
+ IWL_RATE_6M_INDEX, IWL_RATE_9M_INDEX,
+ IWL_RATE_12M_INDEX, IWL_RATE_18M_INDEX,
+@@ -126,43 +129,43 @@ static int rs_fill_link_cmd(struct iwl_r
+
+
+ static s32 expected_tpt_A[IWL_RATE_COUNT] = {
+- 40, 57, 72, 98, 121, 154, 177, 186, 186, 0, 0, 0, 0
++ 0, 0, 0, 0, 40, 57, 72, 98, 121, 154, 177, 186, 186
+ };
+
+ static s32 expected_tpt_G[IWL_RATE_COUNT] = {
+- 40, 57, 72, 98, 121, 154, 177, 186, 186, 7, 13, 35, 58
++ 7, 13, 35, 58, 40, 57, 72, 98, 121, 154, 177, 186, 186
+ };
+
+ static s32 expected_tpt_siso20MHz[IWL_RATE_COUNT] = {
+- 42, 42, 76, 102, 124, 159, 183, 193, 202, 0, 0, 0, 0
++ 0, 0, 0, 0, 42, 42, 76, 102, 124, 159, 183, 193, 202
+ };
+
+ static s32 expected_tpt_siso20MHzSGI[IWL_RATE_COUNT] = {
+- 46, 46, 82, 110, 132, 168, 192, 202, 211, 0, 0, 0, 0
++ 0, 0, 0, 0, 46, 46, 82, 110, 132, 168, 192, 202, 211
+ };
+
+ static s32 expected_tpt_mimo20MHz[IWL_RATE_COUNT] = {
+- 74, 74, 123, 155, 179, 214, 236, 244, 251, 0, 0, 0, 0
++ 0, 0, 0, 0, 74, 74, 123, 155, 179, 214, 236, 244, 251
+ };
+
+ static s32 expected_tpt_mimo20MHzSGI[IWL_RATE_COUNT] = {
+- 81, 81, 131, 164, 188, 222, 243, 251, 257, 0, 0, 0, 0
++ 0, 0, 0, 0, 81, 81, 131, 164, 188, 222, 243, 251, 257
+ };
+
+ static s32 expected_tpt_siso40MHz[IWL_RATE_COUNT] = {
+- 77, 77, 127, 160, 184, 220, 242, 250, 257, 0, 0, 0, 0
++ 0, 0, 0, 0, 77, 77, 127, 160, 184, 220, 242, 250, 257
+ };
+
+ static s32 expected_tpt_siso40MHzSGI[IWL_RATE_COUNT] = {
+- 83, 83, 135, 169, 193, 229, 250, 257, 264, 0, 0, 0, 0
++ 0, 0, 0, 0, 83, 83, 135, 169, 193, 229, 250, 257, 264
+ };
+
+ static s32 expected_tpt_mimo40MHz[IWL_RATE_COUNT] = {
+- 123, 123, 182, 214, 235, 264, 279, 285, 289, 0, 0, 0, 0
++ 0, 0, 0, 0, 123, 123, 182, 214, 235, 264, 279, 285, 289
+ };
+
+ static s32 expected_tpt_mimo40MHzSGI[IWL_RATE_COUNT] = {
+- 131, 131, 191, 222, 242, 270, 284, 289, 293, 0, 0, 0, 0
++ 0, 0, 0, 0, 131, 131, 191, 222, 242, 270, 284, 289, 293
+ };
+
+ static int iwl_lq_sync_callback(struct iwl_priv *priv,
+@@ -226,12 +229,13 @@ static int rs_rate_scale_clear_window(st
+ }
+
+ static int rs_collect_tx_data(struct iwl_rate_scale_data *windows,
+- int scale_index, u32 status)
++ int scale_index, s32 tpt, u32 status)
+ {
+ int rc = 0;
+ struct iwl_rate_scale_data *window = NULL;
+ u64 mask;
+ u8 win_size = IWL_RATE_MAX_WINDOW;
++ s32 fail_count;
+
+ if (scale_index < 0)
+ return -1;
+@@ -266,6 +270,15 @@ static int rs_collect_tx_data(struct iwl
+ } else
+ window->success_ratio = IWL_INVALID_VALUE;
+
++
++ fail_count = window->counter - window->success_counter;
++ if ((fail_count >= IWL_RATE_MIN_FAILURE_TH) ||
++ (window->success_counter >= IWL_RATE_MIN_SUCCESS_TH))
++ window->average_tpt = ((window->success_ratio *
++ tpt + 64) / 128);
++ else
++ window->average_tpt = IWL_INVALID_VALUE;
++
+ window->stamp = jiffies;
+
+ return rc;
+@@ -283,13 +296,13 @@ int static rs_mcs_from_tbl(struct iwl_ra
+ mcs_rate->rate_n_flags |= RATE_MCS_CCK_MSK;
+
+ } else if (is_siso(tbl->lq_type)) {
+- if (index > 8)
+- index = 8;
++ if (index > IWL_LAST_OFDM_RATE)
++ index = IWL_LAST_OFDM_RATE;
+ mcs_rate->rate_n_flags = iwl_rates[index].plcp_siso |
+ RATE_MCS_HT_MSK;
+ } else {
+- if (index > 8)
+- index = 8;
++ if (index > IWL_LAST_OFDM_RATE)
++ index = IWL_LAST_OFDM_RATE;
+ mcs_rate->rate_n_flags = iwl_rates[index].plcp_mimo |
+ RATE_MCS_HT_MSK;
+ }
+@@ -569,7 +582,7 @@ static void rs_tx_status(void *priv_rate
+ {
+ int status;
+ u8 retries;
+- int scale_rate_index, index = 0;
++ int rs_index, index = 0;
+ struct iwl_rate_scale_priv *lq;
+ struct iwl_link_quality_cmd *table;
+ struct sta_info *sta;
+@@ -582,14 +595,19 @@ static void rs_tx_status(void *priv_rate
+ struct iwl_scale_tbl_info tbl_type;
+ struct iwl_scale_tbl_info *curr_tbl, *search_tbl;
+ u8 active_index = 0;
++ u16 fc = le16_to_cpu(hdr->frame_control);
++ s32 tpt = 0;
+
+ IWL_DEBUG_RATE("getting frame ack response, update rate "
+ "scale window\n");
+
++ if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
++ return;
++
+ retries = tx_resp->retry_count;
+
+- if (retries > 16)
+- retries = 16;
++ if (retries > 15)
[...5415 lines suppressed...]
++ __le16 sensitivity_tbl[HD_TABLE_SIZE];
++#endif /*CONFIG_IWLWIFI_SENSITIVITY*/
+
+ #ifdef CONFIG_IWLWIFI_HT
+ struct sta_ht_info current_assoc_ht;
+@@ -184,6 +181,8 @@ struct iwl_priv {
+
+ int quality;
+ int last_rx_rssi;
++ int last_rx_noise;
++ int last_rx_snr;
+
+ struct iwl_power_mgr power_data;
+
+@@ -234,7 +233,7 @@ struct iwl_priv {
+ /* Last Rx'd beacon timestamp */
+ u32 timestamp0;
+ u32 timestamp1;
+-
++ u16 beacon_int;
+ struct iwl_driver_hw_info hw_setting;
+ int interface_id;
+
+@@ -255,18 +254,18 @@ struct iwl_priv {
+ struct work_struct abort_scan;
+ struct work_struct update_link_led;
+ struct work_struct auth_work;
+- struct work_struct post_associate;
+ struct work_struct report_work;
+ struct work_struct request_scan;
+
+ struct tasklet_struct irq_tasklet;
+
++ struct delayed_work init_alive_start;
+ struct delayed_work alive_start;
+ struct delayed_work activity_timer;
+ struct delayed_work thermal_periodic;
+ struct delayed_work gather_stats;
+ struct delayed_work scan_check;
+- struct delayed_work resume_work;
++ struct delayed_work post_associate;
+
+ #define IWL_DEFAULT_TX_POWER 0x0F
+ s8 user_txpower_limit;
+@@ -277,9 +276,6 @@ struct iwl_priv {
+ u32 pm_state[16];
+ #endif
+
+- /* Used to pass the current INTA value from ISR to Tasklet */
+- u32 isr_inta;
+-
+ /* debugging info */
+ u32 framecnt_to_us;
+
+@@ -287,10 +283,10 @@ struct iwl_priv {
+
+ #if IWL == 4965
+ struct work_struct txpower_work;
++#ifdef CONFIG_IWLWIFI_SENSITIVITY
+ struct work_struct sensitivity_work;
++#endif
+ struct work_struct statistics_work;
+- struct delayed_work init_alive_start;
+-
+ struct timer_list statistics_periodic;
+
+ #ifdef CONFIG_IWLWIFI_HT_AGG
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965.h.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965.h 2007-07-11 13:53:43.000000000 -0400
+@@ -58,7 +58,12 @@ static inline void iwl4965_update_rate_s
+ static inline void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
+ u8 need_to_lock) {}
+ static inline void iwl4965_chain_noise_calibrate(struct iwl_priv *priv) {}
+-static inline void iwl4965_init_sensitivity(struct iwl_priv *priv) {}
++static inline void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags) {}
++static inline int iwl4965_set_fat_chan_info(struct iwl_priv *priv, int phymode,
++ int channel,
++ const struct iwl_eeprom_channel *eeprom_ch,
++ u8 fat_extension_channel) { return 0; }
++static inline void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) {}
+ #else /* IWL == 4965 */
+ /*
+ * Forward declare iwl-4965.c functions for base.c
+@@ -84,7 +89,12 @@ extern void iwl4965_set_ht_add_station(s
+ u8 index, u8 need_to_lock);
+
+ extern void iwl4965_chain_noise_calibrate(struct iwl_priv *priv);
+-extern void iwl4965_init_sensitivity(struct iwl_priv *priv);
++extern void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags);
++extern int iwl4965_set_fat_chan_info(struct iwl_priv *priv, int phymode,
++ int channel,
++ const struct iwl_eeprom_channel *eeprom_ch,
++ u8 fat_extension_channel);
++extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
+ /* Structures, enum, and defines specific to the 4965 */
+
+ #define IWL4965_KW_SIZE 0x1000 /*4k */
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwlwifi.h.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwlwifi.h 2007-07-11 13:53:43.000000000 -0400
+@@ -452,10 +452,22 @@ struct iwl_station_entry {
+ struct iwl_hw_key keyinfo;
+ };
+
++/* one for each uCode image (inst/data, boot/init/runtime) */
+ struct fw_image_desc {
+- void *v_addr;
+- dma_addr_t p_addr;
+- u32 len;
++ void *v_addr; /* access by driver */
++ dma_addr_t p_addr; /* access by card's busmaster DMA */
++ u32 len; /* bytes */
++};
++
++/* uCode file layout */
++struct iwl_ucode {
++ __le32 ver; /* major/minor/subminor */
++ __le32 inst_size; /* bytes of runtime instructions */
++ __le32 data_size; /* bytes of runtime data */
++ __le32 init_size; /* bytes of initialization instructions */
++ __le32 init_data_size; /* bytes of initialization data */
++ __le32 boot_size; /* bytes of bootstrap instructions */
++ u8 data[0]; /* data in same order as "size" elements */
+ };
+
+ #define IWL_IBSS_MAC_HASH_SIZE 31
+@@ -506,13 +518,14 @@ struct iwl_driver_hw_info {
+
+ #define IWL_RX_HDR(x) ((struct iwl_rx_frame_hdr *)(\
+ x->u.rx_frame.stats.payload + \
+- x->u.rx_frame.stats.mib_count))
++ x->u.rx_frame.stats.phy_count))
+ #define IWL_RX_END(x) ((struct iwl_rx_frame_end *)(\
+ IWL_RX_HDR(x)->payload + \
+ le16_to_cpu(IWL_RX_HDR(x)->len)))
+ #define IWL_RX_STATS(x) (&x->u.rx_frame.stats)
+ #define IWL_RX_DATA(x) (IWL_RX_HDR(x)->payload)
+
++
+ /******************************************************************************
+ *
+ * Functions implemented in base.c which are forward declared here
+@@ -552,6 +565,8 @@ extern void iwl_rx_queue_free(struct iwl
+ extern int iwl_rx_queue_alloc(struct iwl_priv *priv);
+ extern void iwl_rx_queue_reset(struct iwl_priv *priv,
+ struct iwl_rx_queue *rxq);
++extern int iwl_calc_db_from_ratio(int sig_ratio);
++extern int iwl_calc_sig_qual(int rssi_dbm, int noise_dbm);
+ extern int iwl_tx_queue_init(struct iwl_priv *priv,
+ struct iwl_tx_queue *txq, int count, u32 id);
+ extern int iwl_rx_queue_restock(struct iwl_priv *priv);
+@@ -566,8 +581,6 @@ extern int iwl_fill_beacon_frame(struct
+ int left);
+ extern int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
+ struct iwl_rx_queue *q);
+-extern int iwl_load_bsm(struct iwl_priv *priv, u8 * image, u32 len);
+-extern int iwl_verify_ucode(struct iwl_priv *priv);
+ extern int iwl_send_statistics_request(struct iwl_priv *priv);
+ extern void iwl_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb,
+ u32 decrypt_res,
+@@ -612,8 +625,6 @@ extern int iwl_hw_rxq_stop(struct iwl_pr
+ extern int iwl_hw_set_hw_setting(struct iwl_priv *priv);
+ extern int iwl_hw_nic_init(struct iwl_priv *priv);
+ extern void iwl_hw_card_show_info(struct iwl_priv *priv);
+-extern void iwl_hw_nic_start(struct iwl_priv *priv);
+-extern int iwl_hw_setup_bootstrap(struct iwl_priv *priv);
+ extern int iwl_hw_nic_stop_master(struct iwl_priv *priv);
+ extern void iwl_hw_txq_ctx_free(struct iwl_priv *priv);
+ extern void iwl_hw_txq_ctx_stop(struct iwl_priv *priv);
+@@ -625,8 +636,6 @@ extern int iwl_hw_tx_queue_free_tfd(stru
+ extern int iwl_hw_get_temperature(struct iwl_priv *priv);
+ extern int iwl_tx_queue_free_tfd(struct iwl_priv *priv,
+ struct iwl_tx_queue *txq);
+-extern int iwl_hw_tx_queue_alloc(struct iwl_priv *priv,
+- struct iwl_tx_queue *q, int count, u32 id);
+ extern int iwl_hw_tx_queue_init(struct iwl_priv *priv,
+ struct iwl_tx_queue *txq);
+ extern int iwl_hw_get_beacon_cmd(struct iwl_priv *priv,
+@@ -639,10 +648,10 @@ extern void iwl_hw_build_tx_cmd_rate(str
+ int sta_id, int tx_id);
+ extern int iwl_hw_reg_send_txpower(struct iwl_priv *priv);
+ extern int iwl_hw_reg_set_txpower(struct iwl_priv *priv, s8 power);
+-extern void iwl_hw_rx_reply_alive(struct iwl_priv *priv,
+- struct iwl_rx_mem_buffer *rxb);
+ extern void iwl_hw_rx_statistics(struct iwl_priv *priv,
+ struct iwl_rx_mem_buffer *rxb);
++extern void iwl_disable_events(struct iwl_priv *priv);
++extern int iwl4965_get_temperature(const struct iwl_priv *priv);
+
+ /**
+ * iwl_hw_find_station - Find station id for a given BSSID
+--- linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-helpers.h.orig 2007-07-11 13:46:16.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-helpers.h 2007-07-11 13:53:43.000000000 -0400
+@@ -150,6 +150,7 @@ BITC(x, 19), BITC(x, 18), BITC(x, 17), B
+ BIT_ARG16(x)
+
+ #define KELVIN_TO_CELSIUS(x) ((x)-273)
++#define CELSIUS_TO_KELVIN(x) ((x)+273)
+
+ #define IEEE80211_CHAN_W_RADAR_DETECT 0x00000010
+
linux-2.6-rtl8187.patch:
--- NEW FILE linux-2.6-rtl8187.patch ---
--- /dev/null 2007-07-11 10:53:53.353955061 -0400
+++ linux-2.6.22.noarch/include/linux/eeprom_93cx6.h 2007-07-11 14:38:44.000000000 -0400
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2004 - 2006 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the
+ Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ Module: eeprom_93cx6
+ Abstract: EEPROM reader datastructures for 93cx6 chipsets.
+ Supported chipsets: 93c46 & 93c66.
+ */
+
+/*
+ * EEPROM operation defines.
+ */
+#define PCI_EEPROM_WIDTH_93C46 6
+#define PCI_EEPROM_WIDTH_93C66 8
+#define PCI_EEPROM_WIDTH_OPCODE 3
+#define PCI_EEPROM_WRITE_OPCODE 0x05
+#define PCI_EEPROM_READ_OPCODE 0x06
+#define PCI_EEPROM_EWDS_OPCODE 0x10
+#define PCI_EEPROM_EWEN_OPCODE 0x13
+
+/**
+ * struct eeprom_93cx6 - control structure for setting the commands
+ * for reading the eeprom data.
+ * @data: private pointer for the driver.
+ * @register_read(struct eeprom_93cx6 *eeprom): handler to
+ * read the eeprom register, this function should set all reg_* fields.
+ * @register_write(struct eeprom_93cx6 *eeprom): handler to
+ * write to the eeprom register by using all reg_* fields.
+ * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines
+ * @reg_data_in: register field to indicate data input
+ * @reg_data_out: register field to indicate data output
+ * @reg_data_clock: register field to set the data clock
+ * @reg_chip_select: register field to set the chip select
+ *
+ * This structure is used for the communication between the driver
+ * and the eeprom_93cx6 handlers for reading the eeprom.
+ */
+struct eeprom_93cx6 {
+ void *data;
+
+ void (*register_read)(struct eeprom_93cx6 *eeprom);
+ void (*register_write)(struct eeprom_93cx6 *eeprom);
+
+ int width;
+
+ char reg_data_in;
+ char reg_data_out;
+ char reg_data_clock;
+ char reg_chip_select;
+};
+
+extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom,
+ const u8 word, u16 *data);
+extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom,
+ const u8 word, __le16 *data, const u16 words);
--- linux-2.6.22.noarch/MAINTAINERS.orig 2007-07-08 19:32:17.000000000 -0400
+++ linux-2.6.22.noarch/MAINTAINERS 2007-07-11 14:38:44.000000000 -0400
@@ -3049,6 +3049,16 @@ S: Maintained
RISCOM8 DRIVER
S: Orphan
+RTL818X WIRELESS DRIVER
+P: Michael Wu
+M: flamingice at sourmilk.net
+P: Andrea Merello
+M: andreamrl at tiscali.it
+L: linux-wireless at vger.kernel.org
+W: http://linuxwireless.org/
+T: git kernel.org:/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
+S: Maintained
+
S3 SAVAGE FRAMEBUFFER DRIVER
P: Antonino Daplas
M: adaplas at gmail.com
--- linux-2.6.22.noarch/drivers/misc/Makefile.orig 2007-07-08 19:32:17.000000000 -0400
+++ linux-2.6.22.noarch/drivers/misc/Makefile 2007-07-11 14:38:44.000000000 -0400
@@ -14,3 +14,4 @@ obj-$(CONFIG_PHANTOM) += phantom.o
obj-$(CONFIG_SGI_IOC4) += ioc4.o
obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
+obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
--- /dev/null 2007-07-11 10:53:53.353955061 -0400
+++ linux-2.6.22.noarch/drivers/misc/eeprom_93cx6.c 2007-07-11 14:38:44.000000000 -0400
@@ -0,0 +1,241 @@
+/*
+ Copyright (C) 2004 - 2006 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the
+ Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ Module: eeprom_93cx6
+ Abstract: EEPROM reader routines for 93cx6 chipsets.
+ Supported chipsets: 93c46 & 93c66.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/delay.h>
+#include <linux/eeprom_93cx6.h>
+
+MODULE_AUTHOR("http://rt2x00.serialmonkey.com");
+MODULE_VERSION("1.0");
+MODULE_DESCRIPTION("EEPROM 93cx6 chip driver");
+MODULE_LICENSE("GPL");
+
+static inline void eeprom_93cx6_pulse_high(struct eeprom_93cx6 *eeprom)
+{
+ eeprom->reg_data_clock = 1;
+ eeprom->register_write(eeprom);
+
+ /*
+ * Add a short delay for the pulse to work.
+ * According to the specifications the "maximum minimum"
+ * time should be 450ns.
+ */
+ ndelay(450);
+}
+
+static inline void eeprom_93cx6_pulse_low(struct eeprom_93cx6 *eeprom)
+{
+ eeprom->reg_data_clock = 0;
+ eeprom->register_write(eeprom);
+
+ /*
+ * Add a short delay for the pulse to work.
+ * According to the specifications the "maximum minimum"
+ * time should be 450ns.
+ */
+ ndelay(450);
+}
+
+static void eeprom_93cx6_startup(struct eeprom_93cx6 *eeprom)
+{
+ /*
+ * Clear all flags, and enable chip select.
+ */
+ eeprom->register_read(eeprom);
+ eeprom->reg_data_in = 0;
+ eeprom->reg_data_out = 0;
+ eeprom->reg_data_clock = 0;
+ eeprom->reg_chip_select = 1;
+ eeprom->register_write(eeprom);
+
+ /*
+ * kick a pulse.
+ */
+ eeprom_93cx6_pulse_high(eeprom);
+ eeprom_93cx6_pulse_low(eeprom);
+}
+
+static void eeprom_93cx6_cleanup(struct eeprom_93cx6 *eeprom)
+{
+ /*
+ * Clear chip_select and data_in flags.
+ */
+ eeprom->register_read(eeprom);
+ eeprom->reg_data_in = 0;
+ eeprom->reg_chip_select = 0;
+ eeprom->register_write(eeprom);
+
+ /*
+ * kick a pulse.
+ */
[...1896 lines suppressed...]
+ 0x63, 0x15, 0xc5 /* -66dBm */
+};
+
+void rtl8225z2_rf_init(struct ieee80211_hw *dev)
+{
+ struct rtl8187_priv *priv = dev->priv;
+ int i;
+
+ rtl8225_write(dev, 0x0, 0x2BF); msleep(1);
+ rtl8225_write(dev, 0x1, 0xEE0); msleep(1);
+ rtl8225_write(dev, 0x2, 0x44D); msleep(1);
+ rtl8225_write(dev, 0x3, 0x441); msleep(1);
+ rtl8225_write(dev, 0x4, 0x8C3); msleep(1);
+ rtl8225_write(dev, 0x5, 0xC72); msleep(1);
+ rtl8225_write(dev, 0x6, 0x0E6); msleep(1);
+ rtl8225_write(dev, 0x7, 0x82A); msleep(1);
+ rtl8225_write(dev, 0x8, 0x03F); msleep(1);
+ rtl8225_write(dev, 0x9, 0x335); msleep(1);
+ rtl8225_write(dev, 0xa, 0x9D4); msleep(1);
+ rtl8225_write(dev, 0xb, 0x7BB); msleep(1);
+ rtl8225_write(dev, 0xc, 0x850); msleep(1);
+ rtl8225_write(dev, 0xd, 0xCDF); msleep(1);
+ rtl8225_write(dev, 0xe, 0x02B); msleep(1);
+ rtl8225_write(dev, 0xf, 0x114); msleep(100);
+
+ rtl8225_write(dev, 0x0, 0x1B7);
+
+ for (i = 0; i < ARRAY_SIZE(rtl8225z2_rxgain); i++) {
+ rtl8225_write(dev, 0x1, i + 1);
+ rtl8225_write(dev, 0x2, rtl8225z2_rxgain[i]);
+ }
+
+ rtl8225_write(dev, 0x3, 0x080);
+ rtl8225_write(dev, 0x5, 0x004);
+ rtl8225_write(dev, 0x0, 0x0B7);
+ rtl8225_write(dev, 0x2, 0xc4D);
+
+ msleep(200);
+ rtl8225_write(dev, 0x2, 0x44D);
+ msleep(100);
+
+ if (!(rtl8225_read(dev, 6) & (1 << 7))) {
+ rtl8225_write(dev, 0x02, 0x0C4D);
+ msleep(200);
+ rtl8225_write(dev, 0x02, 0x044D);
+ msleep(100);
+ if (!(rtl8225_read(dev, 6) & (1 << 7)))
+ printk(KERN_WARNING "%s: RF Calibration Failed! %x\n",
+ wiphy_name(dev->wiphy), rtl8225_read(dev, 6));
+ }
+
+ msleep(200);
+
+ rtl8225_write(dev, 0x0, 0x2BF);
+
+ for (i = 0; i < ARRAY_SIZE(rtl8225_agc); i++) {
+ rtl8225_write_phy_ofdm(dev, 0xB, rtl8225_agc[i]);
+ msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0xA, 0x80 + i);
+ msleep(1);
+ }
+
+ msleep(1);
+
+ rtl8225_write_phy_ofdm(dev, 0x00, 0x01); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x01, 0x02); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x02, 0x42); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x03, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x04, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x05, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x06, 0x40); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x07, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x08, 0x40); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x09, 0xfe); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x0a, 0x08); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x0b, 0x80); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x0c, 0x01); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x0d, 0x43);
+ rtl8225_write_phy_ofdm(dev, 0x0e, 0xd3); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x0f, 0x38); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x10, 0x84); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x11, 0x07); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x12, 0x20); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x13, 0x20); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x14, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x15, 0x40); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x16, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x17, 0x40); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x19, 0x19); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1a, 0x20); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1b, 0x15); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1c, 0x04); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1d, 0xc5); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1e, 0x95); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x1f, 0x75); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x20, 0x1f); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x21, 0x17); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x22, 0x16); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x23, 0x80); msleep(1); //FIXME: not needed?
+ rtl8225_write_phy_ofdm(dev, 0x24, 0x46); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x25, 0x00); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1);
+ rtl8225_write_phy_ofdm(dev, 0x27, 0x88); msleep(1);
+
+ rtl8225_write_phy_ofdm(dev, 0x0b, rtl8225z2_gain_bg[4 * 3]);
+ rtl8225_write_phy_ofdm(dev, 0x1b, rtl8225z2_gain_bg[4 * 3 + 1]);
+ rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225z2_gain_bg[4 * 3 + 2]);
+ rtl8225_write_phy_ofdm(dev, 0x21, 0x37);
+
+ rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x13, 0xd0);
+ rtl8225_write_phy_cck(dev, 0x19, 0x00);
+ rtl8225_write_phy_cck(dev, 0x1a, 0xa0);
+ rtl8225_write_phy_cck(dev, 0x1b, 0x08);
+ rtl8225_write_phy_cck(dev, 0x40, 0x86);
+ rtl8225_write_phy_cck(dev, 0x41, 0x8d); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x44, 0x36); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x45, 0x35); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x46, 0x2e); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x47, 0x25); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x48, 0x1c); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x49, 0x12); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x4a, 0x09); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x4b, 0x04); msleep(1);
+ rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1);
+
+ rtl818x_iowrite8(priv, (u8 *)0xFF5B, 0x0D); msleep(1);
+
+ rtl8225z2_rf_set_tx_power(dev, 1);
+
+ /* RX antenna default to A */
+ rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */
+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1); /* B: 0x10 */
+
+ rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */
+ msleep(1);
+ rtl818x_iowrite32(priv, (__le32 *)0xFF94, 0x3dc00002);
+}
+
+void rtl8225_rf_stop(struct ieee80211_hw *dev)
+{
+ u8 reg;
+ struct rtl8187_priv *priv = dev->priv;
+
+ rtl8225_write(dev, 0x4, 0x1f); msleep(1);
+
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
+ rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_OFF);
+ rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_OFF);
+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
+}
+
+void rtl8225_rf_set_channel(struct ieee80211_hw *dev, int channel)
+{
+ struct rtl8187_priv *priv = dev->priv;
+
+ if (priv->rf_init == rtl8225_rf_init)
+ rtl8225_rf_set_tx_power(dev, channel);
+ else
+ rtl8225z2_rf_set_tx_power(dev, channel);
+
+ rtl8225_write(dev, 0x7, rtl8225_chan[channel - 1]);
+ msleep(10);
+}
--- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig 2007-07-08 19:32:17.000000000 -0400
+++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig 2007-07-11 14:38:44.000000000 -0400
@@ -546,6 +546,18 @@ config USB_ZD1201
To compile this driver as a module, choose M here: the
module will be called zd1201.
+config RTL8187
+ tristate "Realtek 8187 USB support"
+ depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
+ select EEPROM_93CX6
+ ---help---
+ This is a driver for RTL8187 based cards.
+ These are USB based chips found in cards such as:
+
+ Netgear WG111v2
+
+ Thanks to Realtek for their support!
+
source "drivers/net/wireless/hostap/Kconfig"
source "drivers/net/wireless/bcm43xx/Kconfig"
source "drivers/net/wireless/zd1211rw/Kconfig"
git-wireless-dev.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.13 -r 1.14 git-wireless-dev.patch
Index: git-wireless-dev.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/git-wireless-dev.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- git-wireless-dev.patch 10 Jul 2007 16:14:59 -0000 1.13
+++ git-wireless-dev.patch 11 Jul 2007 18:51:31 -0000 1.14
@@ -1,5 +1,5 @@
---- linux-2.6.21.noarch/CREDITS.orig 2007-06-25 09:16:57.000000000 -0400
-+++ linux-2.6.21.noarch/CREDITS 2007-06-25 09:55:35.000000000 -0400
+--- linux-2.6.22.noarch/CREDITS.orig 2007-07-08 19:32:17.000000000 -0400
++++ linux-2.6.22.noarch/CREDITS 2007-07-11 12:00:55.000000000 -0400
@@ -665,6 +665,11 @@ D: Minor updates to SCSI types, added /p
S: (ask for current address)
S: USA
@@ -66,8 +66,8 @@
N: Lars Wirzenius
E: liw at iki.fi
D: Linux System Administrator's Guide, author, former maintainer
---- linux-2.6.21.noarch/include/linux/nl80211.h.orig 2007-06-25 09:16:53.000000000 -0400
-+++ linux-2.6.21.noarch/include/linux/nl80211.h 2007-06-25 09:55:35.000000000 -0400
+--- linux-2.6.22.noarch/include/linux/nl80211.h.orig 2007-07-08 19:32:17.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/nl80211.h 2007-07-11 12:00:55.000000000 -0400
@@ -7,6 +7,217 @@
*/
@@ -343,8 +343,8 @@
+#define NL80211_KEYTYPE_MAX (__NL80211_KEYTYPE_AFTER_LAST - 1)
+
#endif /* __LINUX_NL80211_H */
---- linux-2.6.21.noarch/include/linux/ieee80211.h.orig 2007-06-25 09:16:53.000000000 -0400
-+++ linux-2.6.21.noarch/include/linux/ieee80211.h 2007-06-25 09:55:35.000000000 -0400
+--- linux-2.6.22.noarch/include/linux/ieee80211.h.orig 2007-07-08 19:32:17.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/ieee80211.h 2007-07-11 12:00:55.000000000 -0400
@@ -106,6 +106,75 @@ struct ieee80211_hdr {
} __attribute__ ((packed));
@@ -643,88 +643,8 @@
+};
+
#endif /* IEEE80211_H */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/eeprom_93cx6.h 2007-06-25 09:55:35.000000000 -0400
-@@ -0,0 +1,77 @@
-+/*
-+ Copyright (C) 2004 - 2006 rt2x00 SourceForge Project
-+ <http://rt2x00.serialmonkey.com>
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the
-+ Free Software Foundation, Inc.,
-+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ */
-+
-+/*
-+ Module: eeprom_93cx6
-+ Abstract: EEPROM reader datastructures for 93cx6 chipsets.
-+ Supported chipsets: 93c46 & 93c66.
-+ */
-+
-+/*
-+ * EEPROM operation defines.
-+ */
-+#define PCI_EEPROM_WIDTH_93C46 6
-+#define PCI_EEPROM_WIDTH_93C66 8
-+#define PCI_EEPROM_WIDTH_OPCODE 3
-+#define PCI_EEPROM_WRITE_OPCODE 0x05
-+#define PCI_EEPROM_READ_OPCODE 0x06
-+#define PCI_EEPROM_EWDS_OPCODE 0x10
-+#define PCI_EEPROM_EWEN_OPCODE 0x13
-+
-+/**
-+ * struct eeprom_93cx6 - control structure for setting the commands
-+ * for reading the eeprom data.
-+ * @data: private pointer for the driver.
-+ * @register_read(struct eeprom_93cx6 *eeprom): handler to
-+ * read the eeprom register, this function should set all reg_* fields.
-+ * @register_write(struct eeprom_93cx6 *eeprom): handler to
-+ * write to the eeprom register by using all reg_* fields.
-+ * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines
-+ * @reg_data_in: register field to indicate data input
-+ * @reg_data_out: register field to indicate data output
-+ * @reg_data_clock: register field to set the data clock
-+ * @reg_chip_select: register field to set the chip select
-+ *
-+ * This structure is used for the communication between the driver
-+ * and the eeprom_93cx6 handlers for reading the eeprom.
-+ */
-+struct eeprom_93cx6 {
-+ void *data;
-+
-+ void (*register_read)(struct eeprom_93cx6 *eeprom);
-+ void (*register_write)(struct eeprom_93cx6 *eeprom);
-+
-+ int width;
-+
-+ char reg_data_in;
-+ char reg_data_out;
-+ char reg_data_clock;
-+ char reg_chip_select;
-+};
-+
-+extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom,
-+ const u8 word, u16 *data);
-+extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom,
-+ const u8 word, __le16 *data, const u16 words);
-+
-+extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom,
-+ const u8 word, u16 data);
-+extern void eeprom_93cx6_multiwrite(struct eeprom_93cx6 *eeprom,
-+ const u8 word, __le16 *data, const u16 words);
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/ssb/ssb_driver_chipcommon.h 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_chipcommon.h 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,387 @@
+#ifndef LINUX_SSB_CHIPCO_H_
+#define LINUX_SSB_CHIPCO_H_
@@ -1113,8 +1033,8 @@
+
+#endif /* __KERNEL__ */
+#endif /* LINUX_SSB_CHIPCO_H_ */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/ssb/ssb_driver_extif.h 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_extif.h 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,163 @@
+/*
+ * Hardware-specific External Interface I/O core definitions
@@ -1279,8 +1199,8 @@
+
+#endif /* __KERNEL__ */
+#endif /* LINUX_SSB_EXTIFCORE_H_ */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/ssb/ssb_driver_mips.h 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_mips.h 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,47 @@
+#ifndef LINUX_SSB_MIPSCORE_H_
+#define LINUX_SSB_MIPSCORE_H_
@@ -1329,8 +1249,8 @@
+
+#endif /* __KERNEL__ */
+#endif /* LINUX_SSB_MIPSCORE_H_ */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/ssb/ssb_regs.h 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_regs.h 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,294 @@
+#ifndef LINUX_SSB_REGS_H_
+#define LINUX_SSB_REGS_H_
@@ -1535,16 +1455,16 @@
+#define SSB_SPROM1_GPIOB_P3 0xFF00 /* Pin 3 */
+#define SSB_SPROM1_GPIOB_P3_SHIFT 8
+#define SSB_SPROM1_MAXPWR 0x1068 /* Power Amplifier Max Power */
-+#define SSB_SPROM1_MAXPWR_A 0x00FF /* A-PHY (in dBm Q5.2) */
-+#define SSB_SPROM1_MAXPWR_BG 0xFF00 /* B-PHY and G-PHY (in dBm Q5.2) */
-+#define SSB_SPROM1_MAXPWR_BG_SHIFT 8
++#define SSB_SPROM1_MAXPWR_BG 0x00FF /* B-PHY and G-PHY (in dBm Q5.2) */
++#define SSB_SPROM1_MAXPWR_A 0xFF00 /* A-PHY (in dBm Q5.2) */
++#define SSB_SPROM1_MAXPWR_A_SHIFT 8
+#define SSB_SPROM1_PA1B0 0x106A
+#define SSB_SPROM1_PA1B1 0x106C
+#define SSB_SPROM1_PA1B2 0x106E
+#define SSB_SPROM1_ITSSI 0x1070 /* Idle TSSI Target */
-+#define SSB_SPROM1_ITSSI_A 0x00FF /* A-PHY */
-+#define SSB_SPROM1_ITSSI_BG 0xFF00 /* B-PHY and G-PHY */
-+#define SSB_SPROM1_ITSSI_BG_SHIFT 8
++#define SSB_SPROM1_ITSSI_BG 0x00FF /* B-PHY and G-PHY*/
++#define SSB_SPROM1_ITSSI_A 0xFF00 /* A-PHY */
++#define SSB_SPROM1_ITSSI_A_SHIFT 8
+#define SSB_SPROM1_BFLLO 0x1072 /* Boardflags (low 16 bits) */
+#define SSB_SPROM1_AGAIN 0x1074 /* Antenna Gain (in dBm Q5.2) */
+#define SSB_SPROM1_AGAIN_A 0x00FF /* A-PHY */
@@ -1626,8 +1546,8 @@
+
+#endif /* __KERNEL__ */
+#endif /* LINUX_SSB_REGS_H_ */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/include/linux/ssb/ssb_driver_pci.h 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_pci.h 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,108 @@
+#ifndef LINUX_SSB_PCICORE_H_
+#define LINUX_SSB_PCICORE_H_
@@ -1737,9 +1657,9 @@
+#endif /* CONFIG_SSB_DRIVER_PCICORE */
+#endif /* __KERNEL__ */
+#endif /* LINUX_SSB_PCICORE_H_ */
[...24897 lines suppressed...]
++ SSB_SPROM1_MAXPWR_A_SHIFT);
++ SPEX(maxpwr_bg, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_BG, 0);
++ SPEX(itssi_a, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_A,
++ SSB_SPROM1_ITSSI_A_SHIFT);
++ SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0);
+ SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0);
+ SPEX(antenna_gain_a, SSB_SPROM1_AGAIN, SSB_SPROM1_AGAIN_A, 0);
+ SPEX(antenna_gain_bg, SSB_SPROM1_AGAIN, SSB_SPROM1_AGAIN_BG,
@@ -91125,7 +87287,8 @@
+ out->ofdmgpo |= (in[SPOFF(SSB_SPROM3_OFDMGPO) + 1] & 0x00FF) << 8;
+}
+
-+static int sprom_extract(struct ssb_sprom *out, const u16 *in)
++static int sprom_extract(struct ssb_bus *bus,
++ struct ssb_sprom *out, const u16 *in)
+{
+ memset(out, 0, sizeof(*out));
+
@@ -91133,16 +87296,23 @@
+ SPEX(crc, SSB_SPROM_REVISION, SSB_SPROM_REVISION_CRC,
+ SSB_SPROM_REVISION_CRC_SHIFT);
+
-+ if (out->revision == 0)
-+ goto unsupported;
-+ if (out->revision >= 1 && out->revision <= 3)
++ if ((bus->chip_id & 0xFF00) == 0x4400) {
++ /* Workaround: The BCM44XX chip has a stupid revision
++ * number stored in the SPROM.
++ * Always extract r1. */
+ sprom_extract_r1(&out->r1, in);
-+ if (out->revision >= 2 && out->revision <= 3)
-+ sprom_extract_r2(&out->r2, in);
-+ if (out->revision == 3)
-+ sprom_extract_r3(&out->r3, in);
-+ if (out->revision >= 4)
-+ goto unsupported;
++ } else {
++ if (out->revision == 0)
++ goto unsupported;
++ if (out->revision >= 1 && out->revision <= 3)
++ sprom_extract_r1(&out->r1, in);
++ if (out->revision >= 2 && out->revision <= 3)
++ sprom_extract_r2(&out->r2, in);
++ if (out->revision == 3)
++ sprom_extract_r3(&out->r3, in);
++ if (out->revision >= 4)
++ goto unsupported;
++ }
+
+ return 0;
+unsupported:
@@ -91152,13 +87322,12 @@
+ return 0;
+}
+
-+int ssb_pci_sprom_get(struct ssb_bus *bus)
++static int ssb_pci_sprom_get(struct ssb_bus *bus,
++ struct ssb_sprom *sprom)
+{
+ int err = -ENOMEM;
+ u16 *buf;
+
-+ assert(bus->bustype == SSB_BUSTYPE_PCI);
-+
+ buf = kcalloc(SSB_SPROMSIZE_WORDS, sizeof(u16), GFP_KERNEL);
+ if (!buf)
+ goto out;
@@ -91168,21 +87337,36 @@
+ ssb_printk(KERN_WARNING PFX
+ "WARNING: Invalid SPROM CRC (corrupt SPROM)\n");
+ }
-+ err = sprom_extract(&bus->sprom, buf);
++ err = sprom_extract(bus, sprom, buf);
+
+ kfree(buf);
+out:
+ return err;
+}
+
-+void ssb_pci_get_boardtype(struct ssb_bus *bus)
++static void ssb_pci_get_boardinfo(struct ssb_bus *bus,
++ struct ssb_boardinfo *bi)
+{
+ pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_VENDOR_ID,
-+ &bus->board_vendor);
++ &bi->vendor);
+ pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_ID,
-+ &bus->board_type);
++ &bi->type);
+ pci_read_config_word(bus->host_pci, PCI_REVISION_ID,
-+ &bus->board_rev);
++ &bi->rev);
++}
++
++int ssb_pci_get_invariants(struct ssb_bus *bus,
++ struct ssb_init_invariants *iv)
++{
++ int err;
++
++ err = ssb_pci_sprom_get(bus, &iv->sprom);
++ if (err)
++ goto out;
++ ssb_pci_get_boardinfo(bus, &iv->boardinfo);
++
++out:
++ return err;
+}
+
+static u16 ssb_pci_read16(struct ssb_device *dev, u16 offset)
@@ -91378,18 +87562,12 @@
+ err = device_create_file(&pdev->dev, &dev_attr_ssb_sprom);
+ if (err)
+ goto out;
-+ err = ssb_pci_sprom_get(bus);
-+ if (err)
-+ goto err_remove_sprom_file;
+
+out:
+ return err;
-+err_remove_sprom_file:
-+ device_remove_file(&pdev->dev, &dev_attr_ssb_sprom);
-+ return err;
+}
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/drivers/ssb/driver_chipcommon.c 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/drivers/ssb/driver_chipcommon.c 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,402 @@
+/*
+ * Sonics Silicon Backplane
@@ -91686,15 +87864,15 @@
+
+ /* set register for external IO to control LED. */
+ chipco_write32(cc, SSB_CHIPCO_PROG_CFG, 0x11);
-+ tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
-+ tmp |= ceildiv(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */
-+ tmp |= ceildiv(240, ns); /* Waitcount-0 = 240ns */
++ tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
++ tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */
++ tmp |= DIV_ROUND_UP(240, ns); /* Waitcount-0 = 240ns */
+ chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp); /* 0x01020a0c for a 100Mhz clock */
+
+ /* Set timing for the flash */
-+ tmp = ceildiv(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */
-+ tmp |= ceildiv(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */
-+ tmp |= ceildiv(120, ns); /* Waitcount-0 = 120nS */
++ tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */
++ tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */
++ tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120nS */
+ if ((bus->chip_id == 0x5365) ||
+ (dev->id.revision < 9))
+ chipco_write32(cc, SSB_CHIPCO_FLASH_WAITCNT, tmp);
@@ -91705,10 +87883,10 @@
+
+ if (bus->chip_id == 0x5350) {
+ /* Enable EXTIF */
-+ tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
-+ tmp |= ceildiv(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */
-+ tmp |= ceildiv(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */
-+ tmp |= ceildiv(120, ns); /* Waitcount-0 = 120ns */
++ tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
++ tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */
++ tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */
++ tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120ns */
+ chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp); /* 0x01020a0c for a 100Mhz clock */
+ }
+}
@@ -91793,8 +87971,8 @@
+ return nr_ports;
+}
+#endif /* CONFIG_SSB_SERIAL */
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/drivers/ssb/Kconfig 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/drivers/ssb/Kconfig 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,93 @@
+menu "Sonics Silicon Backplane"
+
@@ -91889,8 +88067,8 @@
+ If unsure, say N
+
+endmenu
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/drivers/ssb/scan.c 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/drivers/ssb/scan.c 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,407 @@
+/*
+ * Sonics Silicon Backplane
@@ -92299,8 +88477,8 @@
+ ssb_iounmap(bus);
+ goto out;
+}
---- /dev/null 2007-06-25 08:13:03.438982207 -0400
-+++ linux-2.6.21.noarch/drivers/ssb/driver_pcicore.c 2007-06-25 09:55:35.000000000 -0400
+--- /dev/null 2007-07-11 10:53:53.353955061 -0400
++++ linux-2.6.22.noarch/drivers/ssb/driver_pcicore.c 2007-07-11 12:00:55.000000000 -0400
@@ -0,0 +1,556 @@
+/*
+ * Sonics Silicon Backplane
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3267
retrieving revision 1.3268
diff -u -r1.3267 -r1.3268
--- kernel-2.6.spec 11 Jul 2007 15:38:12 -0000 1.3267
+++ kernel-2.6.spec 11 Jul 2007 18:51:31 -0000 1.3268
@@ -556,6 +556,8 @@
Patch661: linux-2.6-libata-ich8m-add-pciid.patch
Patch670: linux-2.6-ata-quirk.patch
Patch680: git-wireless-dev.patch
+Patch681: git-iwlwifi.patch
+Patch682: linux-2.6-rtl8187.patch
Patch690: linux-2.6-e1000-ich9.patch
Patch710: linux-2.6-bcm43xx-pci-neuter.patch
#Patch780: linux-2.6-clockevents-fix-resume-logic.patch
@@ -1162,8 +1164,12 @@
# ia64 ata quirk
ApplyPatch linux-2.6-ata-quirk.patch
+# Add the rtl8187 driver from upstream (remove after update to 2.6.22-git1)
+ApplyPatch linux-2.6-rtl8187.patch
# Add the new wireless stack and drivers from wireless-dev
ApplyPatch git-wireless-dev.patch
+# Add iwlwifi from intellinuxwireless.org
+ApplyPatch git-iwlwifi.patch
# add patch from markmc so that e1000 supports ICH9
ApplyPatch linux-2.6-e1000-ich9.patch
# avoid bcm3xx vs bcm43xx-mac80211 PCI ID conflicts
@@ -2095,6 +2101,11 @@
%endif
%changelog
+* Wed Jul 11 2007 John W. Linville <linville at redhat.com>
+- Update git-wireless-dev.patch
+- Add upstream version of rtl8187 patch
+- Add updated iwlwifi driver from intellinuxwireless.org
+
* Tue Jul 10 2007 Dave Jones <davej at redhat.com>
- Fix issue with PIE randomization (#246623).
More information about the scm-commits
mailing list