From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 33/35] Remove international roaming support
Date: Sat, 01 Sep 2007 00:37:23 -0400 [thread overview]
Message-ID: <20070901043723.2498.17595.stgit@dv.roinet.com> (raw)
In-Reply-To: <20070901043233.2498.95850.stgit@dv.roinet.com>
It's broken beyond repair and legally dubious.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/at76_usb.c | 119 ++++-----------------------------------
drivers/net/wireless/at76_usb.h | 8 ---
2 files changed, 13 insertions(+), 114 deletions(-)
diff --git a/drivers/net/wireless/at76_usb.c b/drivers/net/wireless/at76_usb.c
index dc56bf4..2c8ad54 100644
--- a/drivers/net/wireless/at76_usb.c
+++ b/drivers/net/wireless/at76_usb.c
@@ -1310,9 +1310,8 @@ exit:
* at76_start_scan - start a scan
*
* @use_essid - use the configured ESSID in non passive mode
- * @ir_step - international roaming step (0, 1)
*/
-static int at76_start_scan(struct at76_priv *priv, int use_essid, int ir_step)
+static int at76_start_scan(struct at76_priv *priv, int use_essid)
{
struct at76_req_scan scan;
@@ -1331,10 +1330,7 @@ static int at76_start_scan(struct at76_priv *priv, int use_essid, int ir_step)
/* atmelwlandriver differs between scan type 0 and 1 (active/passive)
For ad-hoc mode, it uses type 0 only. */
- if (priv->international_roaming == IR_ON && ir_step == 0)
- scan.scan_type = SCAN_TYPE_PASSIVE;
- else
- scan.scan_type = priv->scan_mode;
+ scan.scan_type = priv->scan_mode;
/* INFO: For probe_delay, not multiplying by 1024 as this will be
slightly less than min_channel_time
@@ -1342,11 +1338,7 @@ static int at76_start_scan(struct at76_priv *priv, int use_essid, int ir_step)
scan.min_channel_time = cpu_to_le16(priv->scan_min_time);
scan.max_channel_time = cpu_to_le16(priv->scan_max_time);
scan.probe_delay = cpu_to_le16(priv->scan_min_time * 1000);
-
- if (priv->international_roaming == IR_ON && ir_step == 1)
- scan.international_scan = 0;
- else
- scan.international_scan = priv->international_roaming;
+ scan.international_scan = 0;
/* other values are set to 0 for type 0 */
@@ -1373,7 +1365,7 @@ static int at76_start_monitor(struct at76_priv *priv)
scan.channel = priv->channel;
scan.scan_type = SCAN_TYPE_PASSIVE;
- scan.international_scan = priv->international_roaming;
+ scan.international_scan = 0;
ret = at76_set_card_command(priv->udev, CMD_SCAN, &scan, sizeof(scan));
if (ret >= 0)
@@ -1976,14 +1968,10 @@ static int at76_iw_handler_set_freq(struct net_device *netdev,
* either that or an invalid frequency was
* provided by the user */
ret = -EINVAL;
- else if (!priv->international_roaming) {
- if (!(priv->domain->channel_map & (1 << (chan - 1)))) {
- printk(KERN_INFO
- "%s: channel %d not allowed for domain %s "
- "(and international_roaming is OFF)\n",
- priv->netdev->name, chan, priv->domain->name);
- ret = -EINVAL;
- }
+ else if (!(priv->domain->channel_map & (1 << (chan - 1)))) {
+ printk(KERN_INFO "%s: channel %d not allowed for domain %s\n",
+ priv->netdev->name, chan, priv->domain->name);
+ ret = -EINVAL;
}
if (ret == -EIWCOMMIT) {
@@ -3002,59 +2990,6 @@ static int at76_iw_get_scan_mode(struct net_device *netdev,
return 0;
}
-static int at76_set_iroaming(struct at76_priv *priv, int onoff)
-{
- int ret = 0;
-
- memset(&priv->mib_buf, 0, sizeof(struct set_mib_buffer));
- priv->mib_buf.type = MIB_MAC_MGMT;
- priv->mib_buf.size = 1;
- priv->mib_buf.index =
- offsetof(struct mib_mac_mgmt, multi_domain_capability_enabled);
- priv->mib_buf.data[0] = onoff;
- ret = at76_set_mib(priv, &priv->mib_buf);
- if (ret < 0)
- err("%s: set_mib (intl_roaming_enable) failed: %d",
- priv->netdev->name, ret);
-
- return ret;
-}
-
-static int at76_iw_set_intl_roaming(struct net_device *netdev,
- struct iw_request_info *info, char *name,
- char *extra)
-{
- struct at76_priv *priv = netdev_priv(netdev);
- int val = *((int *)name);
- int ret = -EIWCOMMIT;
-
- at76_dbg(DBG_IOCTL, "%s: AT76_SET_INTL_ROAMING - mode %s",
- netdev->name, (val == IR_OFF) ? "off" :
- (val == IR_ON) ? "on" : "<invalid>");
-
- if (val != IR_OFF && val != IR_ON)
- ret = -EINVAL;
- else {
- if (priv->international_roaming != val) {
- priv->international_roaming = val;
- at76_set_iroaming(priv, val);
- }
- }
-
- return ret;
-}
-
-static int at76_iw_get_intl_roaming(struct net_device *netdev,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- struct at76_priv *priv = netdev_priv(netdev);
- int *param = (int *)extra;
-
- param[0] = priv->international_roaming;
- return 0;
-}
-
#define AT76_SET_HANDLER(h, f) [h - SIOCIWFIRST] = (iw_handler) f
/* Standard wireless handlers */
@@ -3105,8 +3040,6 @@ static const iw_handler at76_priv_handlers[] = {
AT76_SET_PRIV(AT76_GET_SCAN_TIMES, at76_iw_get_scan_times),
AT76_SET_PRIV(AT76_SET_SCAN_MODE, at76_iw_set_scan_mode),
AT76_SET_PRIV(AT76_GET_SCAN_MODE, at76_iw_get_scan_mode),
- AT76_SET_PRIV(AT76_SET_INTL_ROAMING, at76_iw_set_intl_roaming),
- AT76_SET_PRIV(AT76_GET_INTL_ROAMING, at76_iw_get_intl_roaming),
};
/* Names and arguments of private wireless handlers */
@@ -3146,12 +3079,6 @@ static const struct iw_priv_args at76_priv_args[] = {
{AT76_GET_SCAN_MODE,
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_scan_mode"},
-
- {AT76_SET_INTL_ROAMING,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "set_intl_scan"},
-
- {AT76_GET_INTL_ROAMING,
- 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_intl_scan"}
};
static const struct iw_handler_def at76_handler_def = {
@@ -3805,21 +3732,8 @@ static void at76_dwork_get_scan(struct work_struct *work)
at76_dump_bss_table(priv);
switch (priv->scan_runs) {
- case 1:
- WARN_ON(!priv->international_roaming);
- ret = at76_start_scan(priv, 0, 0);
- if (ret < 0)
- err("%s: %s: start_scan (IR) failed with %d",
- priv->netdev->name, __func__, ret);
- at76_dbg(DBG_MGMT_TIMER,
- "%s:%d: starting mgmt_timer for %d ticks",
- __func__, __LINE__, SCAN_POLL_INTERVAL);
- schedule_delayed_work(&priv->dwork_get_scan,
- SCAN_POLL_INTERVAL);
- break;
-
case 2:
- ret = at76_start_scan(priv, 0, 1);
+ ret = at76_start_scan(priv, 0);
if (ret < 0)
err("%s: %s: start_scan (ANY) failed with %d",
priv->netdev->name, __func__, ret);
@@ -3997,12 +3911,11 @@ static int at76_startup_device(struct at76_priv *priv)
TX_RATE_AUTO ? "auto" : "<invalid>", priv->auth_mode);
at76_dbg(DBG_PARAMS,
"%s param: pm_mode %d pm_period %d auth_mode %s "
- "scan_times %d %d scan_mode %s international_roaming %d",
+ "scan_times %d %d scan_mode %s",
priv->netdev->name, priv->pm_mode, priv->pm_period,
priv->auth_mode == WLAN_AUTH_OPEN ? "open" : "shared_secret",
priv->scan_min_time, priv->scan_max_time,
- priv->scan_mode == SCAN_TYPE_ACTIVE ? "active" : "passive",
- priv->international_roaming);
+ priv->scan_mode == SCAN_TYPE_ACTIVE ? "active" : "passive");
memset(ccfg, 0, sizeof(struct at76_card_config));
ccfg->promiscuous_mode = 0;
@@ -4075,10 +3988,6 @@ static int at76_startup_device(struct at76_priv *priv)
if (ret < 0)
return ret;
- ret = at76_set_iroaming(priv, priv->international_roaming);
- if (ret < 0)
- return ret;
-
at76_set_monitor_mode(priv);
if (at76_debug & DBG_MIB) {
@@ -4132,11 +4041,11 @@ static void at76_work_start_scan(struct work_struct *work)
* otherwise simply rely on at76_bss_list_timeout */
if (priv->scan_state == SCAN_IN_PROGRESS) {
at76_free_bss_list(priv);
- priv->scan_runs = priv->international_roaming ? 1 : 2;
+ priv->scan_runs = 2;
} else
priv->scan_runs = 3;
- ret = at76_start_scan(priv, 1, 1);
+ ret = at76_start_scan(priv, 1);
if (ret < 0)
err("%s: %s: start_scan failed with %d",
@@ -5364,8 +5273,6 @@ static int at76_init_new_device(struct at76_priv *priv,
/* init. netdev->dev_addr */
memcpy(netdev->dev_addr, priv->mac_addr, ETH_ALEN);
- /* initializing */
- priv->international_roaming = IR_OFF;
priv->channel = DEF_CHANNEL;
priv->iw_mode = IW_MODE_INFRA;
memset(priv->essid, 0, IW_ESSID_MAX_SIZE);
diff --git a/drivers/net/wireless/at76_usb.h b/drivers/net/wireless/at76_usb.h
index 65f56c7..c8cff99 100644
--- a/drivers/net/wireless/at76_usb.h
+++ b/drivers/net/wireless/at76_usb.h
@@ -55,9 +55,6 @@ enum board_type {
/* scan mode (0 - active, 1 - passive) */
#define AT76_SET_SCAN_MODE (SIOCIWFIRSTPRIV + 8)
#define AT76_GET_SCAN_MODE (SIOCIWFIRSTPRIV + 9)
-/* international roaming (0 - disabled, 1 - enabled */
-#define AT76_SET_INTL_ROAMING (SIOCIWFIRSTPRIV + 10)
-#define AT76_GET_INTL_ROAMING (SIOCIWFIRSTPRIV + 11)
#define CMD_STATUS_IDLE 0x00
#define CMD_STATUS_COMPLETE 0x01
@@ -114,10 +111,6 @@ enum board_type {
#define AT76_PM_ON 2
#define AT76_PM_SMART 3
-/* international roaming state */
-#define IR_OFF 0
-#define IR_ON 1
-
struct hwcfg_r505 {
u8 cr39_values[14];
u8 reserved1[14];
@@ -535,7 +528,6 @@ struct at76_priv {
u32 pm_period; /* power management period in microseconds */
struct reg_domain const *domain; /* reg domain description */
- int international_roaming;
/* iwspy support */
spinlock_t spy_spinlock;
next prev parent reply other threads:[~2007-09-01 4:37 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-01 4:34 [PATCH 00/35] Update at76_usb to the start of mac80211 port Pavel Roskin
2007-09-01 4:34 ` [PATCH 01/35] Protect at76_get_op_mode() and at76_get_mib() against short reads Pavel Roskin
2007-09-01 4:34 ` [PATCH 02/35] Use existing macros to find bulk in and bulk out endpoints Pavel Roskin
2007-09-01 4:34 ` [PATCH 03/35] Rewrite at76_alloc_urbs() in a more linear fashion Pavel Roskin
2007-09-01 4:34 ` [PATCH 04/35] Avoid overuse of NULL Pavel Roskin
2007-09-01 4:34 ` [PATCH 05/35] Add myself to the author list Pavel Roskin
2007-09-01 4:34 ` [PATCH 06/35] Move (de)initialization functions closer to the end of file Pavel Roskin
2007-09-01 4:34 ` [PATCH 07/35] Don't use shift on numeric constants in usb_control_msg() arguments Pavel Roskin
2007-09-01 4:35 ` [PATCH 08/35] Merge at76_download_external_fw() into at76_load_external_fw() Pavel Roskin
2007-09-01 4:35 ` [PATCH 09/35] Simplify at76_usbdfu_download() Pavel Roskin
2007-09-01 4:35 ` [PATCH 10/35] Add minimal support to 505AMX Pavel Roskin
2007-09-01 4:35 ` [PATCH 11/35] Simplify logic in at76_get_reg_domain() Pavel Roskin
2007-09-01 4:35 ` [PATCH 12/35] Fix hex2str() and mac2str() to avoid buffer overlap Pavel Roskin
2007-09-01 4:35 ` [PATCH 13/35] Rename some long functions and fields Pavel Roskin
2007-09-01 4:35 ` [PATCH 14/35] Fix incorrect queue management in at76_tx_mgmt() Pavel Roskin
2007-09-01 4:35 ` [PATCH 15/35] Introduce at76_quiesce(), use it to stop network activity Pavel Roskin
2007-09-01 4:35 ` [PATCH 16/35] Don't disable and enable tasklets, it doesn't work as expected Pavel Roskin
2007-09-01 4:35 ` [PATCH 17/35] Start beacon timeout task when connected Pavel Roskin
2007-09-01 4:35 ` [PATCH 18/35] Only cancel correct timeouts for Auth and Assoc replies Pavel Roskin
2007-09-01 9:17 ` Johannes Berg
2007-09-01 10:54 ` Pavel Roskin
2007-09-01 11:04 ` Johannes Berg
2007-09-01 13:16 ` John W. Linville
2007-09-01 20:09 ` Pavel Roskin
2007-09-01 4:36 ` [PATCH 19/35] Improve output of the regdomain id Pavel Roskin
2007-09-01 4:36 ` [PATCH 20/35] Protect at76_iw_handler_set_scan() with mutex Pavel Roskin
2007-09-01 4:36 ` [PATCH 21/35] Eliminate vendor IDs Pavel Roskin
2007-09-01 4:36 ` [PATCH 22/35] Only retry resubmitting rx_urb once Pavel Roskin
2007-09-01 4:36 ` [PATCH 23/35] Simplify at76_get_mib_mdomain() Pavel Roskin
2007-09-01 4:36 ` [PATCH 24/35] Do implicit scanning only with current ESSID Pavel Roskin
2007-09-01 4:36 ` [PATCH 25/35] Don't dump mib_mdomain while scanning, it's done on device startup Pavel Roskin
2007-09-01 4:36 ` [PATCH 26/35] Improve dump of MAC_ADDR Pavel Roskin
2007-09-01 4:36 ` [PATCH 27/35] Remove unneeded braces, found by checkpatch.pl Pavel Roskin
2007-09-01 4:36 ` [PATCH 28/35] Convert dbg() to at76_dbg() or remove it Pavel Roskin
2007-09-01 4:37 ` [PATCH 29/35] Eliminate at76_dbg_dumpbuf() in favor of hex2str() Pavel Roskin
2007-09-01 4:37 ` [PATCH 30/35] Eliminate pr_debug() in favor of at76_dbg() Pavel Roskin
2007-09-01 4:37 ` [PATCH 31/35] Simplify logic in at76_is_hidden_ssid() Pavel Roskin
2007-09-01 4:37 ` [PATCH 32/35] Massive cleanup of dump functions Pavel Roskin
2007-09-01 4:37 ` Pavel Roskin [this message]
2007-09-01 4:37 ` [PATCH 34/35] Don't do additional MIB dumps if DEBUG is defined Pavel Roskin
2007-09-01 4:37 ` [PATCH 35/35] Replace scan_runs with scan_need_any Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070901043723.2498.17595.stgit@dv.roinet.com \
--to=proski@gnu.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).