[PATCH] libertas: reduce SSID and BSSID mixed-case abuse
Kill mixed case function names from scan.c/scan.h. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
8cf1dc098f
commit
717c933920
5 changed files with 27 additions and 27 deletions
|
@ -58,11 +58,11 @@ static int assoc_helper_essid(wlan_private *priv,
|
|||
escape_essid(assoc_req->ssid, assoc_req->ssid_len));
|
||||
if (assoc_req->mode == IW_MODE_INFRA) {
|
||||
if (adapter->prescan) {
|
||||
libertas_send_specific_SSID_scan(priv, assoc_req->ssid,
|
||||
libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
|
||||
assoc_req->ssid_len, 0);
|
||||
}
|
||||
|
||||
bss = libertas_find_SSID_in_list(adapter, assoc_req->ssid,
|
||||
bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
|
||||
assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel);
|
||||
if (bss != NULL) {
|
||||
lbs_deb_assoc("SSID found in scan list, associating\n");
|
||||
|
@ -75,11 +75,11 @@ static int assoc_helper_essid(wlan_private *priv,
|
|||
/* Scan for the network, do not save previous results. Stale
|
||||
* scan data will cause us to join a non-existant adhoc network
|
||||
*/
|
||||
libertas_send_specific_SSID_scan(priv, assoc_req->ssid,
|
||||
libertas_send_specific_ssid_scan(priv, assoc_req->ssid,
|
||||
assoc_req->ssid_len, 1);
|
||||
|
||||
/* Search for the requested SSID in the scan table */
|
||||
bss = libertas_find_SSID_in_list(adapter, assoc_req->ssid,
|
||||
bss = libertas_find_ssid_in_list(adapter, assoc_req->ssid,
|
||||
assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel);
|
||||
if (bss != NULL) {
|
||||
lbs_deb_assoc("SSID found, will join\n");
|
||||
|
@ -111,7 +111,7 @@ static int assoc_helper_bssid(wlan_private *priv,
|
|||
MAC_ARG(assoc_req->bssid));
|
||||
|
||||
/* Search for index position in list for requested MAC */
|
||||
bss = libertas_find_BSSID_in_list(adapter, assoc_req->bssid,
|
||||
bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid,
|
||||
assoc_req->mode);
|
||||
if (bss == NULL) {
|
||||
lbs_deb_assoc("ASSOC: WAP: BSSID " MAC_FMT " not found, "
|
||||
|
@ -419,7 +419,7 @@ static int should_stop_adhoc(wlan_adapter *adapter,
|
|||
if (adapter->connect_status != libertas_connected)
|
||||
return 0;
|
||||
|
||||
if (libertas_SSID_cmp(adapter->curbssparams.ssid,
|
||||
if (libertas_ssid_cmp(adapter->curbssparams.ssid,
|
||||
adapter->curbssparams.ssid_len,
|
||||
assoc_req->ssid, assoc_req->ssid_len) != 0)
|
||||
return 1;
|
||||
|
@ -475,7 +475,7 @@ void libertas_association_worker(struct work_struct *work)
|
|||
if (find_any_ssid) {
|
||||
u8 new_mode;
|
||||
|
||||
ret = libertas_find_best_network_SSID(priv, assoc_req->ssid,
|
||||
ret = libertas_find_best_network_ssid(priv, assoc_req->ssid,
|
||||
&assoc_req->ssid_len, assoc_req->mode, &new_mode);
|
||||
if (ret) {
|
||||
lbs_deb_assoc("Could not find best network\n");
|
||||
|
|
|
@ -185,7 +185,7 @@ static ssize_t libertas_extscan(struct file *file, const char __user *userbuf,
|
|||
goto out_unlock;
|
||||
}
|
||||
|
||||
libertas_send_specific_SSID_scan(priv, buf, strlen(buf)-1, 0);
|
||||
libertas_send_specific_ssid_scan(priv, buf, strlen(buf)-1, 0);
|
||||
|
||||
memset(&wrqu, 0, sizeof(union iwreq_data));
|
||||
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
|
||||
|
|
|
@ -195,7 +195,7 @@ int libertas_join_adhoc_network(wlan_private * priv, struct assoc_request * asso
|
|||
|
||||
/* check if the requested SSID is already joined */
|
||||
if (adapter->curbssparams.ssid_len
|
||||
&& !libertas_SSID_cmp(adapter->curbssparams.ssid,
|
||||
&& !libertas_ssid_cmp(adapter->curbssparams.ssid,
|
||||
adapter->curbssparams.ssid_len,
|
||||
bss->ssid, bss->ssid_len)
|
||||
&& (adapter->mode == IW_MODE_ADHOC)) {
|
||||
|
|
|
@ -1197,7 +1197,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
|
|||
*
|
||||
* @return 0--ssid is same, otherwise is different
|
||||
*/
|
||||
int libertas_SSID_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
|
||||
int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
|
||||
{
|
||||
if (ssid1_len != ssid2_len)
|
||||
return -1;
|
||||
|
@ -1214,7 +1214,7 @@ int libertas_SSID_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len)
|
|||
*
|
||||
* @return index in BSSID list, or error return code (< 0)
|
||||
*/
|
||||
struct bss_descriptor * libertas_find_BSSID_in_list(wlan_adapter * adapter,
|
||||
struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
|
||||
u8 * bssid, u8 mode)
|
||||
{
|
||||
struct bss_descriptor * iter_bss;
|
||||
|
@ -1261,7 +1261,7 @@ struct bss_descriptor * libertas_find_BSSID_in_list(wlan_adapter * adapter,
|
|||
*
|
||||
* @return index in BSSID list
|
||||
*/
|
||||
struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
|
||||
struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
|
||||
u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
|
||||
int channel)
|
||||
{
|
||||
|
@ -1277,7 +1277,7 @@ struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
|
|||
|| (iter_bss->last_scanned < tmp_oldest->last_scanned))
|
||||
tmp_oldest = iter_bss;
|
||||
|
||||
if (libertas_SSID_cmp(iter_bss->ssid, iter_bss->ssid_len,
|
||||
if (libertas_ssid_cmp(iter_bss->ssid, iter_bss->ssid_len,
|
||||
ssid, ssid_len) != 0)
|
||||
continue; /* ssid doesn't match */
|
||||
if (bssid && compare_ether_addr(iter_bss->bssid, bssid) != 0)
|
||||
|
@ -1327,7 +1327,7 @@ struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
|
|||
*
|
||||
* @return index in BSSID list
|
||||
*/
|
||||
struct bss_descriptor * libertas_find_best_SSID_in_list(wlan_adapter * adapter,
|
||||
struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter,
|
||||
u8 mode)
|
||||
{
|
||||
u8 bestrssi = 0;
|
||||
|
@ -1369,7 +1369,7 @@ struct bss_descriptor * libertas_find_best_SSID_in_list(wlan_adapter * adapter,
|
|||
*
|
||||
* @return 0--success, otherwise--fail
|
||||
*/
|
||||
int libertas_find_best_network_SSID(wlan_private * priv,
|
||||
int libertas_find_best_network_ssid(wlan_private * priv,
|
||||
u8 *out_ssid, u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode)
|
||||
{
|
||||
wlan_adapter *adapter = priv->adapter;
|
||||
|
@ -1384,7 +1384,7 @@ int libertas_find_best_network_SSID(wlan_private * priv,
|
|||
|
||||
wait_event_interruptible(adapter->cmd_pending, !adapter->nr_cmd_pending);
|
||||
|
||||
found = libertas_find_best_SSID_in_list(adapter, preferred_mode);
|
||||
found = libertas_find_best_ssid_in_list(adapter, preferred_mode);
|
||||
if (found && (found->ssid_len > 0)) {
|
||||
memcpy(out_ssid, &found->ssid, IW_ESSID_MAX_SIZE);
|
||||
*out_ssid_len = found->ssid_len;
|
||||
|
@ -1432,7 +1432,7 @@ int libertas_set_scan(struct net_device *dev, struct iw_request_info *info,
|
|||
*
|
||||
* @return 0-success, otherwise fail
|
||||
*/
|
||||
int libertas_send_specific_SSID_scan(wlan_private * priv,
|
||||
int libertas_send_specific_ssid_scan(wlan_private * priv,
|
||||
u8 *ssid, u8 ssid_len, u8 clear_ssid)
|
||||
{
|
||||
wlan_adapter *adapter = priv->adapter;
|
||||
|
@ -1468,7 +1468,7 @@ int libertas_send_specific_SSID_scan(wlan_private * priv,
|
|||
*
|
||||
* @return 0-success, otherwise fail
|
||||
*/
|
||||
int libertas_send_specific_BSSID_scan(wlan_private * priv, u8 * bssid, u8 clear_bssid)
|
||||
int libertas_send_specific_bssid_scan(wlan_private * priv, u8 * bssid, u8 clear_bssid)
|
||||
{
|
||||
struct wlan_ioctl_user_scan_cfg scancfg;
|
||||
|
||||
|
@ -1561,7 +1561,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
|
|||
*/
|
||||
if ((adapter->mode == IW_MODE_ADHOC)
|
||||
&& adapter->adhoccreate
|
||||
&& !libertas_SSID_cmp(adapter->curbssparams.ssid,
|
||||
&& !libertas_ssid_cmp(adapter->curbssparams.ssid,
|
||||
adapter->curbssparams.ssid_len,
|
||||
bss->ssid, bss->ssid_len)) {
|
||||
int snr, nf;
|
||||
|
@ -1598,7 +1598,7 @@ static inline char *libertas_translate_scan(wlan_private *priv,
|
|||
stop, &iwe, IW_EV_PARAM_LEN);
|
||||
}
|
||||
if ((bss->mode == IW_MODE_ADHOC)
|
||||
&& !libertas_SSID_cmp(adapter->curbssparams.ssid,
|
||||
&& !libertas_ssid_cmp(adapter->curbssparams.ssid,
|
||||
adapter->curbssparams.ssid_len,
|
||||
bss->ssid, bss->ssid_len)
|
||||
&& adapter->adhoccreate) {
|
||||
|
|
|
@ -175,24 +175,24 @@ struct bss_descriptor {
|
|||
struct list_head list;
|
||||
};
|
||||
|
||||
extern int libertas_SSID_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
|
||||
extern int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
|
||||
|
||||
struct bss_descriptor * libertas_find_SSID_in_list(wlan_adapter * adapter,
|
||||
struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
|
||||
u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
|
||||
int channel);
|
||||
|
||||
struct bss_descriptor * libertas_find_best_SSID_in_list(wlan_adapter * adapter,
|
||||
struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter,
|
||||
u8 mode);
|
||||
|
||||
extern struct bss_descriptor * libertas_find_BSSID_in_list(wlan_adapter * adapter,
|
||||
extern struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
|
||||
u8 * bssid, u8 mode);
|
||||
|
||||
int libertas_find_best_network_SSID(wlan_private * priv, u8 *out_ssid,
|
||||
int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid,
|
||||
u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
|
||||
|
||||
extern int libertas_send_specific_SSID_scan(wlan_private * priv, u8 *ssid,
|
||||
extern int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid,
|
||||
u8 ssid_len, u8 clear_ssid);
|
||||
extern int libertas_send_specific_BSSID_scan(wlan_private * priv,
|
||||
extern int libertas_send_specific_bssid_scan(wlan_private * priv,
|
||||
u8 * bssid, u8 clear_bssid);
|
||||
|
||||
extern int libertas_cmd_80211_scan(wlan_private * priv,
|
||||
|
|
Loading…
Reference in a new issue