Skip to contentSkip to conversation

Staging: wlan-ng: Drop wrapper function

PATCH New Bhumika Goyal 1 participant 3 messages Feb 13, 2016 Staging

lore
Share & tools
lore
#0 lore raw

cover Staging: wlan-ng: Drop wrapper function

This patchset drops the wrapper function prism2mgmt_pstr2bytearea and replace its call by the function it wrapped. Also remove its function prototype from the header file as it is no longer needed.

Bhumika Goyal (2):
Staging: wlan-ng: Drop wrapper function
Staging: wlan-ng: Remove function prototype

 drivers/staging/wlan-ng/prism2mgmt.h |  1 -
 drivers/staging/wlan-ng/prism2mib.c  | 24 ++----------------------
 2 files changed, 2 insertions(+), 23 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 Staging: wlan-ng: Drop wrapper function

Drop the function prism2mgmt_pstr2bytearea and replace its function call with the standard function memcpy that it wrapped.
The code becomes cleaner after this patch.

---
 drivers/staging/wlan-ng/prism2mib.c | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)
drivers/staging/wlan-ng/prism2mib.c +2 -22
index cdda07d..e1b2e47 100644
@@ -388,7 +388,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib,
 		prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2);
 	} else {
 		memset(bytebuf, 0, mib->parm2);
-		prism2mgmt_pstr2bytearea(bytebuf, pstr);
+		memcpy(bytebuf, pstr->data, pstr->len);
 		result =
 		    hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
 	}
@@ -543,7 +543,7 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib,
 		len = (pstr->len > 5) ? HFA384x_RID_CNFWEP128DEFAULTKEY_LEN :
 		    HFA384x_RID_CNFWEPDEFAULTKEY_LEN;
 		memset(bytebuf, 0, len);
-		prism2mgmt_pstr2bytearea(bytebuf, pstr);
+		memcpy(bytebuf, pstr->data, pstr->len);
 		result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
 	}
 
@@ -759,26 +759,6 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
 }
 
 /*----------------------------------------------------------------
-* prism2mgmt_pstr2bytearea
-*
-* Convert the pstr data in the WLAN message structure into an hfa384x
-* byte area format.
-*
-* Arguments:
-*	bytearea	hfa384x byte area data type
-*	pstr		wlan message data
-*
-* Returns:
-*	Nothing
-*
-----------------------------------------------------------------*/
-
-void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
-{
-	memcpy(bytearea, pstr->data, pstr->len);
-}
-
-/*----------------------------------------------------------------
 * prism2mgmt_bytestr2pstr
 *
 * Convert the data in an hfa384x byte string format into a
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 Staging: wlan-ng: Remove function prototype

In reply to Bhumika Goyal

This patch removes the function prototype for prism2mgmt_pstr2bytearea as it is no longer needed.

---
 drivers/staging/wlan-ng/prism2mgmt.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wlan-ng/prism2mgmt.h +0 -1
index 7a9f424..e647203 100644
@@ -87,7 +87,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
 * Prism2 data types
 ---------------------------------------------------------------*/
 /* byte area conversion functions*/
-void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
 void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
 
 /* byte string conversion functions*/
Signature · 1 line
1.9.1