[7880][7872][7885][9610] wlbt:SPP A-MSDU Capable in RSN capabilites.
authorHimani Gupta <himani.g2@samsung.com>
Tue, 3 Jul 2018 06:32:52 +0000 (12:02 +0530)
committerIvan Priest <i.priest@samsung.com>
Wed, 11 Jul 2018 17:43:30 +0000 (18:43 +0100)
Set SPP A-MSDU capable and Extended Key ID MASK bit in RSN
capabilites to 1 for AP mode.Which indicate
support for signaling and payload protected A-MSDUs.

Change-Id: Icb1e3ab2a055f1a424321ee2a5d078cf6b2dfb6d
SCSC-Bug-ID: SSB-41417
Signed-off-by: Himani Gupta <himani.g2@samsung.com>
drivers/net/wireless/scsc/mlme.c
drivers/net/wireless/scsc/mlme.h

index 3a170080a47ed36624ddad5cb0498aea629f2f1b..07ed3fa5ffe81ef4e19962ce337e83060482ce98 100755 (executable)
@@ -1585,6 +1585,7 @@ int slsi_modify_ies(struct net_device *dev, u8 eid, u8 *ies, int ies_len, u8 ie_
                        break;
                case WLAN_EID_DS_PARAMS:
                case WLAN_EID_HT_OPERATION:
+               case WLAN_EID_RSN:
                        if (ie_index == 2)
                                ie[ie_index] = ie_value;
                        else
@@ -1604,7 +1605,7 @@ static void slsi_mlme_start_prepare_ies(struct sk_buff *req, struct netdev_vif *
 {
        const u8 *wps_ie, *vht_capab_ie, *tail_pos = NULL, *ext_capab_ie;
        size_t   beacon_ie_len = 0, tail_length = 0;
-       u8       *country_ie;
+       u8       *country_ie, *rsn_ie;
        const u8 *beacon_tail = settings->beacon.tail;
        size_t   beacon_tail_len = settings->beacon.tail_len;
 
@@ -1635,7 +1636,24 @@ static void slsi_mlme_start_prepare_ies(struct sk_buff *req, struct netdev_vif *
                        beacon_tail_len -= (country_ie[1] + 2);
                }
        }
+       rsn_ie = (u8 *)cfg80211_find_ie(WLAN_EID_RSN, beacon_tail, beacon_tail_len);
+       if (rsn_ie) {
+               u8 rsn_capab = SLSI_WLAN_RSN_CAP_AMSDU | SLSI_WLAN_RSN_CAP_EXTENDED_ID_MASK;
+                /* 9=1(length)+2(version)+4(Group data cipher suite)+
+                 * 2(Pairwise cipher suite count)
+                 */
+               int rsn_capab_idx = 9, akm_count;
+               int pcs_count = rsn_ie[9] << 8 | rsn_ie[8];
 
+               /* Added bytes for Pairwise cipher suite list*/
+               rsn_capab_idx = 9 + 4 * pcs_count;
+               akm_count = rsn_ie[rsn_capab_idx + 2] << 8 | rsn_ie[rsn_capab_idx + 1];
+               /*Added bytes for AKM suite count and list*/
+               rsn_capab_idx = rsn_capab_idx + 2 + 4 * akm_count + 1;
+
+               slsi_modify_ies(ndev_vif->wdev.netdev, WLAN_EID_RSN, (u8 *)settings->beacon.tail,
+                               settings->beacon.tail_len, rsn_capab_idx + 1, rsn_capab);
+       }
        /* Modify HT IE based on OBSS scan data */
        if (ndev_vif->ap.non_ht_bss_present) {
                u8 op_mode = 1;
index 1d2c9437c145b19c9e56733958e89b088e4684fe..f8774c005063cc230b3fd65d19a790b2078e270a 100755 (executable)
@@ -28,6 +28,10 @@ enum slsi_ac_index_wmm_pe {
 #define SLSI_WLAN_OUI_TYPE_WFA_HS20_IND 0x10
 #define SLSI_WLAN_OUI_TYPE_WFA_OSEN 0x12
 
+/*RSN capabilities bytes*/
+#define SLSI_WLAN_RSN_CAP_AMSDU  BIT(2)
+#define SLSI_WLAN_RSN_CAP_EXTENDED_ID_MASK  BIT(5)
+
 /*Extended capabilities bytes*/
 #define SLSI_WLAN_EXT_CAPA2_BSS_TRANSISITION_ENABLED  (1 << 3)
 #define SLSI_WLAN_EXT_CAPA3_INTERWORKING_ENABLED        (1 << 7)