Skip to contentSkip to conversation

rndis_wlan: split getting current channel to separate function

DISCUSSION Dan Carpenter 2 participants 3 messages Feb 29, 2012

lore
Share & tools
lore
#0 lore raw

Hello Jussi,

The patch b5257c952: "rndis_wlan: workaround device not returning bss for currently connected AP" from Nov 9, 2011, leads to the following warning:
drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast to restricted __le16 drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast from restricted __le32

  1372  
  1373          if (beacon_interval)
  1374                  *beacon_interval = le16_to_cpu(config.beacon_period);
  1375          return channel;

The problem is that config.beacon_period is declared as le32 but we're using it as le16.

regards,
dan carpenter

#1 lore raw

Quoting Dan Carpenter <[email protected]>:

Quoted 8 lines

Hello Jussi,

The patch b5257c952: "rndis_wlan: workaround device not returning bss for currently connected AP" from Nov 9, 2011, leads to the following warning:
drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast to restricted __le16 drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast from restricted __le32

Quoted 7 lines
  1372
  1373          if (beacon_interval)
  1374                  *beacon_interval = le16_to_cpu(config.beacon_period);
  1375          return channel;

The problem is that config.beacon_period is declared as le32 but we're using it as le16.

Ah yes, I'll post patch soon. Thanks.

-Jussi

Quoted 6 lines

regards,
dan carpenter

#2 lore raw

Quoting Jussi Kivilinna <[email protected]>:

Quoted 15 lines

Quoting Dan Carpenter <[email protected]>:

Quoted 13 lines

Hello Jussi,

The patch b5257c952: "rndis_wlan: workaround device not returning bss for currently connected AP" from Nov 9, 2011, leads to the following warning:
drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast to restricted __le16 drivers/net/wireless/rndis_wlan.c:1374:36: warning: cast from restricted __le32

1372
1373 if (beacon_interval)
1374 *beacon_interval = le16_to_cpu(config.beacon_period);
1375 return channel;

Quoted 4 lines
Quoted 2 lines

The problem is that config.beacon_period is declared as le32 but we're using it as le16.

Ah yes, I'll post patch soon. Thanks.

Well.. I ran into interesting problem where driver stops working if I correct le16_to_cpu to le32_to_cpu. But if I instead pass beacon_interval=0 to cfg80211, driver start working again. So this is bug fixing another problem, I'll check it more throughtly when I have more time.

-Jussi

Quoted 18 lines

-Jussi

Quoted 6 lines

regards,
dan carpenter

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