summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192su/ieee80211
diff options
context:
space:
mode:
authorFlorian Schilhabel <florian.c.schilhabel@googlemail.com>2010-07-14 14:42:43 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 11:57:49 -0700
commitd54713991107f3f29acb9b579569de9196ab2890 (patch)
treef363876e18393bf93dd72c940004c3101c802b88 /drivers/staging/rtl8192su/ieee80211
parent638b5acd4dfe9dd79260a9c824be74b29408ee9a (diff)
downloadop-kernel-dev-d54713991107f3f29acb9b579569de9196ab2890.zip
op-kernel-dev-d54713991107f3f29acb9b579569de9196ab2890.tar.gz
staging: rtl8192su: update rtl819x_set_channel_map()
This function is now on par with the latest realtek drivers. Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192su/ieee80211')
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211.h13
-rw-r--r--drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c4
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
index bcb2b12..8a20323 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h
@@ -1120,9 +1120,12 @@ enum {
COUNTRY_CODE_MKK = 5,
COUNTRY_CODE_MKK1 = 6,
COUNTRY_CODE_ISRAEL = 7,
- COUNTRY_CODE_TELEC,
- COUNTRY_CODE_MIC,
- COUNTRY_CODE_GLOBAL_DOMAIN
+ COUNTRY_CODE_TELEC = 8,
+ COUNTRY_CODE_MIC = 9,
+ COUNTRY_CODE_GLOBAL_DOMAIN = 10,
+ COUNTRY_CODE_WORLD_WIDE_13 = 11,
+ COUNTRY_CODE_TELEC_NETGEAR = 12,
+ COUNTRY_CODE_MAX
};
#include "ieee80211_r8192s.h"
@@ -1295,6 +1298,10 @@ struct ieee80211_device {
*/
void *pDot11dInfo;
bool bGlobalDomain;
+
+ u8 IbssStartChnl;
+ u8 ibss_maxjoin_chal;
+
int rate; /* current rate */
int basic_rate;
//FIXME: pleace callback, see if redundant with softmac_features
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
index 4f1f2f0..c2028b4 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
@@ -1432,6 +1432,8 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
if ((ieee->iw_mode == IW_MODE_ADHOC) && !(net->capability & WLAN_CAPABILITY_IBSS))
return;
+ if ((ieee->iw_mode == IW_MODE_ADHOC) && (net->channel > ieee->ibss_maxjoin_chal))
+ return;
if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC){
/* if the user specified the AP MAC, we need also the essid
@@ -2362,7 +2364,7 @@ void ieee80211_start_ibss_wq(struct work_struct *work)
// if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK))
if (ieee->state == IEEE80211_NOLINK)
- ieee->current_network.channel = 6;
+ ieee->current_network.channel = ieee->IbssStartChnl;
/* if not then the state is not linked. Maybe the user swithced to
* ad-hoc mode just after being in monitor mode, or just after
* being very few time in managed mode (so the card have had no
OpenPOWER on IntegriCloud