diff options
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/net/wireless/bcmdhd/include/wlioctl.h | 1 | ||||
-rwxr-xr-x | drivers/net/wireless/bcmdhd/wl_android.c | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/wlioctl.h b/drivers/net/wireless/bcmdhd/include/wlioctl.h index 50f98790dbec..0fe85d32bd73 100755 --- a/drivers/net/wireless/bcmdhd/include/wlioctl.h +++ b/drivers/net/wireless/bcmdhd/include/wlioctl.h @@ -3652,6 +3652,7 @@ struct ampdu_tid_control { struct ampdu_ea_tid { struct ether_addr ea; /* Station address */ uint8 tid; /* tid */ + uint8 initiator; /* 0 is recipient, 1 is originator */ }; /* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */ struct ampdu_retry_tid { diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c index 4a0994b28a08..f824574da3cb 100755 --- a/drivers/net/wireless/bcmdhd/wl_android.c +++ b/drivers/net/wireless/bcmdhd/wl_android.c @@ -56,6 +56,9 @@ #ifdef ENABLE_WiFI_BT_TURN_ON_SYNC #include <linux/delay.h> #endif + +#include <proto/802.1d.h> + /* * Android private command strings, PLEASE define new private commands here * so they can be updated easily in the future (if needed) @@ -104,6 +107,7 @@ #define CMD_ASSOCRESPIE "ASSOCRESPIE" #define CMD_MAXLINKSPEED "MAXLINKSPEED" #define CMD_RXRATESTATS "RXRATESTATS" +#define CMD_AMPDU_SEND_DELBA "AMPDU_SEND_DELBA" /* CCX Private Commands */ @@ -1081,6 +1085,46 @@ resume: return ret; } +int +wl_android_ampdu_send_delba(struct net_device *dev, char *command) +{ + int error = 0; + struct ampdu_ea_tid aet; + char smbuf[WLC_IOCTL_SMLEN]; + + DHD_ERROR(("%s, %s\n", __FUNCTION__, command)); + + /* get tid */ + aet.tid = bcm_strtoul(command, &command, 10); + if (aet.tid > MAXPRIO) { + DHD_ERROR(("%s: error: invalid tid %d\n", __FUNCTION__, aet.tid)); + return BCME_BADARG; + } + command++; + + /* get mac address, here 17 is strlen("xx:xx:xx:xx:xx:xx") */ + if ((strlen(command) < 17) || !bcm_ether_atoe(command, &aet.ea)) { + DHD_ERROR(("%s: error: invalid MAC address %s\n", __FUNCTION__, command)); + return BCME_BADARG; + } + /* skip mac address */ + command += strlen("xx:xx:xx:xx:xx:xx") + 1; + + /* get initiator */ + aet.initiator = bcm_strtoul(command, &command, 10); + if (aet.initiator > 1) { + DHD_ERROR(("%s: error: inivalid initiator %d\n", __FUNCTION__, aet.initiator)); + return BCME_BADARG; + } + + error = wldev_iovar_setbuf(dev, "ampdu_send_delba", &aet, sizeof(aet), + smbuf, sizeof(smbuf), NULL); + if (error) { + DHD_ERROR(("%s: Failed to send delba, error = %d\n", __FUNCTION__, error)); + } + + return error; +} int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) { @@ -1259,6 +1303,9 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) priv_cmd.total_len - skip, *(command + skip - 2) - '0'); } #endif /* WL_CFG80211 */ + else if (strnicmp(command, CMD_AMPDU_SEND_DELBA, strlen(CMD_AMPDU_SEND_DELBA)) == 0) + bytes_written = wl_android_ampdu_send_delba(net, + &command[strlen(CMD_AMPDU_SEND_DELBA) + 1]); else if (strnicmp(command, CMD_OKC_SET_PMK, strlen(CMD_OKC_SET_PMK)) == 0) bytes_written = wl_android_set_pmk(net, command, priv_cmd.total_len); else if (strnicmp(command, CMD_OKC_ENABLE, strlen(CMD_OKC_ENABLE)) == 0) |