Loading core/wma/inc/wma_dfs_interface.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,10 @@ #define IEEE80211_CHAN_VHT40MINUS 0x00400000 #define IEEE80211_CHAN_VHT40MINUS 0x00400000 /* VHT 80 channel */ /* VHT 80 channel */ #define IEEE80211_CHAN_VHT80 0x00800000 #define IEEE80211_CHAN_VHT80 0x00800000 /* VHT 80+80 Channel */ #define IEEE80211_CHAN_VHT80P80 0x01000000 /* VHT 160 Channel */ #define IEEE80211_CHAN_VHT160 0x02000000 /* token for ``any channel'' */ /* token for ``any channel'' */ #define DFS_IEEE80211_CHAN_ANY (-1) #define DFS_IEEE80211_CHAN_ANY (-1) Loading Loading @@ -116,9 +120,11 @@ */ */ struct dfs_ieee80211_channel { struct dfs_ieee80211_channel { uint32_t ic_freq; uint32_t ic_freq; uint32_t ic_freq_ext; uint32_t ic_flags; uint32_t ic_flags; uint8_t ic_flagext; uint8_t ic_flagext; uint8_t ic_ieee; uint8_t ic_ieee; uint8_t ic_ieee_ext; int8_t ic_maxregpower; int8_t ic_maxregpower; int8_t ic_maxpower; int8_t ic_maxpower; int8_t ic_minpower; int8_t ic_minpower; Loading @@ -127,6 +133,7 @@ struct dfs_ieee80211_channel { uint32_t ic_vhtop_ch_freq_seg1; uint32_t ic_vhtop_ch_freq_seg1; uint32_t ic_vhtop_ch_freq_seg2; uint32_t ic_vhtop_ch_freq_seg2; int ic_pri_freq_center_freq_mhz_separation; int ic_pri_freq_center_freq_mhz_separation; bool ic_80p80_both_dfs; }; }; /** /** Loading core/wma/src/wma_features.c +45 −9 Original line number Original line Diff line number Diff line Loading @@ -7388,6 +7388,8 @@ struct dfs_ieee80211_channel *wma_dfs_configure_channel( struct wma_vdev_start_req struct wma_vdev_start_req *req) *req) { { uint8_t ext_channel; if (dfs_ic == NULL) { if (dfs_ic == NULL) { WMA_LOGE("%s: DFS ic is Invalid", __func__); WMA_LOGE("%s: DFS ic is Invalid", __func__); return NULL; return NULL; Loading Loading @@ -7420,23 +7422,57 @@ struct dfs_ieee80211_channel *wma_dfs_configure_channel( (dfs_ic->ic_curchan->ic_ieee <= WMA_11A_CHANNEL_END)) { (dfs_ic->ic_curchan->ic_ieee <= WMA_11A_CHANNEL_END)) { dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_5GHZ; dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_5GHZ; } } if (CH_WIDTH_80MHZ == req->chan_width) { dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT80; switch (req->chan_width) { } case CH_WIDTH_20MHZ: if (CH_WIDTH_40MHZ == req->chan_width) { dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT20 : IEEE80211_CHAN_HT20); break; case CH_WIDTH_40MHZ: if (req->chan < req->ch_center_freq_seg0) if (req->chan < req->ch_center_freq_seg0) dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT40PLUS : IEEE80211_CHAN_VHT40PLUS : IEEE80211_CHAN_HT40PLUS); IEEE80211_CHAN_HT40PLUS); else else dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT40MINUS : IEEE80211_CHAN_VHT40MINUS : IEEE80211_CHAN_HT40MINUS); IEEE80211_CHAN_HT40MINUS); } else if (CH_WIDTH_20MHZ == req->chan_width) { break; case CH_WIDTH_80MHZ: dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT80; break; case CH_WIDTH_80P80MHZ: ext_channel = cds_freq_to_chan(chan->band_center_freq2); dfs_ic->ic_curchan->ic_flags |= dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT20 : IEEE80211_CHAN_VHT80P80; IEEE80211_CHAN_HT20); dfs_ic->ic_curchan->ic_freq_ext = chan->band_center_freq2; dfs_ic->ic_curchan->ic_ieee_ext = ext_channel; /* verify both the 80MHz are DFS bands or not */ if ((CHANNEL_STATE_DFS == cds_get_bonded_channel_state(req->chan , CH_WIDTH_80MHZ)) && (CHANNEL_STATE_DFS == cds_get_bonded_channel_state( ext_channel - 6 , CH_WIDTH_80MHZ))) dfs_ic->ic_curchan->ic_80p80_both_dfs = true; break; case CH_WIDTH_160MHZ: dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT160; break; default: WMA_LOGE( "%s: Recieved a wrong channel width %d", __func__, req->chan_width); break; } } dfs_ic->ic_curchan->ic_flagext |= IEEE80211_CHAN_DFS; dfs_ic->ic_curchan->ic_flagext |= IEEE80211_CHAN_DFS; if (req->oper_mode == BSS_OPERATIONAL_MODE_AP) { if (req->oper_mode == BSS_OPERATIONAL_MODE_AP) { Loading Loading
core/wma/inc/wma_dfs_interface.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,10 @@ #define IEEE80211_CHAN_VHT40MINUS 0x00400000 #define IEEE80211_CHAN_VHT40MINUS 0x00400000 /* VHT 80 channel */ /* VHT 80 channel */ #define IEEE80211_CHAN_VHT80 0x00800000 #define IEEE80211_CHAN_VHT80 0x00800000 /* VHT 80+80 Channel */ #define IEEE80211_CHAN_VHT80P80 0x01000000 /* VHT 160 Channel */ #define IEEE80211_CHAN_VHT160 0x02000000 /* token for ``any channel'' */ /* token for ``any channel'' */ #define DFS_IEEE80211_CHAN_ANY (-1) #define DFS_IEEE80211_CHAN_ANY (-1) Loading Loading @@ -116,9 +120,11 @@ */ */ struct dfs_ieee80211_channel { struct dfs_ieee80211_channel { uint32_t ic_freq; uint32_t ic_freq; uint32_t ic_freq_ext; uint32_t ic_flags; uint32_t ic_flags; uint8_t ic_flagext; uint8_t ic_flagext; uint8_t ic_ieee; uint8_t ic_ieee; uint8_t ic_ieee_ext; int8_t ic_maxregpower; int8_t ic_maxregpower; int8_t ic_maxpower; int8_t ic_maxpower; int8_t ic_minpower; int8_t ic_minpower; Loading @@ -127,6 +133,7 @@ struct dfs_ieee80211_channel { uint32_t ic_vhtop_ch_freq_seg1; uint32_t ic_vhtop_ch_freq_seg1; uint32_t ic_vhtop_ch_freq_seg2; uint32_t ic_vhtop_ch_freq_seg2; int ic_pri_freq_center_freq_mhz_separation; int ic_pri_freq_center_freq_mhz_separation; bool ic_80p80_both_dfs; }; }; /** /** Loading
core/wma/src/wma_features.c +45 −9 Original line number Original line Diff line number Diff line Loading @@ -7388,6 +7388,8 @@ struct dfs_ieee80211_channel *wma_dfs_configure_channel( struct wma_vdev_start_req struct wma_vdev_start_req *req) *req) { { uint8_t ext_channel; if (dfs_ic == NULL) { if (dfs_ic == NULL) { WMA_LOGE("%s: DFS ic is Invalid", __func__); WMA_LOGE("%s: DFS ic is Invalid", __func__); return NULL; return NULL; Loading Loading @@ -7420,23 +7422,57 @@ struct dfs_ieee80211_channel *wma_dfs_configure_channel( (dfs_ic->ic_curchan->ic_ieee <= WMA_11A_CHANNEL_END)) { (dfs_ic->ic_curchan->ic_ieee <= WMA_11A_CHANNEL_END)) { dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_5GHZ; dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_5GHZ; } } if (CH_WIDTH_80MHZ == req->chan_width) { dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT80; switch (req->chan_width) { } case CH_WIDTH_20MHZ: if (CH_WIDTH_40MHZ == req->chan_width) { dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT20 : IEEE80211_CHAN_HT20); break; case CH_WIDTH_40MHZ: if (req->chan < req->ch_center_freq_seg0) if (req->chan < req->ch_center_freq_seg0) dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT40PLUS : IEEE80211_CHAN_VHT40PLUS : IEEE80211_CHAN_HT40PLUS); IEEE80211_CHAN_HT40PLUS); else else dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT40MINUS : IEEE80211_CHAN_VHT40MINUS : IEEE80211_CHAN_HT40MINUS); IEEE80211_CHAN_HT40MINUS); } else if (CH_WIDTH_20MHZ == req->chan_width) { break; case CH_WIDTH_80MHZ: dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT80; break; case CH_WIDTH_80P80MHZ: ext_channel = cds_freq_to_chan(chan->band_center_freq2); dfs_ic->ic_curchan->ic_flags |= dfs_ic->ic_curchan->ic_flags |= (req->vht_capable ? IEEE80211_CHAN_VHT20 : IEEE80211_CHAN_VHT80P80; IEEE80211_CHAN_HT20); dfs_ic->ic_curchan->ic_freq_ext = chan->band_center_freq2; dfs_ic->ic_curchan->ic_ieee_ext = ext_channel; /* verify both the 80MHz are DFS bands or not */ if ((CHANNEL_STATE_DFS == cds_get_bonded_channel_state(req->chan , CH_WIDTH_80MHZ)) && (CHANNEL_STATE_DFS == cds_get_bonded_channel_state( ext_channel - 6 , CH_WIDTH_80MHZ))) dfs_ic->ic_curchan->ic_80p80_both_dfs = true; break; case CH_WIDTH_160MHZ: dfs_ic->ic_curchan->ic_flags |= IEEE80211_CHAN_VHT160; break; default: WMA_LOGE( "%s: Recieved a wrong channel width %d", __func__, req->chan_width); break; } } dfs_ic->ic_curchan->ic_flagext |= IEEE80211_CHAN_DFS; dfs_ic->ic_curchan->ic_flagext |= IEEE80211_CHAN_DFS; if (req->oper_mode == BSS_OPERATIONAL_MODE_AP) { if (req->oper_mode == BSS_OPERATIONAL_MODE_AP) { Loading