mirror of https://gitee.com/openkylin/linux.git
staging: wlan-ng: avoid new typedef: p80211pstrd_t
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstrd_t Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8c52425a13
commit
3fd1e3fcb9
|
@ -196,8 +196,8 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
|
||||||
int isget)
|
int isget)
|
||||||
{
|
{
|
||||||
p80211itemd_t *mibitem = (p80211itemd_t *)mib_msg->mibattribute.data;
|
p80211itemd_t *mibitem = (p80211itemd_t *)mib_msg->mibattribute.data;
|
||||||
p80211pstrd_t *pstr = (p80211pstrd_t *)mibitem->data;
|
struct p80211pstrd *pstr = (struct p80211pstrd *)mibitem->data;
|
||||||
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
|
u8 *key = mibitem->data + sizeof(struct p80211pstrd);
|
||||||
|
|
||||||
switch (mibitem->did) {
|
switch (mibitem->did) {
|
||||||
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
|
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
|
||||||
|
|
|
@ -219,10 +219,10 @@ struct p80211pstr {
|
||||||
u8 len;
|
u8 len;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
typedef struct p80211pstrd {
|
struct p80211pstrd {
|
||||||
u8 len;
|
u8 len;
|
||||||
u8 data[0];
|
u8 data[0];
|
||||||
} __packed p80211pstrd_t;
|
} __packed;
|
||||||
|
|
||||||
/* Maximum pascal string */
|
/* Maximum pascal string */
|
||||||
typedef struct p80211pstr255 {
|
typedef struct p80211pstr255 {
|
||||||
|
|
|
@ -531,7 +531,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp)
|
||||||
hfa384x_t *hw = wlandev->priv;
|
hfa384x_t *hw = wlandev->priv;
|
||||||
struct p80211msg_dot11req_start *msg = msgp;
|
struct p80211msg_dot11req_start *msg = msgp;
|
||||||
|
|
||||||
p80211pstrd_t *pstr;
|
struct p80211pstrd *pstr;
|
||||||
u8 bytebuf[80];
|
u8 bytebuf[80];
|
||||||
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
||||||
u16 word;
|
u16 word;
|
||||||
|
@ -558,7 +558,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp)
|
||||||
/*** STATION ***/
|
/*** STATION ***/
|
||||||
/* Set the REQUIRED config items */
|
/* Set the REQUIRED config items */
|
||||||
/* SSID */
|
/* SSID */
|
||||||
pstr = (p80211pstrd_t *)&(msg->ssid.data);
|
pstr = (struct p80211pstrd *)&(msg->ssid.data);
|
||||||
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
||||||
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
|
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
|
||||||
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
|
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
|
||||||
|
@ -1026,7 +1026,7 @@ int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp)
|
||||||
u16 reg;
|
u16 reg;
|
||||||
u16 port_type;
|
u16 port_type;
|
||||||
struct p80211msg_lnxreq_autojoin *msg = msgp;
|
struct p80211msg_lnxreq_autojoin *msg = msgp;
|
||||||
p80211pstrd_t *pstr;
|
struct p80211pstrd *pstr;
|
||||||
u8 bytebuf[256];
|
u8 bytebuf[256];
|
||||||
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp)
|
||||||
|
|
||||||
/* Set the ssid */
|
/* Set the ssid */
|
||||||
memset(bytebuf, 0, 256);
|
memset(bytebuf, 0, 256);
|
||||||
pstr = (p80211pstrd_t *)&(msg->ssid.data);
|
pstr = (struct p80211pstrd *)&(msg->ssid.data);
|
||||||
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
prism2mgmt_pstr2bytestr(p2bytestr, pstr);
|
||||||
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
|
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
|
||||||
bytebuf,
|
bytebuf,
|
||||||
|
|
|
@ -87,18 +87,18 @@ int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp);
|
||||||
* Prism2 data types
|
* Prism2 data types
|
||||||
---------------------------------------------------------------*/
|
---------------------------------------------------------------*/
|
||||||
/* byte area conversion functions*/
|
/* byte area conversion functions*/
|
||||||
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
|
void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len);
|
||||||
|
|
||||||
/* byte string conversion functions*/
|
/* byte string conversion functions*/
|
||||||
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr);
|
struct p80211pstrd *pstr);
|
||||||
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr);
|
struct p80211pstrd *pstr);
|
||||||
|
|
||||||
/* functions to convert Group Addresses */
|
/* functions to convert Group Addresses */
|
||||||
void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv);
|
void prism2mgmt_get_grpaddr(u32 did, struct p80211pstrd *pstr, hfa384x_t *priv);
|
||||||
int prism2mgmt_set_grpaddr(u32 did,
|
int prism2mgmt_set_grpaddr(u32 did,
|
||||||
u8 *prism2buf, p80211pstrd_t *pstr,
|
u8 *prism2buf, struct p80211pstrd *pstr,
|
||||||
hfa384x_t *priv);
|
hfa384x_t *priv);
|
||||||
int prism2mgmt_get_grpaddr_index(u32 did);
|
int prism2mgmt_get_grpaddr_index(u32 did);
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
p80211pstrd_t *pstr = data;
|
struct p80211pstrd *pstr = data;
|
||||||
u8 bytebuf[MIB_TMP_MAXLEN];
|
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||||
|
|
||||||
if (isget) {
|
if (isget) {
|
||||||
|
@ -533,7 +533,7 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
p80211pstrd_t *pstr = data;
|
struct p80211pstrd *pstr = data;
|
||||||
u8 bytebuf[MIB_TMP_MAXLEN];
|
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||||
u16 len;
|
u16 len;
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ static int prism2mib_priv(struct mibrec *mib,
|
||||||
hfa384x_t *hw,
|
hfa384x_t *hw,
|
||||||
struct p80211msg_dot11req_mibset *msg, void *data)
|
struct p80211msg_dot11req_mibset *msg, void *data)
|
||||||
{
|
{
|
||||||
p80211pstrd_t *pstr = data;
|
struct p80211pstrd *pstr = data;
|
||||||
|
|
||||||
switch (mib->did) {
|
switch (mib->did) {
|
||||||
case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{
|
case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{
|
||||||
|
@ -752,7 +752,7 @@ static int prism2mib_priv(struct mibrec *mib,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr)
|
struct p80211pstrd *pstr)
|
||||||
{
|
{
|
||||||
bytestr->len = cpu_to_le16((u16)(pstr->len));
|
bytestr->len = cpu_to_le16((u16)(pstr->len));
|
||||||
memcpy(bytestr->data, pstr->data, pstr->len);
|
memcpy(bytestr->data, pstr->data, pstr->len);
|
||||||
|
@ -774,7 +774,7 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
||||||
p80211pstrd_t *pstr)
|
struct p80211pstrd *pstr)
|
||||||
{
|
{
|
||||||
pstr->len = (u8)(le16_to_cpu((u16)(bytestr->len)));
|
pstr->len = (u8)(le16_to_cpu((u16)(bytestr->len)));
|
||||||
memcpy(pstr->data, bytestr->data, pstr->len);
|
memcpy(pstr->data, bytestr->data, pstr->len);
|
||||||
|
@ -795,7 +795,7 @@ void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
|
void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len)
|
||||||
{
|
{
|
||||||
pstr->len = (u8)len;
|
pstr->len = (u8)len;
|
||||||
memcpy(pstr->data, bytearea, len);
|
memcpy(pstr->data, bytearea, len);
|
||||||
|
|
|
@ -1256,7 +1256,7 @@ void prism2sta_processing_defer(struct work_struct *data)
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr(
|
prism2mgmt_bytestr2pstr(
|
||||||
(struct hfa384x_bytestr *)&ssid,
|
(struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *)&wlandev->ssid);
|
(struct p80211pstrd *)&wlandev->ssid);
|
||||||
|
|
||||||
/* Collect the port status */
|
/* Collect the port status */
|
||||||
result = hfa384x_drvr_getconfig16(hw,
|
result = hfa384x_drvr_getconfig16(hw,
|
||||||
|
@ -1337,7 +1337,7 @@ void prism2sta_processing_defer(struct work_struct *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *)&wlandev->ssid);
|
(struct p80211pstrd *)&wlandev->ssid);
|
||||||
|
|
||||||
hw->link_status = HFA384x_LINK_CONNECTED;
|
hw->link_status = HFA384x_LINK_CONNECTED;
|
||||||
netif_carrier_on(wlandev->netdev);
|
netif_carrier_on(wlandev->netdev);
|
||||||
|
@ -1993,7 +1993,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
|
||||||
(p80211pstrd_t *)&wlandev->ssid);
|
(struct p80211pstrd *)&wlandev->ssid);
|
||||||
|
|
||||||
/* Reschedule timer */
|
/* Reschedule timer */
|
||||||
mod_timer(&hw->commsqual_timer, jiffies + HZ);
|
mod_timer(&hw->commsqual_timer, jiffies + HZ);
|
||||||
|
|
Loading…
Reference in New Issue