mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
staging: rtl8192u: fix large frame size compiler warning
This patch fixes following compiler warning: drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c: In function ‘RxReorderIndicatePacket’: drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:758:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] It replaces the statically allocated array prxbIndicateArray with a kmalloc'd one. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
64b389c53c
commit
79a5ccd972
@@ -594,12 +594,18 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
|
|||||||
{
|
{
|
||||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||||
PRX_REORDER_ENTRY pReorderEntry = NULL;
|
PRX_REORDER_ENTRY pReorderEntry = NULL;
|
||||||
struct ieee80211_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
|
struct ieee80211_rxb **prxbIndicateArray;
|
||||||
u8 WinSize = pHTInfo->RxReorderWinSize;
|
u8 WinSize = pHTInfo->RxReorderWinSize;
|
||||||
u16 WinEnd = (pTS->RxIndicateSeq + WinSize -1)%4096;
|
u16 WinEnd = (pTS->RxIndicateSeq + WinSize -1)%4096;
|
||||||
u8 index = 0;
|
u8 index = 0;
|
||||||
bool bMatchWinStart = false, bPktInBuf = false;
|
bool bMatchWinStart = false, bPktInBuf = false;
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__func__,SeqNum,pTS->RxIndicateSeq,WinSize);
|
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->RxIndicateSeq is %d, WinSize is %d\n",__func__,SeqNum,pTS->RxIndicateSeq,WinSize);
|
||||||
|
|
||||||
|
prxbIndicateArray = kmalloc(sizeof(struct ieee80211_rxb *) *
|
||||||
|
REORDER_WIN_SIZE, GFP_KERNEL);
|
||||||
|
if (!prxbIndicateArray)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Rx Reorder initialize condition.*/
|
/* Rx Reorder initialize condition.*/
|
||||||
if (pTS->RxIndicateSeq == 0xffff) {
|
if (pTS->RxIndicateSeq == 0xffff) {
|
||||||
pTS->RxIndicateSeq = SeqNum;
|
pTS->RxIndicateSeq = SeqNum;
|
||||||
@@ -618,6 +624,8 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
|
|||||||
kfree(prxb);
|
kfree(prxb);
|
||||||
prxb = NULL;
|
prxb = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree(prxbIndicateArray);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,6 +749,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
|
|||||||
// Indicate packets
|
// Indicate packets
|
||||||
if(index>REORDER_WIN_SIZE){
|
if(index>REORDER_WIN_SIZE){
|
||||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n");
|
IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n");
|
||||||
|
kfree(prxbIndicateArray);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ieee80211_indicate_packets(ieee, prxbIndicateArray, index);
|
ieee80211_indicate_packets(ieee, prxbIndicateArray, index);
|
||||||
@@ -755,6 +764,8 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
|
|||||||
pTS->RxPktPendingTimer.expires = jiffies + MSECS(pHTInfo->RxReorderPendingTime);
|
pTS->RxPktPendingTimer.expires = jiffies + MSECS(pHTInfo->RxReorderPendingTime);
|
||||||
add_timer(&pTS->RxPktPendingTimer);
|
add_timer(&pTS->RxPktPendingTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree(prxbIndicateArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 parse_subframe(struct sk_buff *skb,
|
static u8 parse_subframe(struct sk_buff *skb,
|
||||||
|
|||||||
Reference in New Issue
Block a user