Commit dd1d12da authored by Holger Schurig's avatar Holger Schurig Committed by David S. Miller

libertas: remove numprobes

Remove the ability to specify number of probes via debugfs
Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 01affb65
...@@ -201,15 +201,14 @@ setuserscan ...@@ -201,15 +201,14 @@ setuserscan
ssid="[SSID]" specify a SSID filter for the scan ssid="[SSID]" specify a SSID filter for the scan
keep=[0 or 1] keep the previous scan results (1), discard (0) keep=[0 or 1] keep the previous scan results (1), discard (0)
dur=[scan time] time to scan for each channel in milliseconds dur=[scan time] time to scan for each channel in milliseconds
probes=[#] number of probe requests to send on each chan
type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any) type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
Any combination of the above arguments can be supplied on the command line. Any combination of the above arguments can be supplied on the command
If the chan token is absent, a full channel scan will be completed by line. If the chan token is absent, a full channel scan will be
the driver. If the dur or probes tokens are absent, the driver default completed by the driver. If dur tokens are absent, the driver default
setting will be used. The bssid and ssid fields, if blank, setting will be used. The bssid and ssid fields, if blank, will
will produce an unfiltered scan. The type field will default to 3 (Any) produce an unfiltered scan. The type field will default to 3 (Any) and
and the keep field will default to 0 (Discard). the keep field will default to 0 (Discard).
Examples: Examples:
1) Perform an active scan on channels 1, 6, and 11 in the 'g' band: 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
...@@ -230,10 +229,10 @@ setuserscan ...@@ -230,10 +229,10 @@ setuserscan
the current scan table intact, update existing or append new scan data: the current scan table intact, update existing or append new scan data:
echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
6) Scan channel 6, for all infrastructure networks, sending two probe 6) Scan channel 6, for all infrastructure networks.
requests. Keep the previous scan table intact. Update any duplicate Keep the previous scan table intact. Update any duplicate BSSID/SSID
BSSID/SSID matches with the new scan data: matches with the new scan data:
echo "chan=6g type=1 probes=2 keep=1" > setuserscan echo "chan=6g type=1 keep=1" > setuserscan
All entries in the scan table (not just the new scan data when keep=1) All entries in the scan table (not just the new scan data when keep=1)
will be displayed upon completion by use of the getscantable ioctl. will be displayed upon completion by use of the getscantable ioctl.
......
...@@ -300,23 +300,6 @@ static int lbs_parse_dur(char *buf, size_t count, ...@@ -300,23 +300,6 @@ static int lbs_parse_dur(char *buf, size_t count,
return val; return val;
} }
static void lbs_parse_probes(char *buf, size_t count,
struct lbs_ioctl_user_scan_cfg *scan_cfg)
{
char *hold;
int val;
hold = strstr(buf, "probes=");
if (!hold)
return;
hold += 7;
sscanf(hold, "%d", &val);
scan_cfg->numprobes = val;
return;
}
static void lbs_parse_type(char *buf, size_t count, static void lbs_parse_type(char *buf, size_t count,
struct lbs_ioctl_user_scan_cfg *scan_cfg) struct lbs_ioctl_user_scan_cfg *scan_cfg)
{ {
...@@ -368,7 +351,6 @@ static ssize_t lbs_setuserscan(struct file *file, ...@@ -368,7 +351,6 @@ static ssize_t lbs_setuserscan(struct file *file,
scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid="); scan_cfg->clear_bssid = lbs_parse_clear(buf, count, "clear_bssid=");
lbs_parse_ssid(buf, count, scan_cfg); lbs_parse_ssid(buf, count, scan_cfg);
scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid="); scan_cfg->clear_ssid = lbs_parse_clear(buf, count, "clear_ssid=");
lbs_parse_probes(buf, count, scan_cfg);
lbs_parse_type(buf, count, scan_cfg); lbs_parse_type(buf, count, scan_cfg);
lbs_scan_networks(priv, scan_cfg, 1); lbs_scan_networks(priv, scan_cfg, 1);
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
//! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max //! Maximum memory needed for a lbs_scan_cmd_config with all TLVs at max
#define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \ #define MAX_SCAN_CFG_ALLOC (sizeof(struct lbs_scan_cmd_config) \
+ sizeof(struct mrvlietypes_numprobes) \
+ CHAN_TLV_MAX_SIZE \ + CHAN_TLV_MAX_SIZE \
+ SSID_TLV_MAX_SIZE) + SSID_TLV_MAX_SIZE)
...@@ -385,7 +384,6 @@ void lbs_scan_worker(struct work_struct *work) ...@@ -385,7 +384,6 @@ void lbs_scan_worker(struct work_struct *work)
* - channel list * - channel list
* *
* If the SSID or BSSID filter is not present, disable/clear the filter. * If the SSID or BSSID filter is not present, disable/clear the filter.
* If the number of probes is not set, use the adapter default setting
* Qualify the channel * Qualify the channel
* *
* @param priv A pointer to struct lbs_private structure * @param priv A pointer to struct lbs_private structure
...@@ -415,11 +413,9 @@ lbs_scan_setup_scan_config(struct lbs_private *priv, ...@@ -415,11 +413,9 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
u8 * pfilteredscan, u8 * pfilteredscan,
u8 * pscancurrentonly) u8 * pscancurrentonly)
{ {
struct mrvlietypes_numprobes *pnumprobestlv;
struct mrvlietypes_ssidparamset *pssidtlv; struct mrvlietypes_ssidparamset *pssidtlv;
struct lbs_scan_cmd_config *pscancfgout = NULL; struct lbs_scan_cmd_config *pscancfgout = NULL;
u8 *ptlvpos; u8 *ptlvpos;
u16 numprobes;
int chanidx; int chanidx;
int scantype; int scantype;
int scandur; int scandur;
...@@ -468,9 +464,6 @@ lbs_scan_setup_scan_config(struct lbs_private *priv, ...@@ -468,9 +464,6 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
pscancfgout->bsstype = pscancfgout->bsstype =
puserscanin->bsstype ? puserscanin->bsstype : CMD_BSS_TYPE_ANY; puserscanin->bsstype ? puserscanin->bsstype : CMD_BSS_TYPE_ANY;
/* Set the number of probes to send, use adapter setting if unset */
numprobes = puserscanin->numprobes ? puserscanin->numprobes : 0;
/* /*
* Set the BSSID filter to the incoming configuration, * Set the BSSID filter to the incoming configuration,
* if non-zero. If not set, it will remain disabled (all zeros). * if non-zero. If not set, it will remain disabled (all zeros).
...@@ -502,22 +495,11 @@ lbs_scan_setup_scan_config(struct lbs_private *priv, ...@@ -502,22 +495,11 @@ lbs_scan_setup_scan_config(struct lbs_private *priv,
} }
} else { } else {
pscancfgout->bsstype = CMD_BSS_TYPE_ANY; pscancfgout->bsstype = CMD_BSS_TYPE_ANY;
numprobes = 0;
}
/* If the input config or adapter has the number of Probes set, add tlv */
if (numprobes) {
pnumprobestlv = (struct mrvlietypes_numprobes *) ptlvpos;
pnumprobestlv->header.type = cpu_to_le16(TLV_TYPE_NUMPROBES);
pnumprobestlv->header.len = cpu_to_le16(2);
pnumprobestlv->numprobes = cpu_to_le16(numprobes);
ptlvpos += sizeof(*pnumprobestlv);
} }
/* /*
* Set the output for the channel TLV to the address in the tlv buffer * Set the output for the channel TLV to the address in the tlv buffer
* past any TLVs that were added in this fuction (SSID, numprobes). * past any TLVs that were added in this fuction (SSID).
* channel TLVs will be added past this for each scan command, preserving * channel TLVs will be added past this for each scan command, preserving
* the TLVs that were previously added. * the TLVs that were previously added.
*/ */
......
...@@ -105,11 +105,6 @@ struct lbs_ioctl_user_scan_cfg { ...@@ -105,11 +105,6 @@ struct lbs_ioctl_user_scan_cfg {
*/ */
u8 bsstype; u8 bsstype;
/**
* @brief Configure the number of probe requests for active chan scans
*/
u8 numprobes;
/** /**
* @brief BSSID filter sent in the firmware command to limit the results * @brief BSSID filter sent in the firmware command to limit the results
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment