rpms/kernel/devel git-iwlwifi.patch, 1.10, 1.11 kernel-2.6.spec, 1.3212, 1.3213 linux-2.6-bcm43xx-pci-neuter.patch, 1.1, 1.2
John W. Linville (linville)
fedora-extras-commits at redhat.com
Thu Jun 7 20:13:21 UTC 2007
Author: linville
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18918
Modified Files:
kernel-2.6.spec linux-2.6-bcm43xx-pci-neuter.patch
Added Files:
git-iwlwifi.patch
Log Message:
re-add git-iwlwifi.patch, update to 0.0.24
git-iwlwifi.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.10 -r 1.11 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 7 Jun 2007 20:12:42 -0000 1.11
@@ -0,0 +1,2692 @@
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/Makefile.orig 2007-06-07 15:54:56.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/Makefile 2007-06-07 15:55:11.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)
+@@ -10,8 +10,9 @@
+ # -jpk
+
+ obj-$(CONFIG_IWL3945) += iwl3945.o
+-iwl3945-objs = base-3945.o iwl-3945.o
++iwl3945-objs = base-3945.o iwl-3945.o iwl-3945-rs.o
+ 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.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-commands.h.orig 2007-06-07 15:54:56.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-commands.h 2007-06-07 15:55:11.000000000 -0400
+@@ -204,8 +204,6 @@ enum {
+ * TX command Frame life time
+ */
+
+-#define MAX_REAL_TX_QUEUE_NUM 5
+-
+ #if IWL == 3945
+ struct iwl_rate {
+ union {
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945-rs.h.orig 2007-06-07 15:54:56.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945-rs.h 2007-06-07 15:55:11.000000000 -0400
+@@ -172,4 +172,49 @@ static inline u8 iwl_get_prev_ieee_rate(
+ return rate;
+ }
+
++#if IWL == 3945
++/**
++ * iwl_fill_rs_info - Fill an output text buffer with the rate representation
++ *
++ * NOTE: This is provided as a quick mechanism for a user to visualize
++ * the performance of the rate control alogirthm and is not meant to be
++ * parsed software.
++ */
++extern int iwl_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);
++
++/**
++ * iwl_rate_scale_init - Initialize the rate scale table based on assoc info
++ *
++ * The specific througput table used is based on the type of network
++ * the associated with, including A, B, G, and G w/ TGG protection
++ */
++extern void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id);
++
++/**
++ * iwl_rate_control_register - Register the rate control algorithm callbacks
++ *
++ * Since the rate control algorithm is hardware specific, there is no need
++ * or reason to place it as a stand alone module. The driver can call
++ * iwl_rate_control_register in order to register the rate control callbacks
++ * with the mac80211 subsystem. This should be performed prior to calling
++ * ieee80211_register_hw
++ *
++ */
++extern void iwl_rate_control_register(void);
++
++/**
++ * iwl_rate_control_unregister - Unregister the rate control callbacks
++ *
++ * This should be called after calling ieee80211_unregister_hw, but before
++ * the driver is unloaded.
++ */
++extern void iwl_rate_control_unregister(void);
++#else
++static inline int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
++{ return -ENOTSUPP; }
++static inline void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) {}
++static inline void iwl_rate_control_register(void) {}
++static inline void iwl_rate_control_unregister(void) {}
++#endif /* IWL == 3945 */
++
+ #endif
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945.c.orig 2007-06-07 15:54:56.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-3945.c 2007-06-07 15:55:11.000000000 -0400
+@@ -2392,10 +2392,9 @@ int iwl_hw_get_beacon_cmd(struct iwl_pri
+ tx_beacon_cmd->tx.stop_time.life_time = 0xFFFFFFFF;
+
+ frame_size = iwl_fill_beacon_frame(priv,
+- tx_beacon_cmd->frame,
+- BROADCAST_ADDR,
+- sizeof(frame->u) -
+- sizeof(*tx_beacon_cmd));
++ tx_beacon_cmd->frame,
++ BROADCAST_ADDR,
++ sizeof(frame->u) - sizeof(*tx_beacon_cmd));
+
+ tx_beacon_cmd->tx.len = frame_size;
+
+--- linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965.c.orig 2007-06-07 15:54:56.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/mac80211/iwlwifi/iwl-4965.c 2007-06-07 15:55:11.000000000 -0400
+@@ -301,7 +301,7 @@ static void iwl4965_kw_free(struct iwl_p
+ {
+ struct pci_dev *dev = priv->pci_dev;
+ struct iwl_kw *kw = &priv->kw;
+- if (!kw->v_addr) {
++ if (kw->v_addr) {
+ pci_free_consistent(dev, kw->size, kw->v_addr, kw->dma_addr);
+ memset(kw, 0, sizeof(*kw));
+ }
+@@ -349,9 +349,8 @@ static int iwl4965_txq_ctx_reset(struct
+
+ /* Tx queue(s) */
+ for (txq_id = 0; txq_id < priv->hw_setting.max_queue_number; txq_id++) {
+- num_slots =
+- (txq_id ==
+- IWL_CMD_QUEUE_NUM) ? TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
++ num_slots = (txq_id == IWL_CMD_QUEUE_NUM) ?
++ TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
+ rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], num_slots,
+ txq_id);
+ if (rc) {
+@@ -1834,7 +1833,7 @@ static void iwl4965_get_supported_rates(
+ }
+
+ #define RTS_HCCA_RETRY_LIMIT 3
+-#define RTS_DFAULT_RETRY_LIMIT 7
++#define RTS_DFAULT_RETRY_LIMIT 60
+
+ void iwl_hw_build_tx_cmd_rate(struct iwl_priv *priv,
+ struct iwl_cmd *cmd,
+@@ -1933,17 +1932,15 @@ int iwl_hw_get_beacon_cmd(struct iwl_pri
+ tx_beacon_cmd->tx.stop_time.life_time = 0xFFFFFFFF;
+
+ frame_size = iwl_fill_beacon_frame(priv,
+- tx_beacon_cmd->frame,
+- BROADCAST_ADDR,
+- sizeof(frame->u) -
+- sizeof(*tx_beacon_cmd));
++ tx_beacon_cmd->frame,
++ BROADCAST_ADDR,
++ sizeof(frame->u) - sizeof(*tx_beacon_cmd));
+
+ tx_beacon_cmd->tx.len = frame_size;
+
+ tx_beacon_cmd->tx.rate.rate_n_flags = rate;
+ tx_beacon_cmd->tx.tx_flags = (TX_CMD_FLG_SEQ_CTL_MSK |
+- TX_CMD_FLG_TSF_MSK |
+- TX_CMD_FLG_STA_RATE_MSK);
++ TX_CMD_FLG_TSF_MSK | TX_CMD_FLG_STA_RATE_MSK);
+ return (sizeof(*tx_beacon_cmd) + frame_size);
+ }
+
+@@ -1971,46 +1968,6 @@ int iwl_hw_tx_queue_init(struct iwl_priv
+ return 0;
+ }
+
+-int iwl_hw_tx_queue_alloc(struct iwl_priv *priv,
+- struct iwl_tx_queue *txq, int count, u32 id)
+-{
+- struct pci_dev *dev = priv->pci_dev;
+-
+- if (id != IWL_CMD_QUEUE_NUM) {
+- txq->txb = kmalloc(sizeof(txq->txb[0]) *
+- TFD_QUEUE_SIZE_MAX, GFP_ATOMIC);
+- if (!txq->txb) {
+- IWL_ERROR("kmalloc for auxilary BD "
+- "structures failed\n");
+- goto error;
+- }
+- } else
+- txq->txb = NULL;
+-
+- txq->bd = (u8 *)
+- pci_alloc_consistent(dev,
+- sizeof(struct iwl_tfd_frame) *
+- TFD_QUEUE_SIZE_MAX, &txq->q.dma_addr);
+-
+- txq->q.element_size = sizeof(struct iwl_tfd_frame);
+- if (!txq->bd) {
+- IWL_ERROR("pci_alloc_consistent(%zd) failed\n",
+- sizeof(txq->bd[0]) * count);
+- goto error;
+- }
+- txq->q.id = id;
+-
+- return 0;
+-
+- error:
+- if (txq->txb) {
+- kfree(txq->txb);
[...2299 lines suppressed...]
++ switch (scale_action) {
++ case -1:
++ if (low != IWL_RATE_INVALID)
++ index = low;
++ break;
++
++ case 1:
++ if (high != IWL_RATE_INVALID)
++ index = high;
++
++ break;
++
++ case 0:
++ default:
++ break;
++ }
++
++ IWL_DEBUG_RATE("Selected %d (action %d) - low %d high %d\n",
++ index, scale_action, low, high);
++
++ out:
++
++ sta->last_txrate = index;
++ sta->txrate = sta->last_txrate;
++ sta_info_put(sta);
++
++ IWL_DEBUG_RATE("leave: %d\n", index);
++
++ return &priv->ieee_rates[index];
++}
++
++static struct rate_control_ops rs_ops = {
++ .module = NULL,
++ .name = RS_NAME,
++ .tx_status = rs_tx_status,
++ .get_rate = rs_get_rate,
++ .rate_init = rs_rate_init,
++ .clear = rs_clear,
++ .alloc = rs_alloc,
++ .free = rs_free,
++ .alloc_sta = rs_alloc_sta,
++ .free_sta = rs_free_sta,
++};
++
++int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
++{
++ struct ieee80211_local *local = hw_to_local(hw);
++ struct iwl_priv *priv = hw->priv;
++ struct iwl_rate_scale_priv *rs_priv;
++ struct sta_info *sta;
++ unsigned long flags;
++ int count = 0, i;
++ u32 samples = 0, success = 0, good = 0;
++ unsigned long now = jiffies;
++ u32 max_time = 0;
++
++ sta = sta_info_get(local, priv->stations[sta_id].sta.sta.addr);
++ if (!sta || !sta->rate_ctrl_priv) {
++ if (sta) {
++ sta_info_put(sta);
++ IWL_DEBUG_RATE("leave - no private rate data!\n");
++ } else
++ IWL_DEBUG_RATE("leave - no station!\n");
++ return sprintf(buf, "station %d not found\n", sta_id);
++ }
++
++ rs_priv = (void *)sta->rate_ctrl_priv;
++ spin_lock_irqsave(&rs_priv->lock, flags);
++ i = IWL_RATE_54M_INDEX;
++ while (1) {
++ u64 mask;
++ int j;
++
++ count +=
++ sprintf(&buf[count], " %2dMbs: ", iwl_rates[i].ieee / 2);
++
++ mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1));
++ for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1)
++ buf[count++] =
++ (rs_priv->win[i].data & mask) ? '1' : '0';
++
++ samples += rs_priv->win[i].counter;
++ good += rs_priv->win[i].success_counter;
++ success += rs_priv->win[i].success_counter * iwl_rates[i].ieee;
++
++ if (rs_priv->win[i].stamp) {
++ int delta =
++ jiffies_to_msecs(now - rs_priv->win[i].stamp);
++
++ if (delta > max_time)
++ max_time = delta;
++
++ count += sprintf(&buf[count], "%5dms\n", delta);
++ } else
++ buf[count++] = '\n';
++
++ j = iwl_get_prev_ieee_rate(i);
++ if (j == i)
++ break;
++ i = j;
++ }
++ spin_unlock_irqrestore(&rs_priv->lock, flags);
++ sta_info_put(sta);
++
++ /* Display the average rate of all samples taken.
++ *
++ * NOTE: We multiple # of samples by 2 since the IEEE measurement
++ * added from iwl_rates is actually 2X the rate */
++ if (samples)
++ count += sprintf(
++ &buf[count],
++ "\nAverage rate is %3d.%02dMbs over last %4dms\n"
++ "%3d%% success (%d good packets over %d tries)\n",
++ success / (2 * samples), (success * 5 / samples) % 10,
++ max_time, good * 100 / samples, good, samples);
++ else
++ count += sprintf(&buf[count], "\nAverage rate: 0Mbs\n");
++
++ return count;
++}
++
++void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
++{
++ struct iwl_priv *priv = hw->priv;
++ s32 rssi = 0;
++ unsigned long flags;
++ struct ieee80211_local *local = hw_to_local(hw);
++ struct iwl_rate_scale_priv *rs_priv;
++ struct sta_info *sta;
++
++ IWL_DEBUG_RATE("enter\n");
++
++ if (!local->rate_ctrl->ops->name ||
++ strcmp(local->rate_ctrl->ops->name, RS_NAME)) {
++ IWL_WARNING("iwl-3945-rs not selected as rate control "
++ "aglo!\n");
++ IWL_DEBUG_RATE("leave - mac80211 picked the wrong RC algo.\n");
++ return;
++ }
++
++ sta = sta_info_get(local, priv->stations[sta_id].sta.sta.addr);
++ if (!sta || !sta->rate_ctrl_priv) {
++ if (sta)
++ sta_info_put(sta);
++ IWL_DEBUG_RATE("leave - no private rate data!\n");
++ return;
++ }
++
++ rs_priv = (void *)sta->rate_ctrl_priv;
++
++ spin_lock_irqsave(&rs_priv->lock, flags);
++
++ rs_priv->tgg = 0;
++ switch (priv->phymode) {
++ case MODE_IEEE80211G:
++ if (priv->active_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) {
++ rs_priv->tgg = 1;
++ rs_priv->expected_tpt = iwl_expected_tpt_g_prot;
++ } else
++ rs_priv->expected_tpt = iwl_expected_tpt_g;
++ break;
++
++ case MODE_IEEE80211A:
++ rs_priv->expected_tpt = iwl_expected_tpt_a;
++ break;
++
++ default:
++ IWL_WARNING("Invalid phymode. Defaulting to 802.11b\n");
++ case MODE_IEEE80211B:
++ rs_priv->expected_tpt = iwl_expected_tpt_b;
++ break;
++ }
++
++ sta_info_put(sta);
++ spin_unlock_irqrestore(&rs_priv->lock, flags);
++
++ rssi = priv->last_rx_rssi;
++ if (rssi == 0)
++ rssi = IWL_MIN_RSSI_VAL;
++
++ IWL_DEBUG(IWL_DL_INFO | IWL_DL_RATE, "Network RSSI: %d\n", rssi);
++
++ rs_priv->start_rate = iwl_get_rate_index_by_rssi(rssi, priv->phymode);
++
++ IWL_DEBUG_RATE("leave: rssi %d assign rate index: "
++ "%d (plcp 0x%x)\n", rssi, rs_priv->start_rate,
++ iwl_rates[rs_priv->start_rate].plcp);
++}
++
++void iwl_rate_control_register(void)
++{
++ ieee80211_rate_control_register(&rs_ops);
++}
++
++void iwl_rate_control_unregister(void)
++{
++ ieee80211_rate_control_unregister(&rs_ops);
++}
++
++
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3212
retrieving revision 1.3213
diff -u -r1.3212 -r1.3213
--- kernel-2.6.spec 7 Jun 2007 16:38:09 -0000 1.3212
+++ kernel-2.6.spec 7 Jun 2007 20:12:42 -0000 1.3213
@@ -443,7 +443,8 @@
Patch650: linux-2.6-sata-promise-pata-ports.patch
Patch660: linux-2.6-libata-ali-atapi-dma.patch
Patch670: linux-2.6-ata-quirk.patch
-Patch690: git-wireless-dev.patch
+Patch680: git-wireless-dev.patch
+Patch690: git-iwlwifi.patch
Patch710: linux-2.6-bcm43xx-pci-neuter.patch
Patch780: linux-2.6-clockevents-fix-resume-logic.patch
Patch790: linux-2.6-acpi-dock-oops.patch
@@ -1049,8 +1050,10 @@
# Add the new wireless stack and drivers from wireless-dev
ApplyPatch git-wireless-dev.patch
-# avoid bcm43xx vs bcm43xx-mac80211 PCI ID conflicts
-#ApplyPatch linux-2.6-bcm43xx-pci-neuter.patch
+# Update the iwlwifi drivers from www.intellinuxwireless.org git tree
+ApplyPatch git-iwlwifi.patch
+# avoid bcm3xx vs bcm43xx-mac80211 PCI ID conflicts
+ApplyPatch linux-2.6-bcm43xx-pci-neuter.patch
# Assorted dyntick/clock/timer fixes.
ApplyPatch linux-2.6-clockevents-fix-resume-logic.patch
@@ -2022,6 +2025,9 @@
%changelog
* Thu Jun 07 2007 John W. Linville <linville at redhat.com>
+- Re-introduce iwlwifi patch w/ update to version 0.0.24
+
+* Thu Jun 07 2007 John W. Linville <linville at redhat.com>
- Refresh wireless-dev patch to work w/ 2.6.22 base.
* Wed Jun 06 2007 Dave Jones <davej at redhat.com>
linux-2.6-bcm43xx-pci-neuter.patch:
Index: linux-2.6-bcm43xx-pci-neuter.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-bcm43xx-pci-neuter.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-bcm43xx-pci-neuter.patch 8 May 2007 18:57:27 -0000 1.1
+++ linux-2.6-bcm43xx-pci-neuter.patch 7 Jun 2007 20:12:42 -0000 1.2
@@ -1,6 +1,6 @@
---- linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c.orig 2007-05-08 14:16:48.000000000 -0400
-+++ linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2007-05-08 14:17:35.000000000 -0400
-@@ -124,6 +124,7 @@
+--- linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c.orig 2007-06-07 16:02:15.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c 2007-06-07 16:03:50.000000000 -0400
+@@ -120,6 +120,7 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for
static struct pci_device_id bcm43xx_pci_tbl[] = {
/* Broadcom 4303 802.11b */
{ PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
@@ -8,10 +8,10 @@
/* Broadcom 4307 802.11b */
{ PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
/* Broadcom 4311 802.11(a)/b/g */
-@@ -146,6 +147,7 @@
- /* SB bus on BCM947xx */
- { PCI_VENDOR_ID_BROADCOM, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- #endif
+@@ -138,6 +139,7 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for
+ { PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ /* Broadcom 43XG 802.11b/g */
+ { PCI_VENDOR_ID_BROADCOM, 0x4325, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+#endif
{ 0 },
};
More information about the fedora-extras-commits
mailing list