Commit 8dd82ebe authored by Edgardo Hames's avatar Edgardo Hames Committed by Greg Kroah-Hartman

Staging: wlan-ng: fix style in cfg80211.c

Fixed several errors reported by checkpatch.
Signed-off-by: default avatarEdgardo Hames <ehames@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 09d14856
...@@ -79,7 +79,7 @@ static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data) ...@@ -79,7 +79,7 @@ static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data)
mibitem->did = did; mibitem->did = did;
mibitem->data = data; mibitem->data = data;
return p80211req_dorequest(wlandev, (u8 *) & msg); return p80211req_dorequest(wlandev, (u8 *) &msg);
} }
static int prism2_domibset_pstr32(wlandevice_t *wlandev, static int prism2_domibset_pstr32(wlandevice_t *wlandev,
...@@ -93,7 +93,7 @@ static int prism2_domibset_pstr32(wlandevice_t *wlandev, ...@@ -93,7 +93,7 @@ static int prism2_domibset_pstr32(wlandevice_t *wlandev,
mibitem->data.len = len; mibitem->data.len = len;
memcpy(mibitem->data.data, data, len); memcpy(mibitem->data.data, data, len);
return p80211req_dorequest(wlandev, (u8 *) & msg); return p80211req_dorequest(wlandev, (u8 *) &msg);
} }
...@@ -110,12 +110,14 @@ int prism2_change_virtual_intf(struct wiphy *wiphy, ...@@ -110,12 +110,14 @@ int prism2_change_virtual_intf(struct wiphy *wiphy,
switch (type) { switch (type) {
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
if (wlandev->macmode == WLAN_MACMODE_IBSS_STA) goto exit; if (wlandev->macmode == WLAN_MACMODE_IBSS_STA)
goto exit;
wlandev->macmode = WLAN_MACMODE_IBSS_STA; wlandev->macmode = WLAN_MACMODE_IBSS_STA;
data = 0; data = 0;
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
if (wlandev->macmode == WLAN_MACMODE_ESS_STA) goto exit; if (wlandev->macmode == WLAN_MACMODE_ESS_STA)
goto exit;
wlandev->macmode = WLAN_MACMODE_ESS_STA; wlandev->macmode = WLAN_MACMODE_ESS_STA;
data = 1; data = 1;
break; break;
...@@ -138,7 +140,8 @@ int prism2_change_virtual_intf(struct wiphy *wiphy, ...@@ -138,7 +140,8 @@ int prism2_change_virtual_intf(struct wiphy *wiphy,
int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_index, const u8 *mac_addr, u8 key_index, const u8 *mac_addr,
struct key_params *params) { struct key_params *params)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
u32 did; u32 did;
...@@ -151,28 +154,25 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -151,28 +154,25 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
result = prism2_domibset_uint32(wlandev, result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
key_index); key_index);
if (result) goto exit; if (result)
goto exit;
/* send key to driver */ /* send key to driver */
switch (key_index) { switch (key_index) {
case 0: case 0:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
break; break;
case 1: case 1:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
break; break;
case 2: case 2:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
break; break;
case 3: case 3:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
break; break;
default: default:
...@@ -181,7 +181,8 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -181,7 +181,8 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
} }
result = prism2_domibset_pstr32(wlandev, did, params->key_len, params->key); result = prism2_domibset_pstr32(wlandev, did, params->key_len, params->key);
if (result) goto exit; if (result)
goto exit;
break; break;
default: default:
...@@ -190,37 +191,43 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -190,37 +191,43 @@ int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
} }
exit: exit:
if (result) err = -EFAULT; if (result)
err = -EFAULT;
return err; return err;
} }
int prism2_get_key(struct wiphy *wiphy, struct net_device *dev, int prism2_get_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_index, const u8 *mac_addr, void *cookie, u8 key_index, const u8 *mac_addr, void *cookie,
void (*callback)(void *cookie, struct key_params*)) { void (*callback)(void *cookie, struct key_params*))
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
struct key_params params; struct key_params params;
int len; int len;
if(key_index >= NUM_WEPKEYS) return -EINVAL; if (key_index >= NUM_WEPKEYS)
return -EINVAL;
len = wlandev->wep_keylens[key_index]; len = wlandev->wep_keylens[key_index];
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
if (len == 13) { if (len == 13)
params.cipher = WLAN_CIPHER_SUITE_WEP104; params.cipher = WLAN_CIPHER_SUITE_WEP104;
} else if (len == 5) { else if (len == 5)
params.cipher = WLAN_CIPHER_SUITE_WEP104; params.cipher = WLAN_CIPHER_SUITE_WEP104;
} else return -ENOENT; else
return -ENOENT;
params.key_len = len; params.key_len = len;
params.key = wlandev->wep_keys[key_index]; params.key = wlandev->wep_keys[key_index];
callback(cookie, &params); callback(cookie, &params);
return 0; return 0;
} }
int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, int prism2_del_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_index, const u8 *mac_addr) { u8 key_index, const u8 *mac_addr)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
u32 did; u32 did;
int err = 0; int err = 0;
...@@ -258,13 +265,15 @@ int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -258,13 +265,15 @@ int prism2_del_key(struct wiphy *wiphy, struct net_device *dev,
result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000"); result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000");
exit: exit:
if (result) err = -EFAULT; if (result)
err = -EFAULT;
return err; return err;
} }
int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_index) { u8 key_index)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
int err = 0; int err = 0;
...@@ -274,14 +283,16 @@ int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, ...@@ -274,14 +283,16 @@ int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
key_index); key_index);
if (result) err = -EFAULT; if (result)
err = -EFAULT;
return err; return err;
} }
int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_info *sinfo) { u8 *mac, struct station_info *sinfo)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
p80211msg_lnxreq_commsquality_t quality; p80211msg_lnxreq_commsquality_t quality;
int result; int result;
...@@ -300,7 +311,7 @@ int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -300,7 +311,7 @@ int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
if (wlandev->mlmerequest == NULL) if (wlandev->mlmerequest == NULL)
return -EOPNOTSUPP; return -EOPNOTSUPP;
result = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality); result = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality);
if (result == 0) { if (result == 0) {
...@@ -401,9 +412,8 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, ...@@ -401,9 +412,8 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev,
); );
} }
if (result) { if (result)
err = prism2_result2err(msg2.resultcode.data); err = prism2_result2err(msg2.resultcode.data);
}
exit: exit:
cfg80211_scan_done(request, err ? 1 : 0); cfg80211_scan_done(request, err ? 1 : 0);
...@@ -411,7 +421,8 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev, ...@@ -411,7 +421,8 @@ int prism2_scan(struct wiphy *wiphy, struct net_device *dev,
return err; return err;
} }
int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) { int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
struct prism2_wiphy_private *priv = wiphy_priv(wiphy); struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
wlandevice_t *wlandev = priv->wlandev; wlandevice_t *wlandev = priv->wlandev;
u32 data; u32 data;
...@@ -424,8 +435,7 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) { ...@@ -424,8 +435,7 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) {
else else
data = wiphy->rts_threshold; data = wiphy->rts_threshold;
result = result = prism2_domibset_uint32(wlandev,
prism2_domibset_uint32(wlandev,
DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold, DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold,
data); data);
if (result) { if (result) {
...@@ -435,14 +445,12 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) { ...@@ -435,14 +445,12 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) {
} }
if (changed & WIPHY_PARAM_FRAG_THRESHOLD) { if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
if (wiphy->frag_threshold == -1) if (wiphy->frag_threshold == -1)
data = 2346; data = 2346;
else else
data = wiphy->frag_threshold; data = wiphy->frag_threshold;
result = result = prism2_domibset_uint32(wlandev,
prism2_domibset_uint32(wlandev,
DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold, DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold,
data); data);
if (result) { if (result) {
...@@ -456,7 +464,8 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) { ...@@ -456,7 +464,8 @@ int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) {
} }
int prism2_connect(struct wiphy *wiphy, struct net_device *dev, int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme) { struct cfg80211_connect_params *sme)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
struct ieee80211_channel *channel = sme->channel; struct ieee80211_channel *channel = sme->channel;
p80211msg_lnxreq_autojoin_t msg_join; p80211msg_lnxreq_autojoin_t msg_join;
...@@ -471,13 +480,11 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -471,13 +480,11 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
/* Set the channel */ /* Set the channel */
if (channel) { if (channel) {
chan = ieee80211_frequency_to_channel(channel->center_freq); chan = ieee80211_frequency_to_channel(channel->center_freq);
result = prism2_domibset_uint32(wlandev,
result =
prism2_domibset_uint32(wlandev,
DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel, DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel,
chan); chan);
if (result)
if (result) goto exit; goto exit;
} }
/* Set the authorisation */ /* Set the authorisation */
...@@ -487,37 +494,36 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -487,37 +494,36 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
else if ((sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY) || else if ((sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY) ||
((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep)) ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
msg_join.authtype.data = P80211ENUM_authalg_sharedkey; msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
else printk(KERN_WARNING "Unhandled authorisation type for connect (%d)\n", sme->auth_type); else
printk(KERN_WARNING
"Unhandled authorisation type for connect (%d)\n",
sme->auth_type);
/* Set the encryption - we only support wep */ /* Set the encryption - we only support wep */
if (is_wep) { if (is_wep) {
if (sme->key) { if (sme->key) {
result = prism2_domibset_uint32(wlandev, result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID, DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
sme->key_idx); sme->key_idx);
if (result) goto exit; if (result)
goto exit;
/* send key to driver */ /* send key to driver */
switch (sme->key_idx) { switch (sme->key_idx) {
case 0: case 0:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
break; break;
case 1: case 1:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
break; break;
case 2: case 2:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
break; break;
case 3: case 3:
did = did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
break; break;
default: default:
...@@ -526,28 +532,40 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -526,28 +532,40 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
} }
result = prism2_domibset_pstr32(wlandev, did, sme->key_len, (u8 *) sme->key); result = prism2_domibset_pstr32(wlandev, did, sme->key_len, (u8 *) sme->key);
if (result) goto exit; if (result)
goto exit;
} }
/* Assume we should set privacy invoked and exclude unencrypted /* Assume we should set privacy invoked and exclude unencrypted
We could possibly use sme->privacy here, but the assumption We could possibly use sme->privacy here, but the assumption
seems reasonable anyway */ seems reasonable anyway */
result = prism2_domibset_uint32(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked,
P80211ENUM_truth_true); P80211ENUM_truth_true);
if (result) goto exit; if (result)
result = prism2_domibset_uint32(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, goto exit;
result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted,
P80211ENUM_truth_true); P80211ENUM_truth_true);
if (result) goto exit; if (result)
goto exit;
} else { } else {
/* Assume we should unset privacy invoked and exclude unencrypted */ /* Assume we should unset privacy invoked
result = prism2_domibset_uint32(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked, and exclude unencrypted */
result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked,
P80211ENUM_truth_false); P80211ENUM_truth_false);
if (result) goto exit; if (result)
result = prism2_domibset_uint32(wlandev, DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted, goto exit;
result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted,
P80211ENUM_truth_false); P80211ENUM_truth_false);
if (result) goto exit; if (result)
goto exit;
} }
...@@ -558,16 +576,18 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -558,16 +576,18 @@ int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
memcpy(msg_join.ssid.data.data, sme->ssid, length); memcpy(msg_join.ssid.data.data, sme->ssid, length);
msg_join.ssid.data.len = length; msg_join.ssid.data.len = length;
result = p80211req_dorequest(wlandev, (u8 *) & msg_join); result = p80211req_dorequest(wlandev, (u8 *) &msg_join);
exit: exit:
if (result) err = -EFAULT; if (result)
err = -EFAULT;
return err; return err;
} }
int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev, int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev,
u16 reason_code) { u16 reason_code)
{
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
p80211msg_lnxreq_autojoin_t msg_join; p80211msg_lnxreq_autojoin_t msg_join;
int result; int result;
...@@ -580,26 +600,30 @@ int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev, ...@@ -580,26 +600,30 @@ int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev,
memcpy(msg_join.ssid.data.data, "---", 3); memcpy(msg_join.ssid.data.data, "---", 3);
msg_join.ssid.data.len = 3; msg_join.ssid.data.len = 3;
result = p80211req_dorequest(wlandev, (u8 *) & msg_join); result = p80211req_dorequest(wlandev, (u8 *) &msg_join);
if (result) err = -EFAULT; if (result)
err = -EFAULT;
return err; return err;
} }
int prism2_join_ibss(struct wiphy *wiphy, struct net_device *dev, int prism2_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params) { struct cfg80211_ibss_params *params)
{
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev) { int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
{
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
int prism2_set_tx_power(struct wiphy *wiphy, int prism2_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type,
enum tx_power_setting type, int dbm) { int dbm)
{
struct prism2_wiphy_private *priv = wiphy_priv(wiphy); struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
wlandevice_t *wlandev = priv->wlandev; wlandevice_t *wlandev = priv->wlandev;
u32 data; u32 data;
...@@ -624,7 +648,8 @@ int prism2_set_tx_power(struct wiphy *wiphy, ...@@ -624,7 +648,8 @@ int prism2_set_tx_power(struct wiphy *wiphy,
return err; return err;
} }
int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) { int prism2_get_tx_power(struct wiphy *wiphy, int *dbm)
{
struct prism2_wiphy_private *priv = wiphy_priv(wiphy); struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
wlandevice_t *wlandev = priv->wlandev; wlandevice_t *wlandev = priv->wlandev;
p80211msg_dot11req_mibget_t msg; p80211msg_dot11req_mibget_t msg;
...@@ -636,7 +661,7 @@ int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) { ...@@ -636,7 +661,7 @@ int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) {
mibitem->did = mibitem->did =
DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
result = p80211req_dorequest(wlandev, (u8 *) & msg); result = p80211req_dorequest(wlandev, (u8 *) &msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -653,21 +678,22 @@ int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) { ...@@ -653,21 +678,22 @@ int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) {
/* Interface callback functions, passing data back up to the cfg80211 layer */ /* Interface callback functions, passing data back up to the cfg80211 layer */
void prism2_connect_result(wlandevice_t *wlandev, u8 failed) { void prism2_connect_result(wlandevice_t *wlandev, u8 failed)
{
u16 status = failed ? WLAN_STATUS_UNSPECIFIED_FAILURE : WLAN_STATUS_SUCCESS;
cfg80211_connect_result(wlandev->netdev, wlandev->bssid, cfg80211_connect_result(wlandev->netdev, wlandev->bssid,
NULL, 0, NULL, 0, NULL, 0, NULL, 0, status, GFP_KERNEL);
failed ? WLAN_STATUS_UNSPECIFIED_FAILURE : WLAN_STATUS_SUCCESS, GFP_KERNEL);
} }
void prism2_disconnected(wlandevice_t *wlandev) { void prism2_disconnected(wlandevice_t *wlandev)
{
cfg80211_disconnected(wlandev->netdev, 0, NULL, cfg80211_disconnected(wlandev->netdev, 0, NULL,
0, GFP_KERNEL); 0, GFP_KERNEL);
} }
void prism2_roamed(wlandevice_t *wlandev) { void prism2_roamed(wlandevice_t *wlandev)
{
cfg80211_roamed(wlandev->netdev, wlandev->bssid, cfg80211_roamed(wlandev->netdev, wlandev->bssid,
NULL, 0, NULL, 0, GFP_KERNEL); NULL, 0, NULL, 0, GFP_KERNEL);
} }
...@@ -714,9 +740,8 @@ struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev) ...@@ -714,9 +740,8 @@ struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev)
set_wiphy_dev(wiphy, dev); set_wiphy_dev(wiphy, dev);
wiphy->privid = prism2_wiphy_privid; wiphy->privid = prism2_wiphy_privid;
wiphy->max_scan_ssids = 1; wiphy->max_scan_ssids = 1;
wiphy->interface_modes = wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
BIT(NL80211_IFTYPE_STATION) | | BIT(NL80211_IFTYPE_ADHOC);
BIT(NL80211_IFTYPE_ADHOC);
wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
wiphy->n_cipher_suites = PRISM2_NUM_CIPHER_SUITES; wiphy->n_cipher_suites = PRISM2_NUM_CIPHER_SUITES;
wiphy->cipher_suites = prism2_cipher_suites; wiphy->cipher_suites = prism2_cipher_suites;
......
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