2008-02-01 05:51:51

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 1/2] iwlwifi: initialize ieee80211_channel->hw_value

From: Mohamed Abbas <[email protected]>

hw_value is being used uninitialized. fix it.

Signed-off-by: Mohamed Abbas <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 1 +
drivers/net/wireless/iwlwifi/iwl4965-base.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index f82aec5..b0f1155 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5388,6 +5388,7 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv)
geo_ch->center_freq = ieee80211chan2mhz(ch->channel);
geo_ch->max_power = ch->max_power_avg;
geo_ch->max_antenna_gain = 0xff;
+ geo_ch->hw_value = ch->channel;

if (is_channel_valid(ch)) {
if (!(ch->flags & EEPROM_CHANNEL_IBSS))
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index a4fa6bf..402cd9a 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5810,6 +5810,7 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv)
geo_ch->center_freq = ieee80211chan2mhz(ch->channel);
geo_ch->max_power = ch->max_power_avg;
geo_ch->max_antenna_gain = 0xff;
+ geo_ch->hw_value = ch->channel;

if (is_channel_valid(ch)) {
if (!(ch->flags & EEPROM_CHANNEL_IBSS))
--
1.5.3.4



2008-02-01 16:31:54

by Abbas, Mohamed

[permalink] [raw]
Subject: RE: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp



-----Original Message-----
From: Tomas Winkler [mailto:[email protected]]
Sent: Friday, February 01, 2008 3:44 AM
To: Chatre, Reinette
Cc: [email protected]; [email protected]; Abbas,
Mohamed
Subject: Re: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp

On Feb 1, 2008 7:46 AM, Reinette Chatre <[email protected]>
wrote:
> From: Mohamed Abbas <[email protected]>
>
> rate_idx is derived from plcp information
>
> Signed-off-by: Mohamed Abbas <[email protected]>
> Signed-off-by: Reinette Chatre <[email protected]>
> ---
> drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c
b/drivers/net/wireless/iwlwifi/iwl-4965.c
> index 79545d6..29797db 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -3546,7 +3546,7 @@ static void iwl4965_rx_reply_rx(struct
iwl4965_priv *priv,
> (rx_start->phy_flags &
RX_RES_PHY_FLAGS_BAND_24_MSK) ?
> IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ,
> .antenna = 0,
> - .rate_idx = iwl4965_hw_get_rate(
> + .rate_idx = iwl4965_rate_index_from_plcp(
> le32_to_cpu(rx_start->rate_n_flags)),
> .flag = 0,
> };
> --
> 1.5.3.4
>

NACK
This should be
rate_idx =
iwl4965_rate_index_from_plcp(wl4965_hw_get_rate(rx_start->rate_n_flags))
;

iwl4965_hw_get_rate - this one extract plcp from rate_n_flags - also
takes care of endinaity
Tomas

Actually iwl4965_rate_index_from_plcp expect rate and flag data to get
the rate index.
Mohamed
>
> 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
>

2008-02-01 19:57:34

by Tomas Winkler

[permalink] [raw]
Subject: Re: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp

On Feb 1, 2008 7:40 PM, Chatre, Reinette <[email protected]> wrote:
> On Friday, February 01, 2008 8:29 AM, Abbas, Mohamed wrote:
>
> > From: Tomas Winkler [mailto:[email protected]]
> > Sent: Friday, February 01, 2008 3:44 AM
> > On Feb 1, 2008 7:46 AM, Reinette Chatre
> > <[email protected]> wrote:
> >> From: Mohamed Abbas <[email protected]>
> >>
> >> rate_idx is derived from plcp information
> >>
> >> Signed-off-by: Mohamed Abbas <[email protected]>
> >> Signed-off-by: Reinette Chatre <[email protected]> ---
> >> drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
>
> [..snip..]
>
> > NACK
> > This should be
> > rate_idx =
> > iwl4965_rate_index_from_plcp(wl4965_hw_get_rate(rx_start->rate_
> > n_flags));
> >
> > iwl4965_hw_get_rate - this one extract plcp from rate_n_flags - also
> > takes care of endinaity Tomas
> >
> > Actually iwl4965_rate_index_from_plcp expect rate and flag
> > data to get the rate index.
> > Mohamed
>
> John,
>
> Sorry about the confusing emails - please go ahead and apply this patch.
>
> Thank you

Sorry it was my mistake.

> Reinette
>

2008-02-01 11:43:37

by Tomas Winkler

[permalink] [raw]
Subject: Re: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp

On Feb 1, 2008 7:46 AM, Reinette Chatre <[email protected]> wrote:
> From: Mohamed Abbas <[email protected]>
>
> rate_idx is derived from plcp information
>
> Signed-off-by: Mohamed Abbas <[email protected]>
> Signed-off-by: Reinette Chatre <[email protected]>
> ---
> drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
> index 79545d6..29797db 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-4965.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
> @@ -3546,7 +3546,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
> (rx_start->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
> IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ,
> .antenna = 0,
> - .rate_idx = iwl4965_hw_get_rate(
> + .rate_idx = iwl4965_rate_index_from_plcp(
> le32_to_cpu(rx_start->rate_n_flags)),
> .flag = 0,
> };
> --
> 1.5.3.4
>

NACK
This should be
rate_idx = iwl4965_rate_index_from_plcp(wl4965_hw_get_rate(rx_start->rate_n_flags));

iwl4965_hw_get_rate - this one extract plcp from rate_n_flags - also
takes care of endinaity
Tomas


>
> 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
>

2008-02-01 17:47:53

by Reinette Chatre

[permalink] [raw]
Subject: RE: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp

On Friday, February 01, 2008 8:29 AM, Abbas, Mohamed wrote:

> From: Tomas Winkler [mailto:[email protected]]
> Sent: Friday, February 01, 2008 3:44 AM
> On Feb 1, 2008 7:46 AM, Reinette Chatre
> <[email protected]> wrote:
>> From: Mohamed Abbas <[email protected]>
>>
>> rate_idx is derived from plcp information
>>
>> Signed-off-by: Mohamed Abbas <[email protected]>
>> Signed-off-by: Reinette Chatre <[email protected]> ---
>> drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>

[..snip..]

> NACK
> This should be
> rate_idx =
> iwl4965_rate_index_from_plcp(wl4965_hw_get_rate(rx_start->rate_
> n_flags));
>
> iwl4965_hw_get_rate - this one extract plcp from rate_n_flags - also
> takes care of endinaity Tomas
>
> Actually iwl4965_rate_index_from_plcp expect rate and flag
> data to get the rate index.
> Mohamed

John,

Sorry about the confusing emails - please go ahead and apply this patch.

Thank you

Reinette

2008-02-01 05:51:50

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 2/2] iwlwifi: set rate_idx correctly from plcp

From: Mohamed Abbas <[email protected]>

rate_idx is derived from plcp information

Signed-off-by: Mohamed Abbas <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 79545d6..29797db 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3546,7 +3546,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
(rx_start->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ,
.antenna = 0,
- .rate_idx = iwl4965_hw_get_rate(
+ .rate_idx = iwl4965_rate_index_from_plcp(
le32_to_cpu(rx_start->rate_n_flags)),
.flag = 0,
};
--
1.5.3.4