The extended cap IE from the hostapd is of variable
length, but it is always type casted to a fixed length
of 11 octets. This leads to OOB access of memory and
incorrect data gets read. In this case, beacon protection
is not enabled in the ext cap IE, but due to OOB access
beacon protection is read as 1.
Fix the OOB access by typecasting the IE to the length of
the IE.
Change-Id: Id9a54e3467fa9f7a49687da41411a421fd9c9d37
CRs-Fixed: 3178294