In this series we have a few 3945 patches. They are mostly fixes and one
patch that continues the 3945 port to use iwlcore. We also include a fix
when using WEP and some patches providing extra information for users when
driver encounters a problem.
[PATCH 1/8] iwl3945: fix sparse error
[PATCH 2/8] iwl3945: use iwl_led structure
[PATCH 3/8] iwl3945 : fix rate scaling
[PATCH 4/8] iwl3945: use iwl_tx_cmd_complete
[PATCH 5/8] iwl3945: unmap previously mapped memory
[PATCH 6/8] iwlagn: fix warning when set WEP key
[PATCH 7/8] iwlwifi: print contents of control register when error occurs
[PATCH 8/8] iwlwifi: correct log level when error occurs
Thank you
Reinette
From: Abhijeet Kolekar <[email protected]>
Patch fixes the bug 1900 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
Issues:
Throughput and success ratio calculations were not done properly.
Number of retries were exceeding 16.
Fix:
Patch fixes above issues by doing window calculations inline with iwlwifi
Patch adds sanity check to limit number of retries to 16.
Signed-off-by: Abhijeet Kolekar <[email protected]>
Acked-by: Mohamed Abbas <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 127 +++++++++++++++++++---------
1 files changed, 88 insertions(+), 39 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index a266458..f65c308 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -127,6 +127,7 @@ static struct iwl3945_tpt_entry iwl3945_tpt_table_g[] = {
#define IWL_RATE_MIN_FAILURE_TH 8
#define IWL_RATE_MIN_SUCCESS_TH 8
#define IWL_RATE_DECREASE_TH 1920
+#define IWL_RATE_RETRY_TH 15
static u8 iwl3945_get_rate_index_by_rssi(s32 rssi, enum ieee80211_band band)
{
@@ -298,37 +299,53 @@ static void iwl3945_collect_tx_data(struct iwl3945_rs_sta *rs_sta,
}
spin_lock_irqsave(&rs_sta->lock, flags);
- while (retries--) {
- /* If we have filled up the window then subtract one from the
- * success counter if the high-bit is counting toward
- * success */
- if (window->counter == IWL_RATE_MAX_WINDOW) {
- if (window->data & (1ULL << (IWL_RATE_MAX_WINDOW - 1)))
+ /*
+ * Keep track of only the latest 62 tx frame attempts in this rate's
+ * history window; anything older isn't really relevant any more.
+ * If we have filled up the sliding window, drop the oldest attempt;
+ * if the oldest attempt (highest bit in bitmap) shows "success",
+ * subtract "1" from the success counter (this is the main reason
+ * we keep these bitmaps!).
+ * */
+ while (retries > 0) {
+ if (window->counter >= IWL_RATE_MAX_WINDOW) {
+
+ /* remove earliest */
+ window->counter = IWL_RATE_MAX_WINDOW - 1;
+
+ if (window->data & (1ULL << (IWL_RATE_MAX_WINDOW - 1))) {
+ window->data &= ~(1ULL << (IWL_RATE_MAX_WINDOW - 1));
window->success_counter--;
- } else
- window->counter++;
+ }
+ }
- /* Slide the window to the left one bit */
- window->data = (window->data << 1);
+ /* Increment frames-attempted counter */
+ window->counter++;
- /* If this packet was a success then set the low bit high */
- if (success) {
+ /* Shift bitmap by one frame (throw away oldest history),
+ * OR in "1", and increment "success" if this
+ * frame was successful. */
+ window->data <<= 1;
+ if (success > 0) {
window->success_counter++;
- window->data |= 1;
+ window->data |= 0x1;
+ success--;
}
- /* window->counter can't be 0 -- it is either >0 or
- * IWL_RATE_MAX_WINDOW */
- window->success_ratio = 12800 * window->success_counter /
- window->counter;
-
- /* Tag this window as having been updated */
- window->stamp = jiffies;
-
+ retries--;
}
+ /* Calculate current success ratio, avoid divide-by-0! */
+ if (window->counter > 0)
+ window->success_ratio = 128 * (100 * window->success_counter)
+ / window->counter;
+ else
+ window->success_ratio = IWL_INVALID_VALUE;
+
fail_count = window->counter - window->success_counter;
+
+ /* Calculate average throughput, if we have enough history. */
if ((fail_count >= IWL_RATE_MIN_FAILURE_TH) ||
(window->success_counter >= IWL_RATE_MIN_SUCCESS_TH))
window->average_tpt = ((window->success_ratio *
@@ -336,6 +353,9 @@ static void iwl3945_collect_tx_data(struct iwl3945_rs_sta *rs_sta,
else
window->average_tpt = IWL_INVALID_VALUE;
+ /* Tag this window as having been updated */
+ window->stamp = jiffies;
+
spin_unlock_irqrestore(&rs_sta->lock, flags);
}
@@ -468,7 +488,10 @@ static void rs_tx_status(void *priv_rate, struct ieee80211_supported_band *sband
IWL_DEBUG_RATE(priv, "enter\n");
- retries = info->status.rates[0].count;
+ retries = info->status.rates[0].count - 1;
+ /* Sanity Check for retries */
+ if (retries > IWL_RATE_RETRY_TH)
+ retries = IWL_RATE_RETRY_TH;
first_index = sband->bitrates[info->status.rates[0].idx].hw_value;
if ((first_index < 0) || (first_index >= IWL_RATE_COUNT_3945)) {
@@ -724,7 +747,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
fail_count = window->counter - window->success_counter;
- if (((fail_count <= IWL_RATE_MIN_FAILURE_TH) &&
+ if (((fail_count < IWL_RATE_MIN_FAILURE_TH) &&
(window->success_counter < IWL_RATE_MIN_SUCCESS_TH))) {
spin_unlock_irqrestore(&rs_sta->lock, flags);
@@ -735,6 +758,9 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
window->counter,
window->success_counter,
rs_sta->expected_tpt ? "not " : "");
+
+ /* Can't calculate this yet; not enough history */
+ window->average_tpt = IWL_INVALID_VALUE;
goto out;
}
@@ -750,6 +776,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
if ((max_rate_idx != -1) && (max_rate_idx < high))
high = IWL_RATE_INVALID;
+ /* Collect Measured throughputs of adjacent rates */
if (low != IWL_RATE_INVALID)
low_tpt = rs_sta->win[low].average_tpt;
@@ -758,24 +785,43 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
spin_unlock_irqrestore(&rs_sta->lock, flags);
- scale_action = 1;
+ scale_action = 0;
+ /* Low success ratio , need to drop the rate */
if ((window->success_ratio < IWL_RATE_DECREASE_TH) || !current_tpt) {
IWL_DEBUG_RATE(priv, "decrease rate because of low success_ratio\n");
scale_action = -1;
+
+ /* No throughput measured yet for adjacent rates,
+ * try increase */
} else if ((low_tpt == IWL_INVALID_VALUE) &&
- (high_tpt == IWL_INVALID_VALUE))
- scale_action = 1;
- else if ((low_tpt != IWL_INVALID_VALUE) &&
+ (high_tpt == IWL_INVALID_VALUE)) {
+
+ if (high != IWL_RATE_INVALID && window->success_counter >= IWL_RATE_INCREASE_TH)
+ scale_action = 1;
+ else if (low != IWL_RATE_INVALID)
+ scale_action = -1;
+
+ /* Both adjacent throughputs are measured, but neither one has
+ * better throughput; we're using the best rate, don't change
+ * it! */
+ } else if ((low_tpt != IWL_INVALID_VALUE) &&
(high_tpt != IWL_INVALID_VALUE) &&
(low_tpt < current_tpt) && (high_tpt < current_tpt)) {
+
IWL_DEBUG_RATE(priv, "No action -- low [%d] & high [%d] < "
"current_tpt [%d]\n",
low_tpt, high_tpt, current_tpt);
scale_action = 0;
+
+ /* At least one of the rates has better throughput */
} else {
if (high_tpt != IWL_INVALID_VALUE) {
- if (high_tpt > current_tpt)
+
+ /* High rate has better throughput, Increase
+ * rate */
+ if (high_tpt > current_tpt &&
+ window->success_ratio >= IWL_RATE_INCREASE_TH)
scale_action = 1;
else {
IWL_DEBUG_RATE(priv,
@@ -787,29 +833,31 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
IWL_DEBUG_RATE(priv,
"decrease rate because of low tpt\n");
scale_action = -1;
- } else
+ } else if (window->success_counter >= IWL_RATE_INCREASE_TH) {
+ /* Lower rate has better
+ * throughput,decrease rate */
scale_action = 1;
+ }
}
}
- if (scale_action == -1) {
- if (window->success_ratio > IWL_SUCCESS_DOWN_TH)
- scale_action = 0;
- } else if (scale_action == 1) {
- if (window->success_ratio < IWL_SUCCESS_UP_TH) {
- IWL_DEBUG_RATE(priv, "No action -- success_ratio [%d] < "
- "SUCCESS UP\n", window->success_ratio);
- scale_action = 0;
- }
- }
+ /* Sanity check; asked for decrease, but success rate or throughput
+ * has been good at old rate. Don't change it. */
+ if ((scale_action == -1) && (low != IWL_RATE_INVALID) &&
+ ((window->success_ratio > IWL_RATE_HIGH_TH) ||
+ (current_tpt > (100 * rs_sta->expected_tpt[low]))))
+ scale_action = 0;
switch (scale_action) {
case -1:
+
+ /* Decrese rate */
if (low != IWL_RATE_INVALID)
index = low;
break;
case 1:
+ /* Increase rate */
if (high != IWL_RATE_INVALID)
index = high;
@@ -817,6 +865,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
case 0:
default:
+ /* No change */
break;
}
--
1.5.6.3
From: Abhijeet Kolekar <[email protected]>
error is:
iwl3945-base.c:545:5: warning: symbol 'iwl3945_set_dynamic_key' was not
declared. Should it be static?
Signed-off-by: Abhijeet Kolekar <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index e5c6295..7ce32c9 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -542,7 +542,7 @@ static int iwl3945_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id)
return 0;
}
-int iwl3945_set_dynamic_key(struct iwl_priv *priv,
+static int iwl3945_set_dynamic_key(struct iwl_priv *priv,
struct ieee80211_key_conf *keyconf, u8 sta_id)
{
int ret = 0;
--
1.5.6.3
On Thu, 2009-03-12 at 15:41 -0700, Abhijeet Kolekar wrote:
> Can you try the attached patch for rate scaling?
Just tried it.
It doesn't make things worse, but nether better.
It seems that I can fully control speeds using iwconfig, and when speed
drop, I see that there.
Now speed dropped to 48 Mbits/s raw or 2.9 Mbytes/s real upload.
But I can reset it to 54Mbits/s, then set speed to auto, then it will be
3.1 for a while, then drops again.
On the other hand speed is quite stable, it drops once in a while due to
scanning for few seconds to about 2.2 Mbytes/s, then restores itself
again.
This was more or less the same as without this patch (I also use hw
scanning now).
Anyway, it is almost perfect. All I need to do it to set speed to
54Mbits/s manually.
Best regards and thanks,
Maxim Levitsky
From: Abhijeet Kolekar <[email protected]>
3945 can now use iwl_led's structure from iwlwifi.
Patch also removes CONFIG_IWL3945_LEDS flag from Kconfig as 3945's led
support will now be enabled if user selects CONFIG_IWLWIFI_LEDS.
Signed-off-by: Abhijeet Kolekar <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/Kconfig | 10 +----
drivers/net/wireless/iwlwifi/Makefile | 3 +-
drivers/net/wireless/iwlwifi/iwl-3945-led.c | 66 ++++++++++++++-------------
drivers/net/wireless/iwlwifi/iwl-3945-led.h | 18 +-------
drivers/net/wireless/iwlwifi/iwl-3945.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-dev.h | 9 +---
drivers/net/wireless/iwlwifi/iwl-led.h | 2 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
8 files changed, 43 insertions(+), 71 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index a894deb..8304f64 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -6,11 +6,9 @@ config IWLWIFI
select MAC80211_LEDS if IWLWIFI_LEDS
select LEDS_CLASS if IWLWIFI_LEDS
select RFKILL if IWLWIFI_RFKILL
- select MAC80211_LEDS if IWL3945_LEDS
- select LEDS_CLASS if IWL3945_LEDS
config IWLWIFI_LEDS
- bool "Enable LED support in iwlagn driver"
+ bool "Enable LED support in iwlagn and iwl3945 drivers"
depends on IWLWIFI
config IWLWIFI_RFKILL
@@ -122,9 +120,3 @@ config IWL3945_SPECTRUM_MEASUREMENT
depends on IWL3945
---help---
This option will enable spectrum measurement for the iwl3945 driver.
-
-config IWL3945_LEDS
- bool "Enable LEDS features in iwl3945 driver"
- depends on IWL3945
- ---help---
- This option enables LEDS for the iwl3945 driver.
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile
index d5f8009..d79d97a 100644
--- a/drivers/net/wireless/iwlwifi/Makefile
+++ b/drivers/net/wireless/iwlwifi/Makefile
@@ -16,7 +16,6 @@ iwlagn-$(CONFIG_IWL5000) += iwl-6000.o
iwlagn-$(CONFIG_IWL5000) += iwl-1000.o
obj-$(CONFIG_IWL3945) += iwl3945.o
-iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o
-iwl3945-$(CONFIG_IWL3945_LEDS) += iwl-3945-led.o
+iwl3945-objs := iwl3945-base.o iwl-3945.o iwl-3945-rs.o iwl-3945-led.o
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
index a973ac1..ac22f59 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
@@ -24,6 +24,7 @@
*
*****************************************************************************/
+#ifdef CONFIG_IWLWIFI_LEDS
#include <linux/kernel.h>
#include <linux/module.h>
@@ -163,8 +164,8 @@ static int iwl3945_led_associated(struct iwl_priv *priv, int led_id)
static void iwl3945_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{
- struct iwl3945_led *led = container_of(led_cdev,
- struct iwl3945_led, led_dev);
+ struct iwl_led *led = container_of(led_cdev,
+ struct iwl_led, led_dev);
struct iwl_priv *priv = led->priv;
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -202,7 +203,7 @@ static void iwl3945_led_brightness_set(struct led_classdev *led_cdev,
* Register led class with the system
*/
static int iwl3945_led_register_led(struct iwl_priv *priv,
- struct iwl3945_led *led,
+ struct iwl_led *led,
enum led_type type, u8 set_led,
char *trigger)
{
@@ -315,66 +316,66 @@ int iwl3945_led_register(struct iwl_priv *priv)
priv->allow_blinking = 0;
trigger = ieee80211_get_radio_led_name(priv->hw);
- snprintf(priv->led39[IWL_LED_TRG_RADIO].name,
- sizeof(priv->led39[IWL_LED_TRG_RADIO].name), "iwl-%s::radio",
+ snprintf(priv->led[IWL_LED_TRG_RADIO].name,
+ sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s::radio",
wiphy_name(priv->hw->wiphy));
- priv->led39[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
- priv->led39[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off;
- priv->led39[IWL_LED_TRG_RADIO].led_pattern = NULL;
+ priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
+ priv->led[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off;
+ priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL;
ret = iwl3945_led_register_led(priv,
- &priv->led39[IWL_LED_TRG_RADIO],
+ &priv->led[IWL_LED_TRG_RADIO],
IWL_LED_TRG_RADIO, 1, trigger);
if (ret)
goto exit_fail;
trigger = ieee80211_get_assoc_led_name(priv->hw);
- snprintf(priv->led39[IWL_LED_TRG_ASSOC].name,
- sizeof(priv->led39[IWL_LED_TRG_ASSOC].name), "iwl-%s::assoc",
+ snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
+ sizeof(priv->led[IWL_LED_TRG_ASSOC].name), "iwl-%s::assoc",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
- &priv->led39[IWL_LED_TRG_ASSOC],
+ &priv->led[IWL_LED_TRG_ASSOC],
IWL_LED_TRG_ASSOC, 0, trigger);
/* for assoc always turn led on */
- priv->led39[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on;
- priv->led39[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on;
- priv->led39[IWL_LED_TRG_ASSOC].led_pattern = NULL;
+ priv->led[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on;
+ priv->led[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on;
+ priv->led[IWL_LED_TRG_ASSOC].led_pattern = NULL;
if (ret)
goto exit_fail;
trigger = ieee80211_get_rx_led_name(priv->hw);
- snprintf(priv->led39[IWL_LED_TRG_RX].name,
- sizeof(priv->led39[IWL_LED_TRG_RX].name), "iwl-%s::RX",
+ snprintf(priv->led[IWL_LED_TRG_RX].name,
+ sizeof(priv->led[IWL_LED_TRG_RX].name), "iwl-%s::RX",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
- &priv->led39[IWL_LED_TRG_RX],
+ &priv->led[IWL_LED_TRG_RX],
IWL_LED_TRG_RX, 0, trigger);
- priv->led39[IWL_LED_TRG_RX].led_on = iwl3945_led_associated;
- priv->led39[IWL_LED_TRG_RX].led_off = iwl3945_led_associated;
- priv->led39[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern;
+ priv->led[IWL_LED_TRG_RX].led_on = iwl3945_led_associated;
+ priv->led[IWL_LED_TRG_RX].led_off = iwl3945_led_associated;
+ priv->led[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern;
if (ret)
goto exit_fail;
trigger = ieee80211_get_tx_led_name(priv->hw);
- snprintf(priv->led39[IWL_LED_TRG_TX].name,
- sizeof(priv->led39[IWL_LED_TRG_TX].name), "iwl-%s::TX",
+ snprintf(priv->led[IWL_LED_TRG_TX].name,
+ sizeof(priv->led[IWL_LED_TRG_TX].name), "iwl-%s::TX",
wiphy_name(priv->hw->wiphy));
ret = iwl3945_led_register_led(priv,
- &priv->led39[IWL_LED_TRG_TX],
+ &priv->led[IWL_LED_TRG_TX],
IWL_LED_TRG_TX, 0, trigger);
- priv->led39[IWL_LED_TRG_TX].led_on = iwl3945_led_associated;
- priv->led39[IWL_LED_TRG_TX].led_off = iwl3945_led_associated;
- priv->led39[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern;
+ priv->led[IWL_LED_TRG_TX].led_on = iwl3945_led_associated;
+ priv->led[IWL_LED_TRG_TX].led_off = iwl3945_led_associated;
+ priv->led[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern;
if (ret)
goto exit_fail;
@@ -388,7 +389,7 @@ exit_fail:
/* unregister led class */
-static void iwl3945_led_unregister_led(struct iwl3945_led *led, u8 set_led)
+static void iwl3945_led_unregister_led(struct iwl_led *led, u8 set_led)
{
if (!led->registered)
return;
@@ -403,9 +404,10 @@ static void iwl3945_led_unregister_led(struct iwl3945_led *led, u8 set_led)
/* Unregister all led handlers */
void iwl3945_led_unregister(struct iwl_priv *priv)
{
- iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_ASSOC], 0);
- iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RX], 0);
- iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_TX], 0);
- iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RADIO], 1);
+ iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_ASSOC], 0);
+ iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RX], 0);
+ iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_TX], 0);
+ iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RADIO], 1);
}
+#endif
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.h b/drivers/net/wireless/iwlwifi/iwl-3945-led.h
index 88185a6..3b65642 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.h
@@ -29,24 +29,10 @@
struct iwl_priv;
-#ifdef CONFIG_IWL3945_LEDS
+#ifdef CONFIG_IWLWIFI_LEDS
#include "iwl-led.h"
-struct iwl3945_led {
- struct iwl_priv *priv;
- struct led_classdev led_dev;
- char name[32];
-
- int (*led_on) (struct iwl_priv *priv, int led_id);
- int (*led_off) (struct iwl_priv *priv, int led_id);
- int (*led_pattern) (struct iwl_priv *priv, int led_id,
- unsigned int idx);
-
- enum led_type type;
- unsigned int registered;
-};
-
extern int iwl3945_led_register(struct iwl_priv *priv);
extern void iwl3945_led_unregister(struct iwl_priv *priv);
extern void iwl3945_led_background(struct iwl_priv *priv);
@@ -55,6 +41,6 @@ extern void iwl3945_led_background(struct iwl_priv *priv);
static inline int iwl3945_led_register(struct iwl_priv *priv) { return 0; }
static inline void iwl3945_led_unregister(struct iwl_priv *priv) {}
static inline void iwl3945_led_background(struct iwl_priv *priv) {}
-#endif /* CONFIG_IWL3945_LEDS */
+#endif /* IWLWIFI_LEDS*/
#endif /* IWL3945_LEDS_H */
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 0a75053..9e6f9ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -554,7 +554,7 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,
struct ieee80211_rx_status *stats)
{
struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
-#ifdef CONFIG_IWL3945_LEDS
+#ifdef CONFIG_IWLWIFI_LEDS
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA(pkt);
#endif
struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt);
@@ -583,7 +583,7 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,
(struct ieee80211_hdr *)rxb->skb->data,
le32_to_cpu(rx_end->status), stats);
-#ifdef CONFIG_IWL3945_LEDS
+#ifdef CONFIG_IWLWIFI_LEDS
if (ieee80211_is_data(hdr->frame_control))
priv->rxtxpackets += len;
#endif
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 2176494..0baae80 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -926,19 +926,12 @@ struct iwl_priv {
struct rfkill *rfkill;
#endif
-#if defined(CONFIG_IWLWIFI_LEDS) || defined(CONFIG_IWL3945_LEDS)
+#ifdef CONFIG_IWLWIFI_LEDS
unsigned long last_blink_time;
u8 last_blink_rate;
u8 allow_blinking;
u64 led_tpt;
-#endif
-
-#ifdef CONFIG_IWLWIFI_LEDS
struct iwl_led led[IWL_LED_TRG_MAX];
-#endif
-
-#ifdef CONFIG_IWL3945_LEDS
- struct iwl3945_led led39[IWL_LED_TRG_MAX];
unsigned int rxtxpackets;
#endif
u16 active_rate;
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.h b/drivers/net/wireless/iwlwifi/iwl-led.h
index 140fd8f..ef9b174 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.h
+++ b/drivers/net/wireless/iwlwifi/iwl-led.h
@@ -30,7 +30,7 @@
struct iwl_priv;
-#if defined(CONFIG_IWLWIFI_LEDS) || defined(CONFIG_IWL3945_LEDS)
+#ifdef CONFIG_IWLWIFI_LEDS
#include <linux/leds.h>
#define IWL_LED_SOLID 11
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 7ce32c9..fd3a529 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -890,7 +890,7 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
tx->timeout.pm_frame_timeout = cpu_to_le16(2);
} else {
tx->timeout.pm_frame_timeout = 0;
-#ifdef CONFIG_IWL3945_LEDS
+#ifdef CONFIG_IWLWIFI_LEDS
priv->rxtxpackets += le16_to_cpu(cmd->cmd.tx.len);
#endif
}
--
1.5.6.3
On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> > > On Wed, 2009-03-11 at 11:17 -0700, Reinette Chatre wrote:
> > > > From: Abhijeet Kolekar <[email protected]>
> > > >
> > > > Patch fixes the bug 1900 at
> > > > http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
> > > >
> > > > Issues:
> > > > Throughput and success ratio calculations were not done properly.
> > > > Number of retries were exceeding 16.
> > >
> > > ether.
> > >
> > > On the other omitting the 'disable_hw_scan=1' option (which appears to
> > > work once again, since few days ago it broke s2disk with hung scan) -
> >
> > Ah , I remember now. The disable_hw_scan=0 breaks (!)
> > the rfkill support.
>
> Could you please provide more details about this issue? We are
> interested in steps to reproduce and logs you may have.
A way to reproduce (without NM):
* Start scanning in a loop
while true ; do sudo iwlist scan ; done
* press rfkill - scan hangs forever.
* press rfkill again - doesn't help
I have acer 5720G with hardware rfkill.
The problem seems to be that if user presses rfkill during scan, it
hangs.
How about rate control issues I still see, do you know why upload is
slower that download?
Best regards,
Maxim Levitsky
From: Reinette Chatre <[email protected]>
user needs to see this message even if debugging disabled
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index da98886..0db3bc0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3359,7 +3359,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* amp init */
err = priv->cfg->ops->lib->apm_ops.init(priv);
if (err < 0) {
- IWL_DEBUG_INFO(priv, "Failed to init APMG\n");
+ IWL_ERR(priv, "Failed to init APMG\n");
goto out_iounmap;
}
/*****************
--
1.5.6.3
From: Mohamed Abbas <[email protected]>
iwl_clear_station_table will be called every time rxon called.
In this function ucode_key_table is set to 0 even though a static
WEP security is set. This will cause in many warning and might be
an issue if dynamic WEP is set. This patch make sure we keep track
of all existing static WEP when this function is called.
Signed-off-by: Mohamed Abbas <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-sta.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 0ea08d0..1684490 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station);
void iwl_clear_stations_table(struct iwl_priv *priv)
{
unsigned long flags;
+ int i;
spin_lock_irqsave(&priv->sta_lock, flags);
@@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
/* clean ucode key table bit map */
priv->ucode_key_table = 0;
+ /* keep track of static keys */
+ for (i = 0; i < WEP_KEYS_MAX ; i++) {
+ if (priv->wep_keys[i].key_size)
+ test_and_set_bit(i, &priv->ucode_key_table);
+ }
+
spin_unlock_irqrestore(&priv->sta_lock, flags);
}
EXPORT_SYMBOL(iwl_clear_stations_table);
--
1.5.6.3
On Thu, 2009-03-12 at 22:58 +0100, Helmut Schaa wrote:
> Am Donnerstag, 12. M=C3=A4rz 2009 schrieb Maxim Levitsky:
> > On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> > > On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > > > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> [...]
> > > > > On the other omitting the 'disable_hw_scan=3D1' option (whic=
h appears to
> > > > > work once again, since few days ago it broke s2disk with hun=
g scan) -
> > > >=20
> > > > Ah , I remember now. The disable_hw_scan=3D0 breaks (!)=20
> > > > the rfkill support.
> > >=20
> > > Could you please provide more details about this issue? We are
> > > interested in steps to reproduce and logs you may have.
> >=20
> > A way to reproduce (without NM):
> >=20
> > * Start scanning in a loop
> > while true ; do sudo iwlist scan ; done
> >=20
> > * press rfkill - scan hangs forever.
> > * press rfkill again - doesn't help
> >=20
> > I have acer 5720G with hardware rfkill.
> >=20
> >=20
> > The problem seems to be that if user presses rfkill during scan, it
> > hangs.
>=20
> I had similar issues (with current wireless-testing) related to rfkil=
l
> and cfg80211-scanning. An "iwlist scan" only showed "Device or resour=
ce
> busy" and cfg80211 was stuck in that state. Maybe your issue is relat=
ed?
> See [1] and [2] for details.
It isn't related, its the same issue, for sure.
I'll try your patches, now.
Best regards,
Maxim Levitsky
From: Abhijeet Kolekar <[email protected]>
iwl3945 uses iwl_tx_cmd_complete to reclaim the unused buffers of the queue.
iwl_tx_cmd_complete in turn call the iwl_hcmd_queue_reclaim which will
unmap the dma mapping to tx_cmd and frees the memory.
Signed-off-by: Abhijeet Kolekar <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 81 +--------------------------
1 files changed, 1 insertions(+), 80 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index fd3a529..93f70df 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1479,85 +1479,6 @@ static void iwl3945_setup_rx_handlers(struct iwl_priv *priv)
iwl3945_hw_rx_handler_setup(priv);
}
-/**
- * iwl3945_cmd_queue_reclaim - Reclaim CMD queue entries
- * When FW advances 'R' index, all entries between old and new 'R' index
- * need to be reclaimed.
- */
-static void iwl3945_cmd_queue_reclaim(struct iwl_priv *priv,
- int txq_id, int index)
-{
- struct iwl_tx_queue *txq = &priv->txq[txq_id];
- struct iwl_queue *q = &txq->q;
- int nfreed = 0;
-
- if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
- IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
- "is out of range [0-%d] %d %d.\n", txq_id,
- index, q->n_bd, q->write_ptr, q->read_ptr);
- return;
- }
-
- for (index = iwl_queue_inc_wrap(index, q->n_bd); q->read_ptr != index;
- q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
- if (nfreed > 1) {
- IWL_ERR(priv, "HCMD skipped: index (%d) %d %d\n", index,
- q->write_ptr, q->read_ptr);
- queue_work(priv->workqueue, &priv->restart);
- break;
- }
- nfreed++;
- }
-}
-
-
-/**
- * iwl3945_tx_cmd_complete - Pull unused buffers off the queue and reclaim them
- * @rxb: Rx buffer to reclaim
- *
- * If an Rx buffer has an async callback associated with it the callback
- * will be executed. The attached skb (if present) will only be freed
- * if the callback returns 1
- */
-static void iwl3945_tx_cmd_complete(struct iwl_priv *priv,
- struct iwl_rx_mem_buffer *rxb)
-{
- struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
- u16 sequence = le16_to_cpu(pkt->hdr.sequence);
- int txq_id = SEQ_TO_QUEUE(sequence);
- int index = SEQ_TO_INDEX(sequence);
- int huge = !!(pkt->hdr.sequence & SEQ_HUGE_FRAME);
- int cmd_index;
- struct iwl_cmd *cmd;
-
- if (WARN(txq_id != IWL_CMD_QUEUE_NUM,
- "wrong command queue %d, sequence 0x%X readp=%d writep=%d\n",
- txq_id, sequence,
- priv->txq[IWL_CMD_QUEUE_NUM].q.read_ptr,
- priv->txq[IWL_CMD_QUEUE_NUM].q.write_ptr)) {
- iwl_print_hex_dump(priv, IWL_DL_INFO , rxb, 32);
- return;
- }
-
- cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge);
- cmd = priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index];
-
- /* Input error checking is done when commands are added to queue. */
- if (cmd->meta.flags & CMD_WANT_SKB) {
- cmd->meta.source->u.skb = rxb->skb;
- rxb->skb = NULL;
- } else if (cmd->meta.u.callback &&
- !cmd->meta.u.callback(priv, cmd, rxb->skb))
- rxb->skb = NULL;
-
- iwl3945_cmd_queue_reclaim(priv, txq_id, index);
-
- if (!(cmd->meta.flags & CMD_ASYNC)) {
- clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
- wake_up_interruptible(&priv->wait_command_queue);
- }
-}
-
/************************** RX-FUNCTIONS ****************************/
/*
* Rx theory of operation
@@ -1917,7 +1838,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
* fire off the (possibly) blocking iwl_send_cmd()
* as we reclaim the driver command queue */
if (rxb && rxb->skb)
- iwl3945_tx_cmd_complete(priv, rxb);
+ iwl_tx_cmd_complete(priv, rxb);
else
IWL_WARN(priv, "Claim null rxb?\n");
}
--
1.5.6.3
Can you try the attached patch for rate scaling?
Thanks,
Abhijeet
On Thu, 2009-03-12 at 14:21 -0700, Maxim Levitsky wrote:
> On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> > On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> > > > On Wed, 2009-03-11 at 11:17 -0700, Reinette Chatre wrote:
> > > > > From: Abhijeet Kolekar <[email protected]>
> > > > >
> > > > > Patch fixes the bug 1900 at
> > > > > http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
> > > > >
> > > > > Issues:
> > > > > Throughput and success ratio calculations were not done properly.
> > > > > Number of retries were exceeding 16.
> > > >
> > > > ether.
> > > >
> > > > On the other omitting the 'disable_hw_scan=1' option (which appears to
> > > > work once again, since few days ago it broke s2disk with hung scan) -
> > >
> > > Ah , I remember now. The disable_hw_scan=0 breaks (!)
> > > the rfkill support.
> >
> > Could you please provide more details about this issue? We are
> > interested in steps to reproduce and logs you may have.
>
> A way to reproduce (without NM):
>
> * Start scanning in a loop
> while true ; do sudo iwlist scan ; done
>
> * press rfkill - scan hangs forever.
> * press rfkill again - doesn't help
>
> I have acer 5720G with hardware rfkill.
>
>
> The problem seems to be that if user presses rfkill during scan, it
> hangs.
>
>
> How about rate control issues I still see, do you know why upload is
> slower that download?
>
> Best regards,
> Maxim Levitsky
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Small slightly out of thread question if you don't mind:
Quite long time ago I noticed that iwl3945 doesn't show noise level
anymore. it always tells that it is -127dBm.
I did see noise levels some long time ago with iwll3945.
Is this a bug or feature?
Best regards,
Maxim Levitsky
Am Donnerstag, 12. M=E4rz 2009 schrieb Maxim Levitsky:
> On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> > On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
[...]
> > > > On the other omitting the 'disable_hw_scan=3D1' option (which =
appears to
> > > > work once again, since few days ago it broke s2disk with hung =
scan) -
> > >=20
> > > Ah , I remember now. The disable_hw_scan=3D0 breaks (!)=20
> > > the rfkill support.
> >=20
> > Could you please provide more details about this issue? We are
> > interested in steps to reproduce and logs you may have.
>=20
> A way to reproduce (without NM):
>=20
> * Start scanning in a loop
> while true ; do sudo iwlist scan ; done
>=20
> * press rfkill - scan hangs forever.
> * press rfkill again - doesn't help
>=20
> I have acer 5720G with hardware rfkill.
>=20
>=20
> The problem seems to be that if user presses rfkill during scan, it
> hangs.
I had similar issues (with current wireless-testing) related to rfkill
and cfg80211-scanning. An "iwlist scan" only showed "Device or resource
busy" and cfg80211 was stuck in that state. Maybe your issue is related=
?
See [1] and [2] for details.
Helmut
[1] http://marc.info/?l=3Dlinux-wireless&m=3D123661005000427&w=3D2
[2] http://marc.info/?l=3Dlinux-wireless&m=3D123686313707477&w=3D2
Am Freitag, 13. M=C3=A4rz 2009 schrieb Maxim Levitsky:
> On Fri, 2009-03-13 at 00:03 +0200, Maxim Levitsky wrote:
> > On Thu, 2009-03-12 at 22:58 +0100, Helmut Schaa wrote:
> > > Am Donnerstag, 12. M=C3=A4rz 2009 schrieb Maxim Levitsky:
> > > > On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> > > > > On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > > > > > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> > > [...]
> > > > > > > On the other omitting the 'disable_hw_scan=3D1' option (=
which appears to
> > > > > > > work once again, since few days ago it broke s2disk with=
hung scan) -
> > > > > >=20
> > > > > > Ah , I remember now. The disable_hw_scan=3D0 breaks (!)=20
> > > > > > the rfkill support.
> > > > >=20
> > > > > Could you please provide more details about this issue? We ar=
e
> > > > > interested in steps to reproduce and logs you may have.
> > > >=20
> > > > A way to reproduce (without NM):
> > > >=20
> > > > * Start scanning in a loop
> > > > while true ; do sudo iwlist scan ; done
> > > >=20
> > > > * press rfkill - scan hangs forever.
> > > > * press rfkill again - doesn't help
> > > >=20
> > > > I have acer 5720G with hardware rfkill.
> > > >=20
> > > >=20
> > > > The problem seems to be that if user presses rfkill during scan=
, it
> > > > hangs.
> > >=20
> > > I had similar issues (with current wireless-testing) related to r=
fkill
> > > and cfg80211-scanning. An "iwlist scan" only showed "Device or re=
source
> > > busy" and cfg80211 was stuck in that state. Maybe your issue is r=
elated?
> > > See [1] and [2] for details.
> > It isn't related, its the same issue, for sure.
> > I'll try your patches, now.
> >=20
> > Best regards,
> > Maxim Levitsky
>=20
>=20
> I applied both your patches, and everything works perfectly.
Great. Thanks for testing.
Helmut
On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> > On Wed, 2009-03-11 at 11:17 -0700, Reinette Chatre wrote:
> > > From: Abhijeet Kolekar <[email protected]>
> > >
> > > Patch fixes the bug 1900 at
> > > http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
> > >
> > > Issues:
> > > Throughput and success ratio calculations were not done properly.
> > > Number of retries were exceeding 16.
> >
> > ether.
> >
> > On the other omitting the 'disable_hw_scan=1' option (which appears to
> > work once again, since few days ago it broke s2disk with hung scan) -
>
> Ah , I remember now. The disable_hw_scan=0 breaks (!)
> the rfkill support.
Could you please provide more details about this issue? We are
interested in steps to reproduce and logs you may have.
Thanks
Reinette
From: Reinette Chatre <[email protected]>
hopefully the register contents will guide us to why this failure occured
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-io.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index c7b8e5b..083ea1f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -156,6 +156,7 @@ static inline void __iwl_clear_bit(const char *f, u32 l,
static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
{
int ret;
+ u32 val;
#ifdef CONFIG_IWLWIFI_DEBUG
if (atomic_read(&priv->restrict_refcnt))
return 0;
@@ -167,7 +168,8 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
(CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
if (ret < 0) {
- IWL_ERR(priv, "MAC is in deep sleep!\n");
+ val = _iwl_read32(priv, CSR_GP_CNTRL);
+ IWL_ERR(priv, "MAC is in deep sleep!. CSR_GP_CNTRL = 0x%08X\n", val);
return -EIO;
}
--
1.5.6.3
Reinette Chatre <[email protected]> writes:
> From: Abhijeet Kolekar <[email protected]>
>
> error is:
> iwl3945-base.c:545:5: warning: symbol 'iwl3945_set_dynamic_key' was not
> declared. Should it be static?
I would call that a warning, not an error. Not that it matters.
--
Kalle Valo
On Wed, 2009-03-11 at 11:17 -0700, Reinette Chatre wrote:
> From: Abhijeet Kolekar <[email protected]>
>
> Patch fixes the bug 1900 at
> http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
>
> Issues:
> Throughput and success ratio calculations were not done properly.
> Number of retries were exceeding 16.
At last...
Here goes last annoying bug, inside my
"Intel Corporation PRO/Wireless 3945ABG"
>From now on my wifi is perfect!
Well, that is what I thought, but although this patch helps a lot,
still some issues remain:
When I use disable_hw_scan=1, rate control issues still pop up.
This what happens to upload speed (tested using netcat, sending
a /dev/zero contents around:
For a while, it's solid at 3.0 Mbytes/s, a speed I would expect, but
then after a few minutes have passed, it drops down to about 2.8
Mbytes/s. Then again after few minutes it drops to 2.6 Mbytes/s, and
this pattern repeats. I waited till it hit 2.2 Mbytes/s.
Running iwconfig, reveals that this wifi card did run in 24Mbits/s mode
at that time! And trying force it to run in 54M/s mode didn't help
ether.
On the other omitting the 'disable_hw_scan=1' option (which appears to
work once again, since few days ago it broke s2disk with hung scan) -
rate didn't drop - it seemed to be always
3.0/3.1(!) Mbytes/s, but after several minutes it did drop to
2.4Mbytes/s, and iwconfig showed the 36 Mbytes/s.
I set rate manually to 54Mbytes/s, and 3.0/3.1 rate returned.
So this helps, but something is still broken in rate control.
Downloads speeds, which I didn't test with hardware scanning disabled,
are, and I think always were at 2.4/2.5 Mbytes/s - and no more speed
drops ether it seems. Do you have a clue, why they are lower?
Also I noticed that for few seconds (about 15) download rate went as
high as 2.7 Mbytes/s.
In addition to that, I glad to see , finally that functions were
merged, since they really need some love. For example, led appear to
blink at same rate regardless of transmit rate, be it a ssh session or a
torture speed test like I explained above. It seems that for few seconds
led blinks faster, but then reverts back to standard (minimal?) rate of
blinking.
Now at least it is worth to fix all that (when I have free time I do so,
that is if there will be need to do so....)
Best regards and thanks,
Maxim Levitsky
From: Reinette Chatre <[email protected]>
During preparation of TX we create DMA mapping to TX command as part of
preparing the TFD. This mapping needs to be cleared at the time TFD is
freed.
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-3945.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 9e6f9ec..ba7e720 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -741,7 +741,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
{
struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)txq->tfds;
- struct iwl3945_tfd *tfd = &tfd_tmp[txq->q.read_ptr];
+ int index = txq->q.read_ptr;
+ struct iwl3945_tfd *tfd = &tfd_tmp[index];
struct pci_dev *dev = priv->pci_dev;
int i;
int counter;
@@ -759,6 +760,13 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
return;
}
+ /* Unmap tx_cmd */
+ if (counter)
+ pci_unmap_single(dev,
+ pci_unmap_addr(&txq->cmd[index]->meta, mapping),
+ pci_unmap_len(&txq->cmd[index]->meta, len),
+ PCI_DMA_TODEVICE);
+
/* unmap chunks if any */
for (i = 1; i < counter; i++) {
--
1.5.6.3
On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> On Wed, 2009-03-11 at 11:17 -0700, Reinette Chatre wrote:
> > From: Abhijeet Kolekar <[email protected]>
> >
> > Patch fixes the bug 1900 at
> > http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1900
> >
> > Issues:
> > Throughput and success ratio calculations were not done properly.
> > Number of retries were exceeding 16.
>
> ether.
>
> On the other omitting the 'disable_hw_scan=1' option (which appears to
> work once again, since few days ago it broke s2disk with hung scan) -
Ah , I remember now. The disable_hw_scan=0 breaks (!)
the rfkill support.
I don't know if this affects it, but I patched NM to poll the rfkill
each second.
When I enable radio - NM hangs forever in scanning mode.
Only module reload helps.
Best regards,
Maxim Levitsky
On Fri, 2009-03-13 at 00:03 +0200, Maxim Levitsky wrote:
> On Thu, 2009-03-12 at 22:58 +0100, Helmut Schaa wrote:
> > Am Donnerstag, 12. M=C3=A4rz 2009 schrieb Maxim Levitsky:
> > > On Thu, 2009-03-12 at 10:50 -0700, reinette chatre wrote:
> > > > On Wed, 2009-03-11 at 19:29 -0700, Maxim Levitsky wrote:
> > > > > On Thu, 2009-03-12 at 03:29 +0200, Maxim Levitsky wrote:
> > [...]
> > > > > > On the other omitting the 'disable_hw_scan=3D1' option (wh=
ich appears to
> > > > > > work once again, since few days ago it broke s2disk with h=
ung scan) -
> > > > >=20
> > > > > Ah , I remember now. The disable_hw_scan=3D0 breaks (!)=20
> > > > > the rfkill support.
> > > >=20
> > > > Could you please provide more details about this issue? We are
> > > > interested in steps to reproduce and logs you may have.
> > >=20
> > > A way to reproduce (without NM):
> > >=20
> > > * Start scanning in a loop
> > > while true ; do sudo iwlist scan ; done
> > >=20
> > > * press rfkill - scan hangs forever.
> > > * press rfkill again - doesn't help
> > >=20
> > > I have acer 5720G with hardware rfkill.
> > >=20
> > >=20
> > > The problem seems to be that if user presses rfkill during scan, =
it
> > > hangs.
> >=20
> > I had similar issues (with current wireless-testing) related to rfk=
ill
> > and cfg80211-scanning. An "iwlist scan" only showed "Device or reso=
urce
> > busy" and cfg80211 was stuck in that state. Maybe your issue is rel=
ated?
> > See [1] and [2] for details.
> It isn't related, its the same issue, for sure.
> I'll try your patches, now.
>=20
> Best regards,
> Maxim Levitsky
I applied both your patches, and everything works perfectly.
Thanks a lot,
Best regards,
Maxim Levitsky