[go: nahoru, domu]

History log of /drivers/net/wireless/rtlwifi/regd.c
Revision Date Author Comments
f3a97e93814aeac3f13e857a0071726acc9bd626 22-Sep-2014 Larry Finger <Larry.Finger@lwfinger.net> rtlwifi: Finish modifying core routines for new drivers

Addition of the new drivers and the update to a new version for the others
lead to changes in all the core routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
856a4ef9f01e9f4b42c96dd70268f4864a93f72c 29-Oct-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> rtlwifi: fix usage of freq_reg_info()

freq_reg_info() expects KHz and not MHz, fix this. In
this case we'll now be getting the no-ir flags cleared
on channels for any channel when the country IE trusts
that channel.

@@
struct ieee80211_channel *ch;
struct wiphy *wiphy;
const struct ieee80211_reg_rule *rule;
@@

-rule = freq_reg_info(wiphy, ch->center_freq);
+rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a2f73b6c5db3c272d87eaebb5bed355d75a0f25f 11-Nov-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> cfg80211: move regulatory flags to their own variable

We'll expand this later, this will make it easier to
classify and review what things are related to regulatory
or not.

Coccinelle only missed 4 hits, which I had to do manually,
supplying the SmPL in case of merge conflicts.

@@
struct wiphy *wiphy;
@@
-wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY
+wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG
@@
expression e;
@@
-e->flags |= WIPHY_FLAG_CUSTOM_REGULATORY
+e->regulatory_flags |= REGULATORY_CUSTOM_REG
@@
struct wiphy *wiphy;
@@
-wiphy->flags &= ~WIPHY_FLAG_CUSTOM_REGULATORY
+wiphy->regulatory_flags &= ~REGULATORY_CUSTOM_REG
@@
struct wiphy *wiphy;
@@
-wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY
+wiphy->regulatory_flags & REGULATORY_CUSTOM_REG

@@
struct wiphy *wiphy;
@@
-wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY
+wiphy->regulatory_flags |= REGULATORY_STRICT_REG
@@
expression e;
@@
-e->flags |= WIPHY_FLAG_STRICT_REGULATORY
+e->regulatory_flags |= REGULATORY_STRICT_REG
@@
struct wiphy *wiphy;
@@
-wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY
+wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG
@@
struct wiphy *wiphy;
@@
-wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY
+wiphy->regulatory_flags & REGULATORY_STRICT_REG

@@
struct wiphy *wiphy;
@@
-wiphy->flags |= WIPHY_FLAG_DISABLE_BEACON_HINTS
+wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS
@@
expression e;
@@
-e->flags |= WIPHY_FLAG_DISABLE_BEACON_HINTS
+e->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS
@@
struct wiphy *wiphy;
@@
-wiphy->flags &= ~WIPHY_FLAG_DISABLE_BEACON_HINTS
+wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS
@@
struct wiphy *wiphy;
@@
-wiphy->flags & WIPHY_FLAG_DISABLE_BEACON_HINTS
+wiphy->regulatory_flags & REGULATORY_DISABLE_BEACON_HINTS

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Mihir Shete <smihir@qti.qualcomm.com>
Cc: Henri Bahini <hbahini@qca.qualcomm.com>
Cc: Tushnim Bhattacharyya <tushnimb@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[fix up whitespace damage, overly long lines]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8fe02e167efa8ed4a4503a5eedc0f49fcb7e3eb9 21-Oct-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> cfg80211: consolidate passive-scan and no-ibss flags

These two flags are used for the same purpose, just
combine them into a no-ir flag to annotate no initiating
radiation is allowed.

Old userspace sending either flag will have it treated as
the no-ir flag. To be considerate to older userspace we
also send both the no-ir flag and the old no-ibss flags.
Newer userspace will have to be aware of older kernels.

Update all places in the tree using these flags with the
following semantic patch:

