* [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
@ 2011-04-29 5:25 Joe Perches
2011-04-29 5:25 ` [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible Joe Perches
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Joe Perches @ 2011-04-29 5:25 UTC (permalink / raw)
To: linux-wireless, libertas-dev, orinoco-users, orinoco-devel,
netdev
Cc: linux-kernel
Joe Perches (2):
wireless: Make struct ieee80211_channel const where possible
wireless: Use const struct ieee80211_channel where possible
drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 2 +-
drivers/net/wireless/iwlegacy/iwl3945-base.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 2 +-
drivers/net/wireless/iwmc3200wifi/cfg80211.c | 4 +-
drivers/net/wireless/libertas/cfg.c | 2 +-
drivers/net/wireless/mwifiex/cfg80211.c | 9 ++++---
drivers/net/wireless/orinoco/cfg.c | 2 +-
drivers/net/wireless/rndis_wlan.c | 9 ++++---
drivers/net/wireless/wl1251/cmd.c | 2 +-
drivers/net/wireless/wl1251/cmd.h | 2 +-
include/net/cfg80211.h | 34 +++++++++++++-------------
net/wireless/chan.c | 10 ++++----
net/wireless/core.h | 14 ++++++----
net/wireless/debugfs.c | 2 +-
net/wireless/ibss.c | 6 ++--
net/wireless/mlme.c | 15 ++++++-----
net/wireless/nl80211.c | 31 ++++++++++++-----------
net/wireless/nl80211.h | 9 ++++---
net/wireless/reg.c | 11 ++++----
net/wireless/reg.h | 4 +-
net/wireless/scan.c | 6 ++--
net/wireless/wext-sme.c | 2 +-
22 files changed, 94 insertions(+), 86 deletions(-)
--
1.7.5.rc3.dirty
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible
2011-04-29 5:25 [PATCH 0/2] wireless: Make and use const struct ieee80211_channel Joe Perches
@ 2011-04-29 5:25 ` Joe Perches
2011-04-29 7:11 ` Johannes Berg
2011-04-29 5:25 ` [PATCH 2/2] wireless: Use const struct ieee80211_channel " Joe Perches
2011-05-05 18:49 ` [PATCH 0/2] wireless: Make and use const struct ieee80211_channel John W. Linville
2 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2011-04-29 5:25 UTC (permalink / raw)
To: Johannes Berg, David S. Miller, John W. Linville
Cc: linux-wireless, netdev, linux-kernel
Useful for declarations of static const.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/cfg80211.h | 34 +++++++++++++++++-----------------
net/wireless/chan.c | 10 +++++-----
net/wireless/core.h | 14 ++++++++------
net/wireless/debugfs.c | 2 +-
net/wireless/ibss.c | 6 +++---
net/wireless/mlme.c | 15 ++++++++-------
net/wireless/nl80211.c | 31 ++++++++++++++++---------------
net/wireless/nl80211.h | 9 +++++----
net/wireless/reg.c | 11 ++++++-----
net/wireless/reg.h | 4 ++--
net/wireless/scan.c | 6 +++---
net/wireless/wext-sme.c | 2 +-
12 files changed, 75 insertions(+), 69 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d30eada..0a14bd9 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -789,7 +789,7 @@ struct cfg80211_scan_request {
bool aborted;
/* keep last */
- struct ieee80211_channel *channels[0];
+ const struct ieee80211_channel *channels[0];
};
/**
@@ -830,7 +830,7 @@ enum cfg80211_signal_type {
* @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
*/
struct cfg80211_bss {
- struct ieee80211_channel *channel;
+ const struct ieee80211_channel *channel;
u8 bssid[ETH_ALEN];
u64 tsf;
@@ -1002,7 +1002,7 @@ struct cfg80211_disassoc_request {
struct cfg80211_ibss_params {
u8 *ssid;
u8 *bssid;
- struct ieee80211_channel *channel;
+ const struct ieee80211_channel *channel;
u8 *ie;
u8 ssid_len, ie_len;
u16 beacon_interval;
@@ -1034,7 +1034,7 @@ struct cfg80211_ibss_params {
* @key: WEP key for shared key authentication
*/
struct cfg80211_connect_params {
- struct ieee80211_channel *channel;
+ const struct ieee80211_channel *channel;
u8 *bssid;
u8 *ssid;
size_t ssid_len;
@@ -1322,7 +1322,7 @@ struct cfg80211_ops {
struct ieee80211_txq_params *params);
int (*set_channel)(struct wiphy *wiphy, struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type);
int (*scan)(struct wiphy *wiphy, struct net_device *dev,
@@ -1379,7 +1379,7 @@ struct cfg80211_ops {
int (*remain_on_channel)(struct wiphy *wiphy,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration,
u64 *cookie);
@@ -1388,10 +1388,10 @@ struct cfg80211_ops {
u64 cookie);
int (*mgmt_tx)(struct wiphy *wiphy, struct net_device *dev,
- struct ieee80211_channel *chan, bool offchan,
- enum nl80211_channel_type channel_type,
- bool channel_type_valid, unsigned int wait,
- const u8 *buf, size_t len, u64 *cookie);
+ const struct ieee80211_channel *chan, bool offchan,
+ enum nl80211_channel_type channel_type,
+ bool channel_type_valid, unsigned int wait,
+ const u8 *buf, size_t len, u64 *cookie);
int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
struct net_device *dev,
u64 cookie);
@@ -1804,7 +1804,7 @@ struct wireless_dev {
struct cfg80211_internal_bss *authtry_bsses[MAX_AUTH_BSSES];
struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES];
struct cfg80211_internal_bss *current_bss; /* associated / joined */
- struct ieee80211_channel *channel;
+ const struct ieee80211_channel *channel;
bool ps;
int ps_timeout;
@@ -2294,20 +2294,20 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
*/
struct cfg80211_bss*
cfg80211_inform_bss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *bssid,
u64 timestamp, u16 capability, u16 beacon_interval,
const u8 *ie, size_t ielen,
s32 signal, gfp_t gfp);
struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *bssid,
const u8 *ssid, size_t ssid_len,
u16 capa_mask, u16 capa_val);
static inline struct cfg80211_bss *
cfg80211_get_ibss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *ssid, size_t ssid_len)
{
return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len,
@@ -2315,7 +2315,7 @@ cfg80211_get_ibss(struct wiphy *wiphy,
}
struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *meshid, size_t meshidlen,
const u8 *meshcfg);
void cfg80211_put_bss(struct cfg80211_bss *bss);
@@ -2695,7 +2695,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason,
* @gfp: allocation flags
*/
void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, gfp_t gfp);
@@ -2709,7 +2709,7 @@ void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie,
*/
void cfg80211_remain_on_channel_expired(struct net_device *dev,
u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
gfp_t gfp);
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 17cd0c0..d2fcf62 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -9,11 +9,11 @@
#include <net/cfg80211.h>
#include "core.h"
-struct ieee80211_channel *
+const struct ieee80211_channel *
rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
int freq, enum nl80211_channel_type channel_type)
{
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
struct ieee80211_sta_ht_cap *ht_cap;
chan = ieee80211_get_channel(&rdev->wiphy, freq);
@@ -45,10 +45,10 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
}
static bool can_beacon_sec_chan(struct wiphy *wiphy,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type)
{
- struct ieee80211_channel *sec_chan;
+ const struct ieee80211_channel *sec_chan;
int diff;
switch (channel_type) {
@@ -80,7 +80,7 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, int freq,
enum nl80211_channel_type channel_type)
{
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
int result;
if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 26a0a08..48c79d2 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -302,7 +302,7 @@ int cfg80211_leave_mesh(struct cfg80211_registered_device *rdev,
/* MLME */
int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_auth_type auth_type,
const u8 *bssid,
const u8 *ssid, int ssid_len,
@@ -310,7 +310,8 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
const u8 *key, int key_len, int key_idx,
bool local_state_change);
int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
- struct net_device *dev, struct ieee80211_channel *chan,
+ struct net_device *dev,
+ const struct ieee80211_channel *chan,
enum nl80211_auth_type auth_type, const u8 *bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len,
@@ -318,13 +319,14 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
bool local_state_change);
int __cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
const u8 *bssid, const u8 *prev_bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len, bool use_mfp,
struct cfg80211_crypto_settings *crypt);
int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
- struct net_device *dev, struct ieee80211_channel *chan,
+ struct net_device *dev,
+ const struct ieee80211_channel *chan,
const u8 *bssid, const u8 *prev_bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len, bool use_mfp,
@@ -355,7 +357,7 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid);
void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);
int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan, bool offchan,
+ const struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
const u8 *buf, size_t len, u64 *cookie);
@@ -403,7 +405,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
u32 *flags, struct vif_params *params);
void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev);
-struct ieee80211_channel *
+const struct ieee80211_channel *
rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
int freq, enum nl80211_channel_type channel_type);
int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c
index 39765bc..9bb06a2 100644
--- a/net/wireless/debugfs.c
+++ b/net/wireless/debugfs.c
@@ -46,7 +46,7 @@ DEBUGFS_READONLY_FILE(short_retry_limit, 20, "%d",
DEBUGFS_READONLY_FILE(long_retry_limit, 20, "%d",
wiphy->retry_long);
-static int ht_print_chan(struct ieee80211_channel *chan,
+static int ht_print_chan(const struct ieee80211_channel *chan,
char *buf, int buf_size, int offset)
{
if (WARN_ON(offset > buf_size))
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index f33fbb7..92a16a7 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -235,7 +235,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
if (!wdev->wext.ibss.channel) {
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
struct ieee80211_supported_band *sband;
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
sband = rdev->wiphy.bands[band];
if (!sband)
@@ -294,7 +294,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
- struct ieee80211_channel *chan = NULL;
+ const struct ieee80211_channel *chan = NULL;
int err, freq;
/* call only for ibss! */
@@ -351,7 +351,7 @@ int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
struct iw_freq *freq, char *extra)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
- struct ieee80211_channel *chan = NULL;
+ const struct ieee80211_channel *chan = NULL;
/* call only for ibss! */
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_ADHOC))
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 16881fe..b5fefd0 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -396,7 +396,7 @@ EXPORT_SYMBOL(cfg80211_michael_mic_failure);
/* some MLME handling for userspace SME */
int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_auth_type auth_type,
const u8 *bssid,
const u8 *ssid, int ssid_len,
@@ -481,7 +481,8 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
}
int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
- struct net_device *dev, struct ieee80211_channel *chan,
+ struct net_device *dev,
+ const struct ieee80211_channel *chan,
enum nl80211_auth_type auth_type, const u8 *bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len,
@@ -501,7 +502,7 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
int __cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
const u8 *bssid, const u8 *prev_bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len, bool use_mfp,
@@ -568,7 +569,7 @@ int __cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
const u8 *bssid, const u8 *prev_bssid,
const u8 *ssid, int ssid_len,
const u8 *ie, int ie_len, bool use_mfp,
@@ -734,7 +735,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev,
}
void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, gfp_t gfp)
{
@@ -748,7 +749,7 @@ EXPORT_SYMBOL(cfg80211_ready_on_channel);
void cfg80211_remain_on_channel_expired(struct net_device *dev,
u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
gfp_t gfp)
{
@@ -895,7 +896,7 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev)
int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct net_device *dev,
- struct ieee80211_channel *chan, bool offchan,
+ const struct ieee80211_channel *chan, bool offchan,
enum nl80211_channel_type channel_type,
bool channel_type_valid, unsigned int wait,
const u8 *buf, size_t len, u64 *cookie)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0efa7fd..fcb1c91 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -294,7 +294,7 @@ static inline void *nl80211hdr_put(struct sk_buff *skb, u32 pid, u32 seq,
}
static int nl80211_msg_put_channel(struct sk_buff *msg,
- struct ieee80211_channel *chan)
+ const struct ieee80211_channel *chan)
{
NLA_PUT_U32(msg, NL80211_FREQUENCY_ATTR_FREQ,
chan->center_freq);
@@ -561,7 +561,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
struct nlattr *nl_modes;
struct nlattr *nl_cmds;
enum ieee80211_band band;
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
struct ieee80211_rate *rate;
int i;
u16 ifmodes = dev->wiphy.interface_modes;
@@ -3170,7 +3170,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
struct net_device *dev = info->user_ptr[1];
struct cfg80211_scan_request *request;
struct cfg80211_ssid *ssid;
- struct ieee80211_channel *channel;
+ const struct ieee80211_channel *channel;
struct nlattr *attr;
struct wiphy *wiphy;
int err, tmp, n_ssids = 0, n_channels, i;
@@ -3237,7 +3237,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
if (info->attrs[NL80211_ATTR_SCAN_FREQUENCIES]) {
/* user specified, bail out if channel not found */
nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_FREQUENCIES], tmp) {
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
chan = ieee80211_get_channel(wiphy, nla_get_u32(attr));
@@ -3260,7 +3260,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
if (!wiphy->bands[band])
continue;
for (j = 0; j < wiphy->bands[band]->n_channels; j++) {
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
chan = &wiphy->bands[band]->channels[j];
@@ -3572,7 +3572,7 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
const u8 *bssid, *ssid, *ie = NULL;
int err, ssid_len, ie_len = 0;
enum nl80211_auth_type auth_type;
@@ -3745,7 +3745,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct cfg80211_crypto_settings crypto;
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
const u8 *bssid, *ssid, *ie = NULL, *prev_bssid = NULL;
int err, ssid_len, ie_len = 0;
bool use_mfp = false;
@@ -4322,7 +4322,7 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
struct sk_buff *msg;
void *hdr;
u64 cookie;
@@ -4527,7 +4527,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
bool channel_type_valid = false;
u32 freq;
@@ -5900,9 +5900,10 @@ void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
nlmsg_free(msg);
}
-void nl80211_send_beacon_hint_event(struct wiphy *wiphy,
- struct ieee80211_channel *channel_before,
- struct ieee80211_channel *channel_after)
+void
+nl80211_send_beacon_hint_event(struct wiphy *wiphy,
+ const struct ieee80211_channel *channel_before,
+ const struct ieee80211_channel *channel_after)
{
struct sk_buff *msg;
void *hdr;
@@ -5960,7 +5961,7 @@ nla_put_failure:
static void nl80211_send_remain_on_chan_event(
int cmd, struct cfg80211_registered_device *rdev,
struct net_device *netdev, u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, gfp_t gfp)
{
@@ -6002,7 +6003,7 @@ static void nl80211_send_remain_on_chan_event(
void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev,
struct net_device *netdev, u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, gfp_t gfp)
{
@@ -6013,7 +6014,7 @@ void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev,
void nl80211_send_remain_on_channel_cancel(
struct cfg80211_registered_device *rdev, struct net_device *netdev,
- u64 cookie, struct ieee80211_channel *chan,
+ u64 cookie, const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type, gfp_t gfp)
{
nl80211_send_remain_on_chan_event(NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index f2af695..3039286 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -62,8 +62,8 @@ nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
void
nl80211_send_beacon_hint_event(struct wiphy *wiphy,
- struct ieee80211_channel *channel_before,
- struct ieee80211_channel *channel_after);
+ const struct ieee80211_channel *channel_before,
+ const struct ieee80211_channel *channel_after);
void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
struct net_device *netdev, const u8 *bssid,
@@ -72,12 +72,13 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
void nl80211_send_remain_on_channel(struct cfg80211_registered_device *rdev,
struct net_device *netdev,
u64 cookie,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, gfp_t gfp);
void nl80211_send_remain_on_channel_cancel(
struct cfg80211_registered_device *rdev, struct net_device *netdev,
- u64 cookie, struct ieee80211_channel *chan,
+ u64 cookie,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type, gfp_t gfp);
void nl80211_send_sta_event(struct cfg80211_registered_device *rdev,
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1613080..2768846 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -734,7 +734,7 @@ static const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
}
}
-static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
+static void chan_reg_rule_print_dbg(const struct ieee80211_channel *chan,
u32 desired_bw_khz,
const struct ieee80211_reg_rule *reg_rule)
{
@@ -762,7 +762,7 @@ static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
power_rule->max_eirp);
}
#else
-static void chan_reg_rule_print_dbg(struct ieee80211_channel *chan,
+static void chan_reg_rule_print_dbg(const struct ieee80211_channel *chan,
u32 desired_bw_khz,
const struct ieee80211_reg_rule *reg_rule)
{
@@ -1034,7 +1034,7 @@ static void reg_process_beacons(struct wiphy *wiphy)
wiphy_update_beacon_reg(wiphy);
}
-static bool is_ht40_not_allowed(struct ieee80211_channel *chan)
+static bool is_ht40_not_allowed(const struct ieee80211_channel *chan)
{
if (!chan)
return true;
@@ -1052,7 +1052,8 @@ static void reg_process_ht_flags_channel(struct wiphy *wiphy,
{
struct ieee80211_supported_band *sband;
struct ieee80211_channel *channel;
- struct ieee80211_channel *channel_before = NULL, *channel_after = NULL;
+ struct ieee80211_channel *channel_before = NULL;
+ struct ieee80211_channel *channel_after = NULL;
unsigned int i;
assert_cfg80211_lock();
@@ -1865,7 +1866,7 @@ static bool freq_is_chan_12_13_14(u16 freq)
}
int regulatory_hint_found_beacon(struct wiphy *wiphy,
- struct ieee80211_channel *beacon_chan,
+ const struct ieee80211_channel *beacon_chan,
gfp_t gfp)
{
struct reg_beacon *reg_beacon;
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index b67d1c3..2a4cf5c 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -35,8 +35,8 @@ int set_regdom(const struct ieee80211_regdomain *rd);
* set the wiphy->disable_beacon_hints to true.
*/
int regulatory_hint_found_beacon(struct wiphy *wiphy,
- struct ieee80211_channel *beacon_chan,
- gfp_t gfp);
+ const struct ieee80211_channel *beacon_chan,
+ gfp_t gfp);
/**
* regulatory_hint_11d - hints a country IE as a regulatory domain
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index fbf6f33..756c8e7 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -275,7 +275,7 @@ static int cmp_bss(struct cfg80211_bss *a,
}
struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *bssid,
const u8 *ssid, size_t ssid_len,
u16 capa_mask, u16 capa_val)
@@ -310,7 +310,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
EXPORT_SYMBOL(cfg80211_get_bss);
struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *meshid, size_t meshidlen,
const u8 *meshcfg)
{
@@ -524,7 +524,7 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev,
struct cfg80211_bss*
cfg80211_inform_bss(struct wiphy *wiphy,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
const u8 *bssid,
u64 timestamp, u16 capability, u16 beacon_interval,
const u8 *ie, size_t ielen,
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index 6fffe62..357c9f7 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -125,7 +125,7 @@ int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
struct iw_freq *freq, char *extra)
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
- struct ieee80211_channel *chan = NULL;
+ const struct ieee80211_channel *chan = NULL;
/* call only for station! */
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION))
--
1.7.5.rc3.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] wireless: Use const struct ieee80211_channel where possible
2011-04-29 5:25 [PATCH 0/2] wireless: Make and use const struct ieee80211_channel Joe Perches
2011-04-29 5:25 ` [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible Joe Perches
@ 2011-04-29 5:25 ` Joe Perches
2011-05-05 18:49 ` [PATCH 0/2] wireless: Make and use const struct ieee80211_channel John W. Linville
2 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2011-04-29 5:25 UTC (permalink / raw)
To: Stanislaw Gruszka, Wey-Yi Guy, Intel Linux Wireless, Samuel Ortiz,
Dan Williams
Cc: linux-wireless, netdev, linux-kernel, libertas-dev, orinoco-users,
orinoco-devel
Make some structure uses const.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 2 +-
drivers/net/wireless/iwlegacy/iwl3945-base.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 2 +-
drivers/net/wireless/iwmc3200wifi/cfg80211.c | 4 ++--
drivers/net/wireless/libertas/cfg.c | 2 +-
drivers/net/wireless/mwifiex/cfg80211.c | 9 +++++----
drivers/net/wireless/orinoco/cfg.c | 2 +-
drivers/net/wireless/rndis_wlan.c | 9 +++++----
drivers/net/wireless/wl1251/cmd.c | 2 +-
drivers/net/wireless/wl1251/cmd.h | 2 +-
10 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c
index 5a8a3cc..41ec864 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c
@@ -741,7 +741,7 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
u8 is_active, u8 n_probes,
struct iwl_scan_channel *scan_ch)
{
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
const struct ieee80211_supported_band *sband;
const struct iwl_channel_info *ch_info;
u16 passive_dwell = 0;
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index cc7ebce..5bcfaf5 100644
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
@@ -1811,7 +1811,7 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
struct iwl3945_scan_channel *scan_ch,
struct ieee80211_vif *vif)
{
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
const struct ieee80211_supported_band *sband;
const struct iwl_channel_info *ch_info;
u16 passive_dwell = 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index e202a40..75badb1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1051,7 +1051,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv,
u8 is_active, u8 n_probes,
struct iwl_scan_channel *scan_ch)
{
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
const struct ieee80211_supported_band *sband;
const struct iwl_channel_info *ch_info;
u16 passive_dwell = 0;
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
index ed57e44..a9d1b44 100644
--- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
+++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
@@ -408,7 +408,7 @@ static int iwm_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params)
{
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
- struct ieee80211_channel *chan = params->channel;
+ const struct ieee80211_channel *chan = params->channel;
if (!test_bit(IWM_STATUS_READY, &iwm->status))
return -EIO;
@@ -549,7 +549,7 @@ static int iwm_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
- struct ieee80211_channel *chan = sme->channel;
+ const struct ieee80211_channel *chan = sme->channel;
struct key_params key_param;
int ret;
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 5caa2ac..66d6b58 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -431,7 +431,7 @@ static int lbs_add_wpa_tlv(u8 *tlv, const u8 *ie, u8 ie_len)
static int lbs_cfg_set_channel(struct wiphy *wiphy,
struct net_device *netdev,
- struct ieee80211_channel *channel,
+ const struct ieee80211_channel *channel,
enum nl80211_channel_type channel_type)
{
struct lbs_private *priv = wiphy_priv(wiphy);
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index b99ae26..5508dc0 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -329,7 +329,7 @@ static int mwifiex_reg_notifier(struct wiphy *wiphy,
*/
static int
mwifiex_set_rf_channel(struct mwifiex_private *priv,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type)
{
struct mwifiex_chan_freq_power cfp;
@@ -385,7 +385,7 @@ mwifiex_set_rf_channel(struct mwifiex_private *priv,
*/
static int
mwifiex_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type)
{
struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy);
@@ -898,7 +898,8 @@ static int mwifiex_inform_bss_from_scan_result(struct mwifiex_private *priv,
*/
static int
mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
- u8 *bssid, int mode, struct ieee80211_channel *channel,
+ u8 *bssid, int mode,
+ const struct ieee80211_channel *channel,
struct cfg80211_connect_params *sme, bool privacy)
{
struct mwifiex_802_11_ssid req_ssid;
@@ -1304,7 +1305,7 @@ mwifiex_cfg80211_results(struct work_struct *work)
container_of(work, struct mwifiex_private, cfg_workqueue);
struct mwifiex_user_scan_cfg *scan_req;
int ret = 0, i;
- struct ieee80211_channel *chan;
+ const struct ieee80211_channel *chan;
if (priv->scan_request) {
scan_req = kzalloc(sizeof(struct mwifiex_user_scan_cfg),
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 736bbb9..975c915 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -162,7 +162,7 @@ static int orinoco_scan(struct wiphy *wiphy, struct net_device *dev,
static int orinoco_set_channel(struct wiphy *wiphy,
struct net_device *netdev,
- struct ieee80211_channel *chan,
+ const struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type)
{
struct orinoco_private *priv = wiphy_priv(wiphy);
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 518542b..c22d516 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -554,7 +554,8 @@ static int rndis_join_ibss(struct wiphy *wiphy, struct net_device *dev,
static int rndis_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
static int rndis_set_channel(struct wiphy *wiphy, struct net_device *dev,
- struct ieee80211_channel *chan, enum nl80211_channel_type channel_type);
+ const struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type);
static int rndis_add_key(struct wiphy *wiphy, struct net_device *netdev,
u8 key_index, bool pairwise, const u8 *mac_addr,
@@ -2143,7 +2144,7 @@ static int rndis_connect(struct wiphy *wiphy, struct net_device *dev,
{
struct rndis_wlan_private *priv = wiphy_priv(wiphy);
struct usbnet *usbdev = priv->usbdev;
- struct ieee80211_channel *channel = sme->channel;
+ const struct ieee80211_channel *channel = sme->channel;
struct ndis_80211_ssid ssid;
int pairwise = RNDIS_WLAN_ALG_NONE;
int groupwise = RNDIS_WLAN_ALG_NONE;
@@ -2280,7 +2281,7 @@ static int rndis_join_ibss(struct wiphy *wiphy, struct net_device *dev,
{
struct rndis_wlan_private *priv = wiphy_priv(wiphy);
struct usbnet *usbdev = priv->usbdev;
- struct ieee80211_channel *channel = params->channel;
+ const struct ieee80211_channel *channel = params->channel;
struct ndis_80211_ssid ssid;
enum nl80211_auth_type auth_type;
int ret, alg, length, chan = -1;
@@ -2388,7 +2389,7 @@ static int rndis_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
}
static int rndis_set_channel(struct wiphy *wiphy, struct net_device *netdev,
- struct ieee80211_channel *chan, enum nl80211_channel_type channel_type)
+ const struct ieee80211_channel *chan, enum nl80211_channel_type channel_type)
{
struct rndis_wlan_private *priv = wiphy_priv(wiphy);
struct usbnet *usbdev = priv->usbdev;
diff --git a/drivers/net/wireless/wl1251/cmd.c b/drivers/net/wireless/wl1251/cmd.c
index 81f164b..ed5e62a 100644
--- a/drivers/net/wireless/wl1251/cmd.c
+++ b/drivers/net/wireless/wl1251/cmd.c
@@ -413,7 +413,7 @@ out:
}
int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
- struct ieee80211_channel *channels[],
+ const struct ieee80211_channel *channels[],
unsigned int n_channels, unsigned int n_probes)
{
struct wl1251_cmd_scan *cmd;
diff --git a/drivers/net/wireless/wl1251/cmd.h b/drivers/net/wireless/wl1251/cmd.h
index 79ca527..f1ff4bf 100644
--- a/drivers/net/wireless/wl1251/cmd.h
+++ b/drivers/net/wireless/wl1251/cmd.h
@@ -44,7 +44,7 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id,
void *buf, size_t buf_len);
int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
- struct ieee80211_channel *channels[],
+ const struct ieee80211_channel *channels[],
unsigned int n_channels, unsigned int n_probes);
int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout);
--
1.7.5.rc3.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible
2011-04-29 5:25 ` [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible Joe Perches
@ 2011-04-29 7:11 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2011-04-29 7:11 UTC (permalink / raw)
To: Joe Perches
Cc: David S. Miller, John W. Linville, linux-wireless, netdev,
linux-kernel
On Thu, 2011-04-28 at 22:25 -0700, Joe Perches wrote:
> Useful for declarations of static const.
I don't mind marking lots of places const, but it isn't actually as
useful as you think since you can't declare any channels const as they
are modified at runtime for regulatory enforcement.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
2011-04-29 5:25 [PATCH 0/2] wireless: Make and use const struct ieee80211_channel Joe Perches
2011-04-29 5:25 ` [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible Joe Perches
2011-04-29 5:25 ` [PATCH 2/2] wireless: Use const struct ieee80211_channel " Joe Perches
@ 2011-05-05 18:49 ` John W. Linville
2011-05-05 22:21 ` Joe Perches
2 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2011-05-05 18:49 UTC (permalink / raw)
To: Joe Perches
Cc: linux-wireless, libertas-dev, orinoco-users, orinoco-devel,
netdev, linux-kernel
These patches generated a lot of warnings in net/mac80211. Did you
actually build them?
On Thu, Apr 28, 2011 at 10:25:06PM -0700, Joe Perches wrote:
> Joe Perches (2):
> wireless: Make struct ieee80211_channel const where possible
> wireless: Use const struct ieee80211_channel where possible
>
> drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 2 +-
> drivers/net/wireless/iwlegacy/iwl3945-base.c | 2 +-
> drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 2 +-
> drivers/net/wireless/iwmc3200wifi/cfg80211.c | 4 +-
> drivers/net/wireless/libertas/cfg.c | 2 +-
> drivers/net/wireless/mwifiex/cfg80211.c | 9 ++++---
> drivers/net/wireless/orinoco/cfg.c | 2 +-
> drivers/net/wireless/rndis_wlan.c | 9 ++++---
> drivers/net/wireless/wl1251/cmd.c | 2 +-
> drivers/net/wireless/wl1251/cmd.h | 2 +-
> include/net/cfg80211.h | 34 +++++++++++++-------------
> net/wireless/chan.c | 10 ++++----
> net/wireless/core.h | 14 ++++++----
> net/wireless/debugfs.c | 2 +-
> net/wireless/ibss.c | 6 ++--
> net/wireless/mlme.c | 15 ++++++-----
> net/wireless/nl80211.c | 31 ++++++++++++-----------
> net/wireless/nl80211.h | 9 ++++---
> net/wireless/reg.c | 11 ++++----
> net/wireless/reg.h | 4 +-
> net/wireless/scan.c | 6 ++--
> net/wireless/wext-sme.c | 2 +-
> 22 files changed, 94 insertions(+), 86 deletions(-)
>
> --
> 1.7.5.rc3.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
2011-05-05 18:49 ` [PATCH 0/2] wireless: Make and use const struct ieee80211_channel John W. Linville
@ 2011-05-05 22:21 ` Joe Perches
2011-05-06 13:19 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2011-05-05 22:21 UTC (permalink / raw)
To: John W. Linville
Cc: libertas-dev, linux-wireless, orinoco-users, orinoco-devel,
netdev, LKML
On Thu, 2011-05-05 at 14:49 -0400, John W. Linville wrote:
> These patches generated a lot of warnings in net/mac80211. Did you
> actually build them?
Yes.
Did you apply patch 1/2 first?
It's a dependent patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
2011-05-05 22:21 ` Joe Perches
@ 2011-05-06 13:19 ` John W. Linville
2011-05-06 16:10 ` Joe Perches
0 siblings, 1 reply; 9+ messages in thread
From: John W. Linville @ 2011-05-06 13:19 UTC (permalink / raw)
To: Joe Perches
Cc: libertas-dev, linux-wireless, orinoco-users, orinoco-devel,
netdev, LKML
On Thu, May 05, 2011 at 03:21:47PM -0700, Joe Perches wrote:
> On Thu, 2011-05-05 at 14:49 -0400, John W. Linville wrote:
> > These patches generated a lot of warnings in net/mac80211. Did you
> > actually build them?
>
> Yes.
>
> Did you apply patch 1/2 first?
> It's a dependent patch.
That's the one that cause most of the warnings...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
2011-05-06 13:19 ` John W. Linville
@ 2011-05-06 16:10 ` Joe Perches
2011-05-11 16:57 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2011-05-06 16:10 UTC (permalink / raw)
To: John W. Linville
Cc: libertas-dev, linux-wireless, orinoco-users, orinoco-devel,
netdev, LKML
On Fri, 2011-05-06 at 09:19 -0400, John W. Linville wrote:
> On Thu, May 05, 2011 at 03:21:47PM -0700, Joe Perches wrote:
> > On Thu, 2011-05-05 at 14:49 -0400, John W. Linville wrote:
> > > These patches generated a lot of warnings in net/mac80211. Did you
> > > actually build them?
> > Yes.
> > Did you apply patch 1/2 first?
> > It's a dependent patch.
> That's the one that cause most of the warnings...
Consider the 2 patches as a single patch.
Do you have new build warnings after applying both
patches 1 and 2?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel
2011-05-06 16:10 ` Joe Perches
@ 2011-05-11 16:57 ` John W. Linville
0 siblings, 0 replies; 9+ messages in thread
From: John W. Linville @ 2011-05-11 16:57 UTC (permalink / raw)
To: Joe Perches
Cc: libertas-dev, linux-wireless, orinoco-users, orinoco-devel,
netdev, LKML
On Fri, May 06, 2011 at 09:10:21AM -0700, Joe Perches wrote:
> On Fri, 2011-05-06 at 09:19 -0400, John W. Linville wrote:
> > On Thu, May 05, 2011 at 03:21:47PM -0700, Joe Perches wrote:
> > > On Thu, 2011-05-05 at 14:49 -0400, John W. Linville wrote:
> > > > These patches generated a lot of warnings in net/mac80211. Did you
> > > > actually build them?
> > > Yes.
> > > Did you apply patch 1/2 first?
> > > It's a dependent patch.
> > That's the one that cause most of the warnings...
>
> Consider the 2 patches as a single patch.
> Do you have new build warnings after applying both
> patches 1 and 2?
Yes, of course.
CC [M] net/mac80211/scan.o
net/mac80211/scan.c: In function ‘ieee80211_scan_state_decision’:
net/mac80211/scan.c:509:12: warning: assignment discards qualifiers from pointer target type
net/mac80211/scan.c: In function ‘ieee80211_scan_state_set_channel’:
net/mac80211/scan.c:610:7: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/offchannel.o
CC [M] net/mac80211/ht.o
CC [M] net/mac80211/agg-tx.o
CC [M] net/mac80211/agg-rx.o
CC [M] net/mac80211/ibss.o
net/mac80211/ibss.c: In function ‘ieee80211_sta_join_ibss’:
net/mac80211/ibss.c:250:7: warning: passing argument 4 of ‘__ieee80211_sta_join_ibss’ discards qualifiers from pointer target type
net/mac80211/ibss.c:64:13: note: expected ‘struct ieee80211_channel *’ but argument is of type ‘const struct ieee80211_channel *’
net/mac80211/ibss.c: In function ‘ieee80211_ibss_join’:
net/mac80211/ibss.c:918:24: warning: assignment discards qualifiers from pointer target type
net/mac80211/ibss.c:923:30: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/mlme.o
net/mac80211/mlme.c: In function ‘ieee80211_mgd_auth’:
net/mac80211/mlme.c:2350:11: warning: assignment discards qualifiers from pointer target type
net/mac80211/mlme.c: In function ‘ieee80211_mgd_assoc’:
net/mac80211/mlme.c:2500:11: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/work.o
CC [M] net/mac80211/iface.o
CC [M] net/mac80211/rate.o
CC [M] net/mac80211/tkip.o
CC [M] net/mac80211/aes_ccm.o
CC [M] net/mac80211/aes_cmac.o
CC [M] net/mac80211/cfg.o
net/mac80211/cfg.c:2083:2: warning: initialization from incompatible pointer type
net/mac80211/cfg.c:2101:2: warning: initialization from incompatible pointer type
net/mac80211/cfg.c:2103:2: warning: initialization from incompatible pointer type
CC [M] net/mac80211/rx.o
commit 07daa458f14226deff1e464f594a44111168e7ee
Author: Joe Perches <joe@perches.com>
Date: Thu Apr 28 22:25:08 2011 -0700
wireless: Use const struct ieee80211_channel where possible
Make some structure uses const.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
commit 5c9adfae8855fc744f77b24df322060a7117c521
Author: Joe Perches <joe@perches.com>
Date: Thu Apr 28 22:25:07 2011 -0700
wireless: Make struct ieee80211_channel const where possible
Useful for declarations of static const.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
<commits were temporary, not applied now>
I'm dropping these patches -- feel free to repost if/when the warnings
disappear.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-05-11 16:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 5:25 [PATCH 0/2] wireless: Make and use const struct ieee80211_channel Joe Perches
2011-04-29 5:25 ` [PATCH 1/2] wireless: Make struct ieee80211_channel const where possible Joe Perches
2011-04-29 7:11 ` Johannes Berg
2011-04-29 5:25 ` [PATCH 2/2] wireless: Use const struct ieee80211_channel " Joe Perches
2011-05-05 18:49 ` [PATCH 0/2] wireless: Make and use const struct ieee80211_channel John W. Linville
2011-05-05 22:21 ` Joe Perches
2011-05-06 13:19 ` John W. Linville
2011-05-06 16:10 ` Joe Perches
2011-05-11 16:57 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).