@@
@@
-NL80211_RRF_PASSIVE_SCAN
+NL80211_RRF_NO_IR
@@
@@
-NL80211_RRF_NO_IBSS
+NL80211_RRF_NO_IR
@@
@@
-IEEE80211_CHAN_PASSIVE_SCAN
+IEEE80211_CHAN_NO_IR
@@
@@
-IEEE80211_CHAN_NO_IBSS
+IEEE80211_CHAN_NO_IR
@@
@@
-NL80211_RRF_NO_IR | NL80211_RRF_NO_IR
+NL80211_RRF_NO_IR
@@
@@
-IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR
+IEEE80211_CHAN_NO_IR
@@
@@
-(NL80211_RRF_NO_IR)
+NL80211_RRF_NO_IR
@@
@@
-(IEEE80211_CHAN_NO_IR)
+IEEE80211_CHAN_NO_IR

Along with some hand-optimisations in documentation, to
remove duplicates and to fix some indentation.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[do all the driver updates in one go]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
0c0280bd0ba410326eecdaeb1b936696eda6381d 11-Jan-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> wireless: make the reg_notifier() void

The reg_notifier()'s return value need not be checked
as it is only supposed to do post regulatory work and
that should never fail. Any behaviour to regulatory
that needs to be considered before cfg80211 does work
to a driver should be specified by using the already
existing flags, the reg_notifier() just does post
processing should it find it needs to.

Also make lbs_reg_notifier static.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[move lbs_reg_notifier to not break compile]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
361c9c8b0eeeec7d881e018d5143bf883558c566 06-Dec-2012 Johannes Berg <johannes.berg@intel.com> regulatory: use IS_ERR macro family for freq_reg_info

Instead of returning an error and filling a pointer
return the pointer and an ERR_PTR value in error cases.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
fe7ef5e9ba0c60bab01390493a4c6790f7b093af 04-Dec-2012 Johannes Berg <johannes.berg@intel.com> regulatory: remove handling of channel bandwidth

The channel bandwidth handling isn't really quite right,
it assumes that a 40 MHz channel is really two 20 MHz
channels, which isn't strictly true. This is the way the
regulatory database handling is defined right now though
so remove the logic to handle other channel widths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
a8d760668eebc98915383481cb3d9eaf74c2a615 08-Jan-2012 Larry Finger <Larry.Finger@lwfinger.net> rtlwifi: Update copyright dates

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f30d7507a8116e2099a9135c873411db8c0a3dc6 05-Jan-2012 Joe Perches <joe@perches.com> rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__

Consolidate printks to avoid possible message interleaving
and reduce the object size.

Remove unnecessary RT_TRACE parentheses.

Miscellaneous typo and grammar fixes.
Add missing newlines to formats.
Remove duplicate KERN_DEBUG prefixes.
Coalesce formats.
Align arguments.

$ size drivers/net/wireless/rtlwifi/built-in.o*
text data bss dec hex filename
594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.new
607022 55333 138720 801075 c3933 drivers/net/wireless/rtlwifi/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
19086fcef1de1fa7350d8122910a506481acf94b 23-May-2011 Larry Finger <Larry.Finger@lwfinger.net> rtlwifi: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for rtlwifi:

CC [M] drivers/net/wireless/rtlwifi/base.o
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’:
drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’:
drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
CC [M] drivers/net/wireless/rtlwifi/efuse.o
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’:
drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’:
drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable]
CC [M] drivers/net/wireless/rtlwifi/ps.o
drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’:
drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable]
CC [M] drivers/net/wireless/rtlwifi/regd.o
drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’:
drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
CC [M] drivers/net/wireless/rtlwifi/usb.o
drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’:
drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
81b290451122e93b9731bc333c6be2e49fa5bc0c 25-Apr-2011 Chaoming_Li <chaoming_li@realsil.com.cn> rtlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de

Convert regulatory domain routines for addition of RTL8192SE and
RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
0c8173385e549f95cd80c3fff5aab87b4f881d8d 08-Dec-2010 Larry Finger <Larry.Finger@lwfinger.net> rtl8192ce: Add new driver

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>